var xmlHttp
function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest()	}
	else if (window.ActiveXObject)	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")	}
	if (objXMLHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	return objXMLHttp
}
///////////////// NO CHANGE ABOVE/////////////////////


//////////////// GET SUBCATEGORY WITH CATEGOEY//////////////////////
function Paging(catid,pageno,element)
{
	
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="<img src='images/ajax-loader-small.gif'>";

	var url="getsubcat.php"
	
	url=url+"?catid="+catid+"&pageno="+pageno+"&type=Paging";
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
} 
function ViewBigImage(pid,element,pos)
{
	
	xmlHttp4=GetXmlHttpObject()
	document.getElementById(element).innerHTML="<img src='images/ajax-loader-small.gif'>";

	var url="getsubcat.php"
	
	url=url+"?pid="+pid+"&type=Bigimage&pos="+pos;
	xmlHttp4.onreadystatechange=function stateChanged() { 
		if (xmlHttp4.readyState==4 || xmlHttp4.readyState=="complete")	{  
			document.getElementById(element).innerHTML=xmlHttp4.responseText } }  
	xmlHttp4.open("GET",url,true)
	xmlHttp4.send(null)
} 

