function Wjax()
{
  var xmlhttp, wComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(wURL, wMethod, wVars, wDone)
  {
    if (!xmlhttp) return false;
    wComplete = false;
    wMethod = wMethod.toUpperCase();

    try {
      if (wMethod == "GET")
      {
        xmlhttp.open(wMethod, wURL+"?"+wVars, true);
        wVars = "";
      }
      else
      {
        xmlhttp.open(wMethod, wURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+wURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type",
          "application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !wComplete)
        {
          wComplete = true;
          wDone(xmlhttp);
        }};
      xmlhttp.send(wVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}
