// JavaScript Document

var xmlHttp

function getMeSubCategory(id)
{ 
	//alert(id);
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="page/ajaxProducts/getSubCategoryfromDB.php"
	url=url+"?param="+id
	url=url+"&sid="+Math.random()
	xmlHttp.open("GET",url,true)
	xmlHttp.onreadystatechange=stateChanged
	
	xmlHttp.send(null)
}


function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("txtSubCategory").value = '0';
document.getElementById("cmbSubCategory").style.display="none";
document.getElementById("divForSubCategory").innerHTML=xmlHttp.responseText 

} 
} 

function getMeSubSubCategory(id)
{ 
	//alert(id);
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="page/ajaxProducts/getSubSubCategoryfromDB.php"
	url=url+"?param="+id
	url=url+"&sid="+Math.random()
	xmlHttp.open("GET",url,true)
	xmlHttp.onreadystatechange=stateChangedSub
	
	xmlHttp.send(null)
}


function stateChangedSub() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
document.getElementById("txtSubSubCategory").value = '0';
document.getElementById("cmbSubSubCategory").style.display="none";
document.getElementById("divForSubSubCategory").innerHTML=xmlHttp.responseText 

} 
} 





function getMeSubSubSubCategory(id)
{ 
	//alert(id);
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	
	var url="page/ajaxProducts/getSubSubSubCategoryfromDB.php"
	url=url+"?param="+id
	url=url+"&sid="+Math.random()
	xmlHttp.open("GET",url,true)
	xmlHttp.onreadystatechange=stateChangedSubSub
	
	xmlHttp.send(null)
}


function stateChangedSubSub() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("txtSubSubSubCategory").value = '0';
document.getElementById("cmbSubSubSubCategory").style.display="none";
document.getElementById("divForSubSubSubCategory").innerHTML=xmlHttp.responseText 

} 
} 




function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}

