// JavaScript Document
//Browser Support Code
function ajaxFunction(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	}
	catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch (e){
				// Something went wrong
				alert("This function requires the use of Javascript. Please enable Javascript from the Tools menu of your web browser. We apologize for any inconvenience.");
				return false;
			}
		}
	}
	
	ajaxRequest.onreadystatechange = function(){
		if(ajaxRequest.readyState == 4  && ajaxRequest.status == 200){
			document.getElementById('searchbox-hotels').innerHTML = ajaxRequest.responseText;
		}

		if(ajaxRequest.readyState!=4){
			//document.getElementById("searchbox").innerHTML= "One moment please ...";
		}
	}
  var hotelName = document.getElementById('hotelName').value
	var cid = document.getElementById('country').value;
	var region = document.getElementById('region').value;

	var queryString = "?cid=" + cid + "&rid=" + region + "&hotelName="+ hotelName + "&rannum=" + Math.random();
	ajaxRequest.open("GET", "http://www.ucch.org/includes/searchbox-hotels.php" + queryString, true);
	ajaxRequest.send(null);
}// JavaScript Document

