var agt = navigator.userAgent.toLowerCase();
var is_ie = (agt.indexOf('msie') != -1);
var is_ie5 = (agt.indexOf('msie 5') != -1);

function CreateXmlHttpReq(handler) {
  var xmlhttp = null;
  if (is_ie) {
      var control = (is_ie5) ? "Microsoft.XMLHTTP" : "Msxml2.XMLHTTP";
      try {
          xmlhttp = new ActiveXObject(control);
          xmlhttp.onreadystatechange = handler;
      } catch(e) {
          alert("You need to enable active scripting and activeX controls");
      }
  } else {
      xmlhttp = new XMLHttpRequest();
      xmlhttp.onload = handler;
      xmlhttp.onerror = handler;
  }
  return xmlhttp;
}

// An handler that does nothing, used for AJAX requests that
// don't require a reply and are non-critical about error conditions.
function DummyHandler() {
    return true;
}
