var target="";

function loader(obj,dest){
	try{
		xmlhttp = window.XMLHttpRequest?new XMLHttpRequest():
		new ActiveXObject("Microsoft.XMLHTTP");
	}
	catch(e){}

	document.getElementById(dest).innerHTML ="<center><img src='images/loading.gif'></center>";

	target=dest;
	xmlhttp.onreadystatechange = loaderDone;
	xmlhttp.open("GET",obj);
	xmlhttp.send(null);
	return false;
}

function loaderDone(){
	if(xmlhttp.readyState==4){
		if(xmlhttp.status == 200){
			document.getElementById(target).innerHTML = xmlhttp.responseText;
		}
	}
}
