// JavaScript Document
var CountryHotel = 8;
var CityHotel = 0;
//////////////////////////
function mod_countryHotel(CountryHotel){
	// - > Put the country values inside the select DOM element <option>
 	for(i=0;i<aPaisHotel.length;i++){
		paisNameHotel = aPaisHotel[i];
	 	if(paisNameHotel != null){ // ->comprueba que no este vacio	
			addOption(document.HotForm.country, i , paisNameHotel);
		}
	}
	document.HotForm.country.options[CountryHotel].selected=true;
}
function mod_cities_Hotels(countryValue){
	removeAllOptions(document.HotForm.CityName);
	for(j = 0; j< aCityHotel[countryValue].length; j+=2){
	 cityName = aCityHotel[countryValue][j];
	addOption(document.HotForm.CityName, aCityHotel[countryValue][j+1] , cityName);
  	}
}



function Interaction_Hotel(){
	
	// - 3rst FORM
	// - on Country Change
	var selectmenu=document.HotForm.country;
	selectmenu.onchange=function(){
	var chosenoption=this.options[this.selectedIndex] 
	  if (chosenoption.value!=""){
		 mod_cities_Hotels(chosenoption.value);
	  }
	}
	// On Change City Select
	var selectmenu=document.HotForm.CityName;
	  selectmenu.onchange=function(){
	  var chosenoption=this.options[this.selectedIndex] 
		  if (chosenoption.value!=""){
			//alert(chosenoption.value);
		  }
	  }
	
}
function Interface_Hotel(){
	Interaction_Hotel();
	mod_countryHotel(CountryHotel);
	mod_cities_Hotels(CountryHotel);
	document.HotForm.CityName.options[CityHotel].selected=true;
}
function ResetInputs_Hotel(){
	removeAllOptions(document.HotForm.country);
	removeAllOptions(document.HotForm.CityName);
	Interface_Hotel();
}
