var phpfile = "geoip/trackguest.php";

function getHTTPObject() {
   var xmlhttp;
   if(window.XMLHttpRequest){
     xmlhttp = new XMLHttpRequest();
   } else if (window.ActiveXObject){
     xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
     if (!xmlhttp){
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
     }
   }
   return xmlhttp;
}
var http = getHTTPObject();

function CatchErrors() {
  if (http.readyState == 4) {
     if(http.status==200) {
        var results=http.responseText;
        //if(results.length > 0){ alert(results);}
     }
  }
}

function LoadPHP() {
   http.open("GET", phpfile, true);
   http.onreadystatechange = CatchErrors;
   http.send(null);
}

