var req = null;
     
// retrieve XML document as document object
function loadXMLDoc(url) {
   // branch for native XMLHttpRequest object
   if (window.XMLHttpRequest) {
      try {
         req = new XMLHttpRequest();
      } catch(e) {
         req = null;
      }
   // branch for IE/Windows ActiveX version
   } else if (window.ActiveXObject) {
      try {
         req = new ActiveXObject("Msxml2.XMLHTTP");
      } catch(e) {
         try {
            req = new ActiveXObject("Microsoft.XMLHTTP");
         } catch(e) {
            req = null;
         }
      }
   }

   if (req) {
      req.open("GET", url, true);
      req.onreadystatechange = processRequest;
      req.setRequestHeader("Content-Type", "text/xml");
      req.send("");
   }
}

function processRequest() {
   if (req.readyState == 4 && req.status == 200) {
      var xmlDoc = req.responseXML;
      if (xmlDoc) {
         // get busy processing XML
      }
   }
}
