function CreateXmlHttpObject(handler)
{ 
var objXmlHttpReq=null

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP"
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP"
} 
try
{ 
objXmlHttpReq=new ActiveXObject(strName)
objXmlHttpReq.onreadystatechange=handler 
return objXmlHttpReq
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled") 
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttpReq=new XMLHttpRequest()
objXmlHttpReq.onload=handler
objXmlHttpReq.onerror=handler 
return objXmlHttpReq
}
} 


//function showCategoryRecord(ItemNum)
//{ 
//	if (ItemNum.length==0)
//	{ 
//		document.getElementById("ProductColors").innerHTML=""
//		return
//	}
	

//var WebURL="Colors.asp?ItemNum=" + ItemNum

//xmlHttpReq=CreateXmlHttpObject(changeOfState)
//xmlHttpReq.open("GET", WebURL, true)
//xmlHttpReq.send(null)
//} 

function showCategoryColors(ItemNum)
{ 

if (ItemNum.length==0)
{ 
document.getElementById("ProductColors").innerHTML=""
return
}
var WebURL="Colors.asp?ItemNum=" + ItemNum
xmlHttpReq=CreateXmlHttpObject(changeOfStateColors)
xmlHttpReq.open("GET", WebURL, true)
xmlHttpReq.send(null)
} 

function changeOfStateColors() 
{ 
if (xmlHttpReq.readyState==4)
{ 
document.getElementById("ProductColors").innerHTML=xmlHttpReq.responseText 
} 
} 

