function GetXmlHttpObject(handler){ 
  var objXmlHttp=false;

  if (window.XMLHttpRequest){ 
    objXmlHttp=new XMLHttpRequest();
    objXmlHttp.onload=handler;
    objXmlHttp.onerror=handler;
  }
  if (window.ActiveXObject){
    try {
      objXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    }
    catch (e) {
      try {
         objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch(e)
      {}
    }
    if (objXmlHttp) {
      objXmlHttp.onreadystatechange=handler;
    }
  }

  if (!objXmlHttp)
  {
    alert('Giving up - Cannot create an XMLHTTP instance');
    return false;
  }
  if (objXmlHttp.overrideMimeType) {
    objXmlHttp.overrideMimeType('text/xml');
  }
  return objXmlHttp;
}
