  OnAjaxComplete = function(Data) {return;}
  
  function XMLinit()
  {
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) 
    {
      try {
        req = new XMLHttpRequest();
      } catch(e) {
        req = false;
      }
      
      // 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 = false;
        }
      }
    }
  }

  function processReqChange(type) {
    // only if req shows "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) 
        {
          // Run the returned Javascript
          OnAjaxComplete(req.responseText);
        } else {
          alert("There was a problem retrieving the information:\n" + req.statusText);
        }
    }
  }  
  
  function FetchInfo(url)
  {
    XMLinit();

    if(req) {
      req.onreadystatechange = processReqChange;
      req.open("GET", url, true);
      req.send('');
    }
  }

  
  function FetchInfoEx(url, element,callback, cbParam, waitmsg, isDebug,method) // cbParam, waitmsg isDebug and method are optional
  {
    if (waitmsg == undefined)
      waitmsg = "<IMG SRC='"+AjaxLoaderGif+"'>";
    
    if (isDebug != undefined)
     alert(url);
     
    if (method == undefined)
      method = 'GET';  
    
    if (element != undefined)
    {
      oObj = MM_findObj(element);
      if (oObj != undefined)
        oObj.innerHTML = waitmsg;
    }
      
    try {
      req = new XMLHttpRequest(); /* e.g. Firefox */
    } catch(e) {
      try {
        req = new ActiveXObject("Msxml2.XMLHTTP");  /* some versions IE */
      } catch (e) {
        try {
          req = new ActiveXObject("Microsoft.XMLHTTP");  /* some versions IE */
        } catch (E) {
          req = false;
        } 
      } 
    }
    req.onreadystatechange = function() {processReqChangeEx(callback,cbParam);};
    
    if (method == 'POST')
    {
      // prepare for a POST request...
      nPos = url.indexOf('?');
      if (nPos != -1)
      {
        // Seperate the POST data from the URL.
        urlParams = url.substring(nPos+1);
        url = url.substring(0,nPos);
      }
    }
    
    req.open(method,url,true);
    if (method == 'POST')
    {
      req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      req.setRequestHeader("Content-length", urlParams.length);
      req.setRequestHeader("Connection", "close");
      req.send(urlParams);
    }
    else
    {
      req.send(null);
    }
  }
  
  function processReqChangeEx(callback,cbParam) {
    if(req.readyState == 4) 
    {
      if(req.status == 200) 
        callback(req.responseText,cbParam)
    }
  }
