var totalRooms=1;var totalAdults=4;var totalChilds=3;var numRooms=1;function validateGuests(form)
{var isCorrectAges=false;var numChildren=document.getElementById('varR_room_0_child_total').value;return validateGuests.functions[numChildren]();}
validateGuests.functions=[];validateGuests.functions[0]=function()
{return true;};validateGuests.functions[1]=function()
{return oFirstCombo.value!=-1?true:false;};validateGuests.functions[2]=function()
{if(oFirstCombo.value!=-1&&oSecondCombo.value!=-1)
{return true;}
return false;};validateGuests.functions[3]=function()
{if(oFirstCombo.value!=-1&&oSecondCombo.value!=-1&&oThirthCombo.value!=-1)
{return true;}
return false;};function submitGuestInfoForm(form,message)
{setSearchCacheID();if(validateGuests(form))
{searchHot(message);}else
{alert(textChildError);return false;}return false;}
function getValue(str,val)
{return str.replace(/\?/g,val);}
function HotelSearchHomeComponent(){}
if(HotelSearchHomeComponent.oContainer=document.getElementById('searchbox_hotel_hidenner')){
HotelSearchHomeComponent.oBottomImage=document.getElementById('searchbox_hotel_hidenner_bottom_separator');HotelSearchHomeComponent.oFirstLabelCell=document.getElementById('first_child_label');HotelSearchHomeComponent.oFirstComboCell=document.getElementById('first_child_combo');HotelSearchHomeComponent.oSecondLabelCell=document.getElementById('second_child_label');HotelSearchHomeComponent.oSecondComboCell=document.getElementById('second_child_combo');HotelSearchHomeComponent.oThirthLabelCell=document.getElementById('thirth_child_label');HotelSearchHomeComponent.oThirthComboCell=document.getElementById('thirth_child_combo');HotelSearchHomeComponent.functions=[];HotelSearchHomeComponent.functions[0]=function()
{HotelSearchHomeComponent.oContainer.style.display=HotelSearchHomeComponent.oBottomImage.style.display="none";};HotelSearchHomeComponent.functions[1]=function()
{HotelSearchHomeComponent.oFirstLabelCell.style.display="";HotelSearchHomeComponent.oFirstComboCell.style.display="";HotelSearchHomeComponent.oSecondLabelCell.style.display="none";HotelSearchHomeComponent.oSecondComboCell.style.display="none";HotelSearchHomeComponent.oThirthLabelCell.style.display="none";HotelSearchHomeComponent.oThirthComboCell.style.display="none";HotelSearchHomeComponent.oContainer.style.display=HotelSearchHomeComponent.oBottomImage.style.display="";};HotelSearchHomeComponent.functions[2]=function()
{HotelSearchHomeComponent.oFirstLabelCell.style.display="";HotelSearchHomeComponent.oFirstComboCell.style.display="";HotelSearchHomeComponent.oSecondLabelCell.style.display="";HotelSearchHomeComponent.oSecondComboCell.style.display="";HotelSearchHomeComponent.oThirthLabelCell.style.display="none";HotelSearchHomeComponent.oThirthComboCell.style.display="none";HotelSearchHomeComponent.oContainer.style.display=HotelSearchHomeComponent.oBottomImage.style.display="";};HotelSearchHomeComponent.functions[3]=function()
{HotelSearchHomeComponent.oFirstLabelCell.style.display="";HotelSearchHomeComponent.oFirstComboCell.style.display="";HotelSearchHomeComponent.oSecondLabelCell.style.display="";HotelSearchHomeComponent.oSecondComboCell.style.display="";HotelSearchHomeComponent.oThirthLabelCell.style.display="";HotelSearchHomeComponent.oThirthComboCell.style.display="";HotelSearchHomeComponent.oContainer.style.display=HotelSearchHomeComponent.oBottomImage.style.display="";};var oFirstCombo=HotelSearchHomeComponent.oFirstComboCell.childNodes[0];var oSecondCombo=HotelSearchHomeComponent.oSecondComboCell.childNodes[0];var oThirthCombo=HotelSearchHomeComponent.oThirthComboCell.childNodes[0];var nFirstAge,nSecondAge,nThirthAge=-1;function setEdades()
{nFirstAge=oFirstCombo.options[oFirstCombo.selectedIndex].value;nSecondAge=oSecondCombo.options[oSecondCombo.selectedIndex].value;nThirthAge=oThirthCombo.options[oThirthCombo.selectedIndex].value;document.getElementById('varR_EDADES').value=setEdades.values[parseInt(document.getElementById('varR_room_0_child_total').value,10)]();}
setEdades.values=[];setEdades.values[0]=function()
{return""};setEdades.values[1]=function()
{return nFirstAge;};setEdades.values[2]=function()
{return nFirstAge+","+nSecondAge;};setEdades.values[3]=function()
{return nFirstAge+","+nSecondAge+","+nThirthAge;};
}
