var http = createRequestObject();

function createRequestObject(){

  var request_o; //declare the variable to hold the object.
  var browser = navigator.appName; //find the browser name
  if(browser == "Microsoft Internet Explorer"){
    /* Create the object using MSIE's method */
    request_o = new ActiveXObject("Microsoft.XMLHTTP");

  }else{
    /* Create the object using other browser's method */
    request_o = new XMLHttpRequest();
  }

  return request_o; //return the object
}

function sendGetRequest(URL,data,handler)
{
  http.abort();
  if(null != data)
    http.open('get',URL+'?'+data+'&NITRandInfo='+Date());
  else
    http.open('get',URL+'?NITRandInfo='+Date());

  http.onreadystatechange = handler;
  http.send(null);
}

function sendPostRequest(URL,data,handler)
{
  http.abort();
  http.open('post',URL);
  http.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
  http.send(data);
}

function doNothing()
{
}

