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.ushack.net/ajax/stats.php", "quickstats", 5000);
	sendAjaxRequest("http://www.ushack.net/ajax/datetime.php", "date", 60000);
	sendAjaxRequest("http://www.ushack.net/pvpgn-status/status.php", "stats", 1200000);
}

window.onload=init;
