  
  function OnHotelSubmitForm(path){
	  
	  var page = "0";
	  
	  location.href = path + "http://www.bookinganywhere.com";
	  
	  if(jQuery('#hotel_id').val()!= 0){
		 page = jQuery('#hotel_id').val(); 
	  }else if(jQuery('#hotel_area_id').val()!= 0){
		  page = jQuery('#hotel_area_id').val();  
	  }else if(jQuery('#hotel_city_id').val()!= 0){
		  page = jQuery('#hotel_city_id').val();  
	  }else if(jQuery('#hotel_country_id').val()!= 0){
		  page = jQuery('#hotel_country_id').val();  
	  }
	  
	  if(page != "0"){
		  location.href = page;
	  }
	  
  return false;
 }
 
  function OnHotelSubmitFormOld()
  {
    //alert(($('hotel_city_id').options[$('hotel_city_id').selectedIndex].value));
    //alert(($('hotel_id').options[$('hotel_id').selectedIndex].value));
   
    if((jQuery('#hotel_city_id').val()) == 0 && (jQuery('#hotel_id').val()) == 0){
     jQuery('#HotelSearch').attr({"action":"/hotel_country_listing.php"});
    }
    else if((jQuery('#hotel_id').val()) != 0){
    	jQuery('#HotelSearch').attr({"action":"/hotel_factsheet.php"});
    }else{
    	 jQuery('#HotelSearch').attr({"action":"/hotel_listing.php"});
    }
    return true;
  } 
  
  
 function OnSpaSubmitForm(path){
	  
	  
	  if(jQuery('#spa_id').val() != 0){
		  jQuery('#SpaSearch').attr({ action: path + "spa_factsheet.php"});
	  }else if((jQuery('#spa_city_id').val() == 0) & (jQuery('#spa_id').val() == 0) ){
		  jQuery('#SpaSearch').attr({ action: path + "spa_country_listing.php"});
	  }else{
		  jQuery('#SpaSearch').attr({ action: path + "spa_listing.php"});
	  }
  return true;
 }
  
 function OnGolfSubmitForm(path){	  
	  if(jQuery('#golf_course_id').val() != 0){
		  jQuery('#GolfSearch').attr({ action: path + "golf_factsheet.php"});
	  }else if((jQuery('#golf_city_id').val() == 0) & (jQuery('#golf_course_id').val() == 0) ){
		  jQuery('#GolfSearch').attr({ action: path + "golf_country_listing.php"});
	  }else{
		  jQuery('#GolfSearch').attr({ action: path + "golf_listing.php"});
	  }
 return true;
}



  function swapImg(element,image){
	  document.getElementById(element).src = image;
  }
  
  function showSearchMap(){
	  document.getElementById('boxHotelSearch').style.display 	= "none";
	  document.getElementById('boxGolfSearch').style.display 	= "none";
	  document.getElementById('boxSpaSearch').style.display 	= "none";
	  document.getElementById('boxMap').style.display 			= "";
  }
  
  function showHotelSearch(){
	  document.getElementById('boxHotelSearch').style.display 	= "";
	  document.getElementById('boxGolfSearch').style.display 	= "none";
	  document.getElementById('boxSpaSearch').style.display 	= "none";
	  document.getElementById('boxMap').style.display 			= "none";
  }
  function showSpaSearch(){
	  document.getElementById('boxHotelSearch').style.display 	= "none";
	  document.getElementById('boxGolfSearch').style.display 	= "none";
	  document.getElementById('boxSpaSearch').style.display 	= "";
	  document.getElementById('boxMap').style.display 			= "none";
  }
  function showGolfSearch(){
	  document.getElementById('boxHotelSearch').style.display 	= "none";
	  document.getElementById('boxGolfSearch').style.display 	= "";
	  document.getElementById('boxSpaSearch').style.display 	= "none";
	  document.getElementById('boxMap').style.display 			= "none";
  }
  
  function toggleLayerMapHotel(){
	 document.getElementById('small_map_hotel').style.display	= "";
	 document.getElementById('small_map_spa').style.display 	= "none";
	 document.getElementById('small_map_golf').style.display 	= "none";
  }
  
  function toggleLayerMapSpa(){
		 document.getElementById('small_map_hotel').style.display	= "none";
		 document.getElementById('small_map_spa').style.display 	= "";
		 document.getElementById('small_map_golf').style.display 	= "none";
  }
  
  function toggleLayerMapGolf(){
		 document.getElementById('small_map_hotel').style.display	= "none";
		 document.getElementById('small_map_spa').style.display 	= "none";
		 document.getElementById('small_map_golf').style.display 	= "";
  }


  function changeHotelCountry(country_id){
	  
  }
  
  function BtSubmitSearchShow(){
	  $("#hotel-submit-bt-act").show();
	  $("#hotel-submit-bt-hide").hide();
  }
  
