function sendAjaxRequest(url,div,timeout) {
	var xmlHttp;
	try {	
		xmlHttp=new XMLHttpRequest();// Firefox, Opera 8.0+, Safari
	}
	catch (e) {
		try {
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
		}
		catch (e) {
		    try {
				xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e) {
				alert("No AJAX!?");
				return false;
			}
		}
	}

	xmlHttp.onreadystatechange=function sendAjaxRequest(){
		if(xmlHttp.readyState==4){
			document.getElementById(div).innerHTML=xmlHttp.responseText;
		}
	}
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
	setTimeout(function(){sendAjaxRequest(url,div,timeout)},timeout);
}

function init() {
	sendAjaxRequest("http://www.ghuradio.com/global/listeners.php", "listeners", 5000);
	sendAjaxRequest("http://www.ghuradio.com/history.php", "history", 240000);
	sendAjaxRequest("http://www.ghuradio.com/global/song.php", "song", 120000);
}

window.onload=init;