function includeFile(url, target,otherwise) {
//x
try{
   if(document.getElementById(target)) document.getElementById(target).innerHTML = ' Fetching data...';
 if (window.XMLHttpRequest) {
  req = new XMLHttpRequest();
 } else if (window.ActiveXObject) {
  req = new ActiveXObject("Microsoft.XMLHTTP");
 }
 if (req != undefined) {
  req.onreadystatechange = function() {ahahDone(url, target,otherwise);};
 req.open("GET", url, true);
  req.send("");
 }
}catch(e){}
}  

function ahahDone(url, target,otherwise) {
 if (req.readyState == 4) { // only if req is "loaded"
  if (req.status == 200) { // only if "OK"
   if(document.getElementById(target)) document.getElementById(target).innerHTML = req.responseText 
  } else {
   if(document.getElementById(target)){
    if(otherwise!=null){
     document.getElementById(target).innerHTML = otherwise
    }else{
     document.getElementById(target).innerHTML=req.status+' '+url
    }
   }
  }
 }
}

 
