var htmHttp = (window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); 
var h = null;

function hol(p) {
	if((htmHttp.readyState==0 || htmHttp.readyState==4) && h==null) {
		h = p;
		htmHttp.open("GET","load.php5?page="+encodeURIComponent(p),true);
		htmHttp.onreadystatechange = nem;
		htmHttp.send(null);
		return true;
	} else return false;
}
	
function nem() {
	if(htmHttp.readyState==4 && htmHttp.status==200) {
		document.getElementById("cnt").innerHTML = '<a name="'+h+'"></a>'+htmHttp.responseText;
		document.location.hash = "#"+h;
		h = null;
	} else if(htmHttp.readyState==4 && htmHttp.status!=200) {
		document.location.href = h+".html";
	}
}
