function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
  return xmlHttp;
}

function goAJAX(f, u)
 {
     xmlHttp1=GetXmlHttpObject()
     if (xmlHttp1==null)
        {  alert ("Your browser does not support AJAX!");  return;  } 
     var url=f+".php";
     url=url+"?"+u;
     url=url+"&sid="+Math.random();
     xmlHttp1.onreadystatechange=cResp;
     xmlHttp1.open("GET",url,true);
     xmlHttp1.send(null);
	 return false;
 }
 
function cResp()
 {
  if (xmlHttp1.readyState==4)
   {
     s=xmlHttp1.responseText;
	 var p=s.split("@@@");
	 if(p[0].length>20) alert(s);
	 document.getElementById(p[0]).innerHTML=p[1];
	 if(p[2]) if(p[2].length!=0)
	  {
		  q=document.getElementById(p[2]);
		  if(q) q.innerHTML=p[3]; else alert(p[2]);
	  }
   }
 }

