// Ajax
var xmlreq = false;
function loadXMLDoc(url, func) {
  try { xmlreq = new XMLHttpRequest(); }
  catch(trymicrosoft) {
    try { xmlreq = new ActiveXObject("Msxml2.XMLHTTP"); }
    catch(othermicrosoft) {
      try { xmlreq = new ActiveXObject("Microsoft.XMLHTTP"); }
      catch(failed) {
        xmlreq = false;
      }
    }
  }
  if (xmlreq) {
    xmlreq.onreadystatechange = func;
    xmlreq.open("GET", url, true);
    xmlreq.send("");
  }
}

