var http = null;
var layer_id;

function getContent(url, layer)
{
  layer_id = layer;
  
  if (window.XMLHttpRequest) {
     http = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
     http = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (http != null) {
     http.open("GET", url, true);
     http.onreadystatechange = showContent;
     http.send(null);
  }
}

function showContent() {
   if (http.readyState == 4) {
      document.getElementById(layer_id).innerHTML =
         http.responseText;
   }
}
