var xmlHttp
<!-- Begin Function 'showHotel' Structure --> 
function showHotel(str, by)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	
	var url="components/com_reservation/gethotel.php"
	
	url=url+"?q="+str+"&by="+by+"&Region="+document.getElementById('RegionName').value+"&Provincy="+document.getElementById('ProvincyName').value+"&Area="+document.getElementById('AreaName').value
	//url=url+"?q="+str+"&type="+document.getElementById('Type').value+"&area="+document.getElementById('AreaName').value
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChangedTypeHotel
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChangedTypeHotel()
{ 
	try{
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
			document.getElementById("Supporter").innerHTML=xmlHttp.responseText			
		}	else	{	
			document.getElementById("Supporter").innerHTML="<image src='images/others/loading1.gif' width='32' height='32'><b>Checking availability...</b>";
		}
	}
	catch(e){
		// caught an error
		alert('Response failed.');		
	}
}
<!-- End Function 'showHotel' Structure --> 

<!-- Begin Function 'showProduct' Structure --> 
function showProduct(str, by)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	
	var url="components/com_reservation/getproduct.php"
	
	url=url+"?q="+str+"&by="+by
	url=url+"&sid="+Math.random()
	xmlHttp.onreadystatechange=stateChangedTypeProduct
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChangedTypeProduct()
{ 
	try{
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
			document.getElementById("Product").innerHTML=xmlHttp.responseText			
		}	else	{	
			document.getElementById("Product").innerHTML="<image src='images/others/loading1.gif' width='32' height='32'><b>Checking availability...</b>";
		}
	}
	catch(e){
		// caught an error
		alert('Response failed.');		
	}
}
<!-- End Function 'showHotel' Structure --> 

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		//Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}	
	return xmlHttp;
}
