var xmlHttp

function changePage(pg,cid)
{
	 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	document.getElementById('div_pages').innerHTML = "<p align = 'center' style = 'padding-top:150px;'><img src = 'images/ajax-loader.gif' border = '0' align = 'absmiddle'></p>"; 
	
	var url="ajax/changePageContent.php";
	url=url+"?sid="+Math.random();
	url=url+"&page="+pg;
	url=url+"&catid="+cid;
	url=url+"&scatmode="+'scat';
	url=url+"&tmstmp="+new Date().getTime();	 
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	//setTimeout('xmlHttp.send(null)',2250);	
	 
}  
function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("div_pages").innerHTML=xmlHttp.responseText 
	} 
} 

