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('content');
	req = CreateXMLRequest();
	if(!req){
		INN.innerHTML = "Ajax not available, sorry, but you cant use the site then!";
	}else{
		INN.innerHTML = '<center><h2>Loading...</h2><img src="images/process.gif" alt="ajax loading"></center>';
		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;
				}*/
			}
		};
		if(x.search("category") > -1){
      v = "&";
		}else{
      v = "?";
		}
		req.open("GET",x + v + "a=",true);
		req.send(null);
	}
	
}
