function ahah(url,target) {
  document.getElementById(target).innerHTML = '<center><blink>...loading...</blink></center>';
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
    req.onreadystatechange = function() {ahahDone(target);};
    req.open("GET",url+'?GUINUM='+Math.floor(Math.random()*99999999999999999),true);
    //Netscape implementation to check for success
    //alert(url+'?GUINUM='+Math.floor(Math.random()*99999999999999999));
    req.send(null);
  }  else if (window.ActiveXObject) {
      req = new ActiveXObject("Microsoft.XMLHTTP");
      if (req) {
        req.onreadystatechange = function() {ahahDone(target);};
        req.open("GET",url+'?GUINUM='+Math.floor(Math.random()*99999999999999999),true);
        //Microsoft implementation to check for success
        //alert(url+'?GUINUM='+Math.floor(Math.random()*99999999999999999));
        req.send(null);
      }
  }
}

function ahahDone(target) {
  // only if req is "loaded"
  if (req.readyState == 4) {
    // only if "OK"
    if (req.status == 200 || req.status == 304) {
      results = req.responseText;
      document.getElementById(target).innerHTML = results;
  } else {
      document.getElementById(target).innerHtml = "ahah error:\n" + req.statusText;
    }
  }
}
