var xmlHttp
//getColour
function getMBrand(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	xmlHttp=GetXmlHttpObject(stateChangedgetMBrand)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 
function stateChangedgetMBrand() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("Mbrand").innerHTML=xmlHttp.responseText 
		document.getElementById("txtMtype").innerHTML="Select type" 
		document.getElementById("txtMachine").innerHTML="Select machine" 
	} 
} 
//--------------------------------------------------------

//get neck
function getMtype(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	xmlHttp=GetXmlHttpObject(stateChangedgetMtype)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 
function stateChangedgetMtype() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtMtype").innerHTML=xmlHttp.responseText 
		document.getElementById("txtMachine").innerHTML="Select machine" 
	} 
} 
//--------------------------------------------------------

//get Cloath
function getMachine(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	xmlHttp=GetXmlHttpObject(stateChangedgetMachine)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 
function stateChangedgetMachine() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtMachine").innerHTML=xmlHttp.responseText 
	} 
} 
//--------------------------------------------------------

//get sizes
function getAmo(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	xmlHttp=GetXmlHttpObject(stateChangedgetAmo)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedgetAmo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtTrDate").innerHTML=xmlHttp.responseText 
	} 
} 
//--------------------------------------------------------

//get price
function getMachinetoArray(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	xmlHttp=GetXmlHttpObject(stateChangMachinetoArray)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangMachinetoArray() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtMachinetoArray").innerHTML=xmlHttp.responseText  		
	} 
} 
//--------------------------------------------------------------

//show address
function showDevice(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	xmlHttp=GetXmlHttpObject(stateChangedProvince)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 
function stateChangedProvince() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtDevice").innerHTML=xmlHttp.responseText 
	} 
} 


function GetXmlHttpObject(handler)
{ 
var objXmlHttp=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
{ 
objXmlHttp=new ActiveXObject(strName)
objXmlHttp.onreadystatechange=handler 
return objXmlHttp
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled") 
return 
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest()
objXmlHttp.onload=handler
objXmlHttp.onerror=handler 
return objXmlHttp
}
} 



 

