function getXMLHTTPRequest()
{
  try
   {
    req = new XMLHttpRequest();
   }
   catch(err1)
   {
	 try
      {
       req = new ActiveXObject("Msxml2.XMLHTTP");
	 }
      catch(err2)
      {
	     try
          {
          req = new ActiveXObject("Microsoft.XMLHTTP");
		}
          catch(err3)
          {
		req = false;
          }
      }
   }
return req;
}



var http = getXMLHTTPRequest();




function getServerData(pagename, idname, datastream)
{

idval = "";
var myurl = pagename;
myRand = parseInt(Math.random() * 999999999);
var modurl = myurl+"?rand="+myRand+"&"+datastream;

http.open("GET", modurl, true);
idval = idname;
http.onreadystatechange = useHttpResponse;
http.send(null);
}


function useHttpResponse()
{

    if(http.readyState == 4 && http.status == 200)
     {
	document.getElementById(idval).innerHTML = http.responseText;
	}
     else
     {
	document.getElementById(idval).innerHTML = '<img src="pawload.gif" />';
     }
}






