var xmlHttp
function sndReq(vote,id_num,ip_num,units)
{
	//vote,id_num,ip_num,units
	//alert("A " + vote + " B " + id_num+ " C " + ip_num); 
	//alert("A " + vote + " B " + id_num + " C " + ip_num  + " D " + units);
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url = "../rpc.php";
//var url = "http://localhost/123contact/rpc.php";
//url1 = url+"?t="+ip_num+"&j="+vote+"&q="+id_num;
url1 = url+"?j="+vote+"&q="+id_num+"&t="+ip_num+"&c="+units;
//alert(url1);
/*var url="http://localhost/123contact/rpc.php";
 url=url+"?j="+vote;
 url=url+"&q="+id_num;
 url=url+"&t="+ip_num;
 url=url+"&c="+units;*/
 //alert(url1);
//alert(id_num);
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url1,true);
xmlHttp.send(null);
} 

function stateChanged() 
{ 

//document.getElementById("test").innerHTML=xmlHttp.responseText;
//document.getElementById("unit_ul"+id_num).innerHTML=xmlHttp.responseText;
document.getElementById("test").innerHTML=xmlHttp.responseText;
/*alert(xcj);
if(xmlHttp.readyState==4)
{ 
document.getElementById("test").innerHTML="cvcv";*/
/*document.getElementById("test").innerHTML=xmlHttp.responseText;
alert(xmlHttp.responseText);*/
//document.getElementById("unit_ul"+id_num).display="none";
/*document.getElementById("unit_long"+id_num).innerHTML="klklklklk";
document.getElementById("test").value="klklklklk";*/
//}
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
