//////////////////////////////////////////////////////////////////
function getXHTTP( ) {
  var xhttp;
   try {   // The following "try" blocks get the XMLHTTP object for various browsers
      xhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e2) {
 		 // This block handles Mozilla/Firefox browsers...
	    try {
	      xhttp = new XMLHttpRequest();
	    } catch (e3) {
	      xhttp = false;
	    }
      }
    }
  return xhttp; // Return the XMLHTTP object
}
var http = getXHTTP();
//////////////////////////////////////////////////////////////////
function doHttpRequest(phpfile) {

  http.open("POST", phpfile, true);
  http.onreadystatechange = getHttpRes;

  // Set our POST header correctly
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");

  // Send the parms data
  http.send(params);

}
//////////////////////////////////////////////////////////////////
var firsttime = 0;
var params = "";
//////////////////////////////////////////////////////////////////