Array.prototype.clear=function(){this.length=0
};
function findSelect(a){return a!=undefined&&String(a.nodeName)=="SELECT"
}function updateOrCreateSelect(xml){var str="("+xml.responseText.replace(/;$/,"")+")";
var obj=eval(str);
var countrySelect=xml.argument;
var citySelect=document.getElementById("hotel-location-city");
citySelect.selectedIndex=-1;
citySelect.options.length=1;
for(var i=0;
i<obj.length;
i++){var o=obj[i];
citySelect.options[i+1]=new Option(o.Title,o.Code,false,false)
}citySelect.enabled=true
}function reloadCities(a){document.getElementById("hotel-location-country").enabled=false;
YAHOO.util.Connect.asyncRequest("GET",(window.contextPath!=undefined?window.contextPath:"")+"/fm/cp2/hotels/cities.js?"+this.name+"="+encodeURIComponent(this.value),{success:updateOrCreateSelect,failure:function(){alert("Could not load cities from database!")
},argument:this},null)
}var country=document.getElementById("hotel-location-country");
YAHOO.util.Event.addListener(country,"change",reloadCities,country);
if(document.getElementById("hotel-location-city")&&(document.getElementById("hotel-location-city").selectedIndex==-1||document.getElementById("hotel-location-city").options.length<=1)){YAHOO.util.Event.onDOMReady(reloadCities,null,country)
}(function(){var b=document.getElementById("hotel-room-type");
var a=document.getElementById("hotel-guest-extra");
if(b){b.onchange=function(){a.disabled=b.value=="SGL";
if(a.disabled){a.checked=false
}}
}if(a){a.onchange=function(){if(a.checked&&b.value=="SGL"){b.value="DBL";
b.selectedIndex=1
}}
}})();