var httpAjax = false;

function ajaxLoad (url) {
	document.getElementById('page').value = url;
	httpAjax = false;
	handler = false;
	if (window.XMLHttpRequest) {
		httpAjax = new XMLHttpRequest();
		if (httpAjax.overrideMimeType) {
			httpAjax.overrideMimeType('text/xml');
		}
	} else if (window.ActiveXObject) {
		try {
			httpAjax = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				httpAjax = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				alert("Couldnīt build an AJAX instance.");
				return false;
			}
		}
	}
	try {
		httpAjax.onreadystatechange = getPage;
		
	} catch (e) {
		alert("onreadystatechange didnīt go well!");
		return false;
	}
	try {
		httpAjax.open('GET', url, true);
	} catch (e) {
		alert("Couldnīt open url.");
		return false;
	}
	try {
		httpAjax.send(null);
	} catch (e) {
		alert("Couldnīt send request.");
		return false;
	}
		// To prevent a tag to open Top
		//return true;
}

function getPage () {
	if(httpAjax.readyState == 4){
		document.getElementById("content").innerHTML = httpAjax.responseText;
		return true;
	} else {
		document.getElementById("content").innerHTML = "Laddar sidan...";
	}
}