function ajload(url, target) {
  document.getElementById(target).innerHTML = '<font color="#FF0000"><b> Fetching data...</b></font>';
  
  req = GetXmlHttpObject();

  if (req==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
  
  if (req != undefined) {
    req.onreadystatechange = function() {ajDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ajDone(url, target) {
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById(target).innerHTML = req.responseText;
    } else {
      document.getElementById(target).innerHTML=" ajload Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}
