
function ahah(url, target) {
  document.getElementById(target).innerHTML='<div align="center" style="font-size:18px; font-weight:bold; height:85px;"><img src="../../images/animated_progress.gif"> Loading Biography...</div>';
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ahahDone(url, target) {
  document.getElementById(target).innerHTML='<div align="center" style="font-size:18px; font-weight:bold; height:85px;"><img src="../../images/animated_progress.gif"> Loading Biography...</div>';
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById(target).innerHTML=req.responseText+'<div align="center"><a href="#" class="min_link" onClick="unloadd(\''+url+'?disp=up\', \''+target+'\'); return false;">Minimize <img src="../images/up.gif" border="0"></a></div>';
    } else {
      document.getElementById(target).innerHTML="Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function loadd(name, div) {
	ahah(name,div);
	return false;
}



function unload_text(url, target) {
  document.getElementById(target).innerHTML='<div align="center" style="font-size:18px; font-weight:bold; height:85px;"><img src="../../images/animated_progress.gif"> Unloading Biography...</div>';
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {unload_textDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function unload_textDone(url, target) {
  document.getElementById(target).innerHTML='<div align="center" style="font-size:18px; font-weight:bold; height:85px;"><img src="../../images/animated_progress.gif"> Unloading Biography...</div>';
  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="Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function unloadd(name, div) {
	unload_text(name,div);
	return false;
}

