HTTPRequest = function () {
var xRequest=null;
if (window.XMLHttpRequest){
	xRequest=new XMLHttpRequest();
} else if (window.ActiveXObject){
   try {
      xRequest = new ActiveXObject("Microsoft.XMLHTTP");
   } catch (_e) {
      try {
      xRequest = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (_E) { }
   }
}
return xRequest;
/*
   var xmlhttp=null;
   try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (_e) {
      try {
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (_E) {    }
   }
   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
     try {
        xmlhttp = new XMLHttpRequest();
     } catch (e) {
        xmlhttp = false;
   }  }
 
   return xmlhttp;
   */
}
function ask(url) {
	  var http = new HTTPRequest();
	  // obtain a random number to cheat the web browser and always go to the url
	  // this is to override the "check for new versions" to behave as "every visit to page"
	  url = url + "&cheat_rand=" + (100*Math.random());
   	  http.open("GET", url, true);
	  //http.onreadystatechange = function (){ handleHttpResponse(http)};
	  http.send(null);
}
function askChange(url, param) {
	  var http = new HTTPRequest();
	  // obtain a random number to cheat the web browser and always go to the url
	  // this is to override the "check for new versions" to behave as "every visit to page"
	  url = url + "&cheat_rand=" + (100*Math.random());
   	  http.open("GET", url, true);
	  http.onreadystatechange = function (){ handleHttpResponse(http, param)};
	  http.send(null);
}
function askChange2(url, param) {
	  var http = new HTTPRequest();
	  // obtain a random number to cheat the web browser and always go to the url
	  // this is to override the "check for new versions" to behave as "every visit to page"
	  url = url + "&cheat_rand=" + (100*Math.random());
 	  http.open("GET", url, true);
	  http.onreadystatechange = function (){ handleHttpResponse2(http, param)};
	  http.send(null);
}

