/* Simplified version of adapting to either normal browsers which use
   JavaScript or IE which uses an ActiveX Object. */
function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 
// Function to perform a count and logging. Designed to run from
// an onLoad from the body tag.
function docount($why)
{  
  xmlHttp=GetXmlHttpObject();
  if (xmlHttp == null)
  {
    alert("Browser does not support AJAX HTTP request.");
    return;
  }
  url = "maincount.php?func=" + $why;
  xmlHttp.onreadystatechange=myChange;
  xmlHttp.open("GET",url,true);
  xmlHttp.send(null); 
}
function myChange()
{
  if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
  {
     rdata =  xmlHttp.responseText;
     // alert("rdata " + rdata);
  }
}

