   var http = new Object()
   var data = ""
   var method="GET"
   var action=""
   var bComplete = false

   function getHTTPObject() {
      var xmlhttp;
      // test for netscape:
      if (window.XMLHttpRequest) {
         xmlhttp = new XMLHttpRequest();
      }
      else {
        try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
          try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (e) {
               xmlhttp = false;
            }
        }
      }
      return xmlhttp;
   }

   function doquery(m,a,qs) {
     // alert('in doquery()')
     http = getHTTPObject(); 
     if (http != null) {
        window.status = "One moment ..."
    //    http.open(method, action + "?" + qs,true) 
    //    http.open(method, action + "?" + qs,false)  // blocks
    //    alert("m = " + m + " a = " + a + " qs = " + qs)
        http.open(m, a + "?" + qs,false)  // blocks
        http.setRequestHeader('Cache-Control', 'no-cache')
        http.setRequestHeader('Pragma', 'no-cache')
        http.onreadystatechange = function() { proc( http ) }
        http.send(null)
    //    alert("sent.")
    //  at this point IE is blocking, but firefox falls through
        var isGecko = (document.addEventListener)? true : false 
        if ( (isGecko) && (http.onreadystatechange == null) ) {
           proc(http)
        }
     }
     else {
        alert("Uh oh: http ojbect is null...");
     }
   }

   function proc(req) {
      // readystates: 0=null 1=loading 2=loaded 3=interactive 4=complete
      try {
         if (req.readyState == 4) {
            if (req.status == 200) {
               data = unescape(req.responseText)
            //   alert("in proc() GOT: " + data + "(" + data.length + ")")
            } 
            else {
               data = "Error: " + req.statusText
            }

            return
         }
      }
      catch ( e ) {
         alert('Unexpected network problem!\r\nYou should try later. Sorry.')
      }
   }

