
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;
}



function ajaxRequest(responseObject){
  //window.alert('test');
   var xmlhttp=GetXmlHttpObject();
   var obj=document.getElementById(responseObject);
   var s="checkCookie.php?test=test";
   //window.alert(obj.innerHTML);
  // window.location=s;
xmlhttp.open("GET",s);
   //window.alert(xmlhttp.open("get","checkCookie.php?test=test"));
  
   
    //window.alert(xmlhttp);
    xmlhttp.onreadystatechange=function(){
   
       //window.alert('infunctions');
     if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
          // window.alert('response');
       obj.innerHTML = xmlhttp.responseText;
 
      } else {  }
     }

  xmlhttp.send(null);
  
  
  
}




