var req;
 function CreateXMLRequest(){
	ua = navigator.userAgent.toLowerCase();
	if (!window.ActiveXObject)
	{
		request = new XMLHttpRequest();
	}
	else if (ua.indexOf('msie 5') == -1)
	{
		request = new ActiveXObject("Msxml2.XMLHTTP");
	}
	else
	{
		request = new ActiveXObject("Microsoft.XMLHTTP");
	}

	return request;
}

function loadPage(x){
	INN = document.getElementById('inner');
	req = CreateXMLRequest();
	if(!req){
		INN.innerHTML = "Ajax not available, sorry, but you cant use the site then!";
	}else{
		INN.innerHTML = '<h2>Loading...</h2><img src="images/process.gif">';
		req.onreadystatechange=function(){
			if(req.readyState==4){
				//if(req.status==200){
					INN.innerHTML = request.responseText;
				/*}else{
					INN.innerHTML = "Failed to load page, please try again..." + req.status;
				}*/
			}
		};
		req.open("GET",x + "?a=ajax",true);
		req.send(null);
	}
	
}

