var http;

function load(){
	if (window.XMLHttpRequest){
		http = new XMLHttpRequest();
	}
	else{
		http=new ActiveXObject("Microsoft.XMLHTTP");
	}
	 
	http.open("GET","http://people.dsv.su.se/~pierre/home/my_hits",true);
	
	http.onreadystatechange = function(){
		if(http.readyState == 4){
			document.getElementById("hits").firstChild.nodeValue = http.responseText;		
		}
	}
	
	http.send(null);
	window.setInterval(update, 1000);
}

function update(){
	http.open("GET","http://people.dsv.su.se/~pierre/home/my_hits",true);
	http.send(null);
}
