  var ajax = {
    xmlhttp: null,
    axCallbackName: '',
    axUrl: '',
    axQstr: '',
    axTransportType: '',
    activeFormID: '',
    postParams: '',
    postParamCount: 0,

    addPostParam: function(str) {
      if (0 < str.length) {
        if (0 < this.postParamCount) {
          this.postParams += "&";
        }
        this.postParams += str;
        ++this.postParamCount;
      }
    },
    
    makeXmlhttpClient: function() {
      this.xmlhttp = null;
      try { this.xmlhttp = new XMLHttpRequest(); 
      } catch(e1) {
        try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.6.0"); 
        } catch(e2) {
          try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP.3.0"); 
          } catch(e3) {
            try { this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
            } catch(e4) {
              try { this.xmlhttp = new ActiveXObject("Miorosoft.XMLHTTP");
              } catch(e5) { 
                this.xmlhttp = null; 
              }
            }
          }
        }
      }
      if (this.xmlhttp == null) {
        throw new Error("Your browser does not support XMLHttpRequest.");
      }
//      return this.xmlhttp;
    },

    /* begin "member" procedures */

    setCallbackName: function(sFunc) {
      if ('undefined'!=typeof this.xmlhttp && 0<sFunc.length) {
        this.axCallbackName = sFunc + "()";
      }
    },

    setQstr: function(sQstr) {
      var qarr= new Array(), qarr2 = new Array();
      this.axQstr = '';
      qarr = sQstr.split('&');
      for (var i=0; i<qarr.length; i++) {
        qarr2 = qarr[i].split('=');
        qarr[i] = qarr2[0] + '=' + encodeURIComponent(qarr2[1]);
        this.axQstr += '&' + qarr[i];
      }
    },

    setTransportType: function(sType) {
      if ('GET'==sType || 'POST'==sType) {
        this.axTransportType = sType;
      }
    },

    setUrl: function(sUrl) {
      /* add timestamp to avoid IE cacheing */
      var transmitTime = new Date();
      if (/\?/.test(sUrl)) {
        this.axUrl = sUrl + '&ttime=' + transmitTime.getTime();
      } else {
        this.axUrl = sUrl + '?ttime=' + transmitTime.getTime();
      }
    },

    transmit: function() {
      var parameters, uri;
      var that = this; // support closure
//        if (this.xmlhttp) alert("2. XMLHTTP IS AN " +  typeof this.xmlhttp);
//        if (that.xmlhttp) alert("3. XMLHTTP IS AN " +  typeof that.xmlhttp);
//        if (ajax.xmlhttp) alert("4. XMLHTTP IS AN " +  typeof that.xmlhttp);

      this.xmlhttp.onreadystatechange = function() {
        eval(that.axCallbackName);
      }
      if ('null' != typeof this.xmlhttp.onreadystatechange
        && '' != this.axUrl
        && '' != this.axTransportType) {
        switch (this.axTransportType) {
          case 'GET':
           if ('' == this.axQstr) {
             return false;
           }
           if (-1 < this.axUrl.indexOf('?')) {
             uri = this.axUrl + this.axQstr;
           } else {
             uri = this.axUrl + "?" + this.axQstr.substr(1);
           }
//var B = document.body;
//var objTxt = document.createTextNode(uri);
//B.appendChild(objTxt);
//return false;
//alert('TRANSMIT -- URL = ' + this.axUrl + '\nURI = ' + uri);           
           try {
             this.xmlhttp.open(this.axTransportType, uri, true);
           } catch(err) {
             alert("ERROR " + (e.number & 0xFFFF) + ": " + err.description);
           }
           if (window.ActiveXObject) {
             this.xmlhttp.send();
           } else if (window.XMLHttpRequest) {
             this.xmlhttp.send(null);
           }
           break;

          case 'POST':
           if (0 < arguments.length) {
             parameters = arguments[0]; //escape(arguments[0]);
           } else if (0 < this.postParams.length) {
             parameters = this.postParams;
           } else {
             parameters = '<no data>';
           }
           if ('' != this.axQstr) {
             if (-1 < this.axUrl.indexOf('?')) {
               uri = this.axUrl + "&" + this.axQstr;
             } else {
               uri = this.axUrl + "?" + this.axQstr;
             }
             this.xmlhttp.open(this.axTransportType, uri, true);
           } else {
             this.xmlhttp.open(this.axTransportType, this.axUrl, true);
           }
	   this.xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	   this.xmlhttp.setRequestHeader("Content-length", parameters.length);
	   this.xmlhttp.setRequestHeader("Connection", "close");
	   this.xmlhttp.send(parameters);
           break;
        } // switch
      }
      return true;
    }
    /* end "member" procedures */
  };
