function getHTTPObject() {
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}

var http;

function check (obj) {
  http = new getHTTPObject();
  http.open("GET", "xml.php?" + obj.name + "=" + escape(obj.value));
  http.onreadystatechange = processCheck;
  http.send(null);
}

function processCheck() {
  if (http.readyState == 4 && http.statusText == "OK") {
    m = http.responseXML.firstChild;
    if (m.nodeName == 'xml') m = m.nextSibling;
    if (m.getAttribute('field') != '') {
      t = document.getElementById(m.getAttribute('field'))
      while (t.firstChild) t.removeChild(t.firstChild);
      if (m.firstChild != undefined) {
        var tmp = document.createTextNode(m.firstChild.nodeValue);
        t.appendChild(tmp);
      }
    }
  }
}

function showSignup() {
  document.getElementById('signupdiv').style.display = 'block';
}
