// JavaScript Document
function submitForm(){
	if(document.hotelSearchEngine.country.value == ""){
		alert("Please choose atleast destination");
		return false;
		}
		else{
			submit();
			}
	}

	function searchCriteria(str)
	{
	/*if (str=="")
	  {
		  alert("Please select a Destination");
		  //alert("testing");
		  //document.hotelSearchEngine.location.selectedIndex = 0;
		  //document.hotelSearchEngine.location.options[0].selected = true;
		  //selectOption.selectedIndex = 0;
		  //alert("testing 3");
		  //alert(selectOption.selectedIndex);
		  //selectOption.options[0].selected = true;
		  //document.hotelSearchEngine.location.options[0].selected=true;
		  //alert("error");
		  
  //document.getElementById("location").options[0].selected = true;
//	  document.getElementById("location").innerHTML="";
	  
	  return;
	  } */
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("location").innerHTML=xmlhttp.responseText;
		}
	  }
	  if (str=="")
	  {
		  alert("Please select a Destination");	
		  xmlhttp.open("GET","index.php?rt=ajax&blk=true",true);
			xmlhttp.send();  
		  return;
	  } 
	  else{
		  xmlhttp.open("GET","index.php?rt=ajax&q="+str,true);
		  xmlhttp.send();
		  }
	
	}
	function searchCriteria2(str)
	{
	if (str=="")
	  {
	  //document.getElementById("hotel").innerHTML="";
	  alert("Please select a Location");
	  return;
	  } 
	if (window.XMLHttpRequest)
	  {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	  }
	else
	  {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	  }
	xmlhttp.onreadystatechange=function()
	  {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200)
		{
		document.getElementById("hotel").innerHTML=xmlhttp.responseText;
		}
	  }
	if (str=="")
	  {
		  alert("Please select a Location");	
		  xmlhttp.open("GET","index.php?rt=ajax&blkloc=true",true);
			xmlhttp.send();  
		  return;
	  } 
	  else{
		  xmlhttp.open("GET","index.php?rt=ajax&r="+str,true);
		  xmlhttp.send();
		  }
	}


