var xmlHttp

function showCatBrand(grpId,catId, brand)
{	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="../ProdRetail/getCategory.asp"
	url=url+"?grpId="+grpId
	url=url+"&catId="+catId
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=catChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function showCategory(grpId,catId, brand)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	//if ((branch=='NA')||(salesGrp=='NA')) {
	//	return
	//}

	var url="../ProdRetail/getCategory.asp"
	url=url+"?grpId="+grpId
	url=url+"&catId="+catId
	//url=url+"&cube="+cube
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=catChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function showBrand(grpId,catId, brand)
{ 	
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	//if ((branch=='NA')||(salesGrp=='NA')) {
	//	return
	//}

	var url="../ProdRetail/getBrand.asp"
	url=url+"?grpId="+grpId
	url=url+"&catId="+catId
	//url=url+"&cube="+cube
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=brandChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function catChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("tdCategory").innerHTML=xmlHttp.responseText 
	} 
} 

function brandChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("tdBrand").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
}