function BtSubmitSearchHide(){
	  $("#hotel-submit-bt-act").hide();
	  $("#hotel-submit-bt-hide").show();
  }
  
  function changeHotelCity(path,city_id){
	  var file = path + "system/local_module/box_search/getChangeElem.php";
	  var element = "#selectHotelArea";
	  var country_id = $('#hotel_country_id').val(); 
	  
	  jQuery(element).html('<select class="select-boxsearch" disabled="disabled"><option>Loading ...</option></select>');	
	  document.getElementById('selectHotelName').innerHTML = '<select class="select-boxsearch" disabled="disabled"><option>Loading ...</option></select>';
	  BtSubmitSearchHide();
	  
	 	     jQuery.post(file, { 
	 	    	   			 'country_id':country_id
	 	    	 			,'city_id': city_id
	 	    	            ,'method' : '2'  
	 	     			  },
		        function(data){        
		          document.getElementById('selectHotelArea').innerHTML = data.area;
		          document.getElementById('selectHotelName').innerHTML = data.hotel;
		          
		          BtSubmitSearchShow();
	 	     				 
		       },"json");
  }
  
  function changeHotelCityOld(path,city_id){
	  var file = path + "system/local_module/box_search/getChangeElemOld.php";
	  
	  document.getElementById('selectHotelName').innerHTML = '<select class="select-boxsearch" disabled="disabled"><option>Loading ...</option></select>';
	  
	 	     jQuery.post(file, { 
	 	    	 			 
	 	    	 			'city_id': city_id
	 	    	            ,'method' : '2'  
	 	     			  },
		        function(data){        
	 	     				  
		          document.getElementById('selectHotelName').innerHTML = data.hotel;
	 	     				 
		       },"json");
  }
  
  
  function changeHotelArea(path,area_id){
	  var file = path + "system/local_module/box_search/getChangeElem.php";
	  var element = "#selectHotelName";
	  var city_id = $('#hotel_city_id').val();
	  var country_id = $('#hotel_country_id').val(); 
	  
	  document.getElementById('selectHotelName').innerHTML = '<select class="select-boxsearch" disabled="disabled"><option>Loading ...</option></select>';
	  BtSubmitSearchHide();
	  jQuery.post(file, { 
		   'country_id':country_id
          ,'city_id':city_id
		  ,'area_id': area_id
          ,'method' : '3'  
		  },
			function(data){        
			document.getElementById('selectHotelName').innerHTML = data.hotel;
			BtSubmitSearchShow();
						 
			},"json"
			);
  }
  
  
  function changeSpaCity(path,city_id){
	  var file = path + "system/local_module/box_search/getChangeElem.php";
	  var element = "#selectSpaName";
	  
	  jQuery(element).html('<select class="select-boxsearch" disabled="disabled"><option>Loading ...</option></select>');	
	 
	 	     jQuery.post(file, { 
	 	    	             'city_id': city_id
	 	    	            ,'method' : '4'  
	 	     			  },
		        function(data){        
		          document.getElementById('selectSpaName').innerHTML = data.spa;	 	     				 
		       },"json");
  }
  
  function changeGolfCity(path,city_id){
	  var file = path + "system/local_module/box_search/getChangeElem.php";
	  var element = "#selectGolfName";
	  
	  jQuery(element).html('<select class="select-boxsearch" disabled="disabled"><option>Loading ...</option></select>');	
	 
	 	     jQuery.post(file, { 
	 	    	             'city_id': city_id
	 	    	            ,'method' : '5'  
	 	     			  },
		        function(data){        
		          document.getElementById('selectGolfName').innerHTML = data.golf;	 	     				 
		       },"json");
  }
  
 
  