var xmlHttpc
function del_c(id)
{ 
xmlHttpc=GetXmlHttpObjectc()
if (xmlHttpc==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var url="iran.chat_del_contact_list.php?id="+id
url=url+"&amp;sid="+Math.random()
xmlHttpc.onreadystatechange=stateChangedc 
xmlHttpc.open("GET",url,true)
xmlHttpc.send(null)
}

function block(username,userid,val)
{ 
if(val==1)
var mag="Do you want to block "+username+" ?";
if(val==0)
var mag="Do you want to unblock "+username+" ?";
if(confirm(mag))
{
xmlHttpc=GetXmlHttpObjectc()
if (xmlHttpc==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 } 
var url="iran.chat_block_contact_list.php?userid="+userid+"&val="+val
url=url+"&amp;sid="+Math.random()
xmlHttpc.onreadystatechange=stateChangedc 
xmlHttpc.open("GET",url,true)
xmlHttpc.send(null)
}

}

function stateChangedc() 
{ 
if (xmlHttpc.readyState==4 || xmlHttpc.readyState=="complete")
 { 
 alert(xmlHttpc.responseText);
 }  
}

function GetXmlHttpObjectc()
{
var xmlHttpc=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpc=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttpc=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpc=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpc;
}