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

function stateChanged()
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("txtResult").innerHTML=xmlHttp.responseText
}
else {

}
}

function cartData(url, qStr,catid)
{

if (url.length==0)
{
document.getElementById("txtResult").innerHTML="";
return;
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}

url=url+"?"+qStr;
url=url+"&cat_id="+catid;
url=url+"&sid="+Math.random();

xmlHttp.onreadystatechange=stateChanged;
//alert(url);
xmlHttp.open("GET",url,true) ;
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=ISO-8859-1");
xmlHttp.send(null);
}

function htmlData(url,qstring,div)
{
if (url.length==0)
{
document.getElementById(div).innerHTML="";
return;
}
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request");
return;
}

xmlHttp.onreadystatechange = function()
{
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
			document.getElementById(div).innerHTML=xmlHttp.responseText;
		}
		else
		{ 
			document.getElementById(div).innerHTML="Loading....";
		}
}
if(qstring!='')
url=url+qstring;
xmlHttp.open("GET",url,true) ;
xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=ISO-8859-1");
xmlHttp.send(null);
}

function htmlQuestion(url,qstring,div)
{
if (url.length==0)
{
document.getElementById(div).innerHTML="";
return;
}
xmlHttp1=GetXmlHttpObject()
if (xmlHttp1==null)
{
alert ("Browser does not support HTTP Request");
return;
}

xmlHttp1.onreadystatechange = function()
{
		if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")
		{ 
			document.getElementById(div).innerHTML=xmlHttp1.responseText;
		}
		else
		{ 
			document.getElementById(div).innerHTML="Loading....";
		}
}
if(qstring!='')
url=url+qstring;
xmlHttp1.open("GET",url,true) ;
xmlHttp1.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=ISO-8859-1");
xmlHttp1.send(null);
}