function loadtable(url, id) {
  var xmlhttp = null;
  if (window.XMLHttpRequest) {// Firefox, Opera, IE7
    xmlhttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject) {// IE6, IE5
    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (xmlhttp != null) {
    xmlhttp.onreadystatechange = function() { ontableloaded(xmlhttp, id); };
    xmlhttp.open("GET", url, true);
    xmlhttp.send(null);
  }
  else {
    // browser does not support XMLHTTP
  }
}

function ontableloaded(xmlhttp, id) {
  if (xmlhttp.readyState == 4) {
    if (xmlhttp.status == 200) {
      document.getElementById(id).innerHTML = xmlhttp.responseText;
    }
    else {
      document.getElementById(id).innerHTML = "";
    }
  }
}

