/* Copyright (c) 1995-2008 Choice Hotels International, Inc. All Rights Reserved. */
var focusHasBeenSet=false;function setFocusToFirstFormField(form_flds){var field;for(i=0;i<form_flds.length;i++){field=form_flds.elements[i];if((field.type!="hidden")&&!field.disabled&&!field.style=="display: none"){if((field.type=="text")||(field.type=="password")||(field.type=="textarea")){field.focus();break}}}};function appendSearchArrival(theLink){href=theLink.href;var placename="";if(document.datesform.placename){placename=document.datesform.placename.value}var state_country="";if(document.datesform.state_country){state_country=document.datesform.state_country.value}var country="";if(document.datesform.country){country=document.datesform.country.value}var month=document.datesform.month.value;var day=document.datesform.day.value;var depart_month=document.datesform.depart_month.value;var depart_day=document.datesform.depart_day.value;var nroom=document.datesform.nroom.value;var nadult1=document.datesform.nadult1.value;var nchild1=document.datesform.nchild1.value;var nadult2=document.datesform.nadult2.value;var nchild2=document.datesform.nchild2.value;var nadult3=document.datesform.nadult3.value;var nchild3=document.datesform.nchild3.value;var nadult4=document.datesform.nadult4.value;var nchild4=document.datesform.nchild4.value;var nadult5=document.datesform.nadult5.value;var nchild5=document.datesform.nchild5.value;var sresults="&placename="+placename+"&state_country="+state_country+"&country="+country+"&month="+month+"&day="+day+"&depart_month="+depart_month+"&depart_day="+depart_day+"&nroom="+nroom+"&nadult1="+nadult1+"&nchild1="+nchild1+"&nadult2="+nadult2+"&nchild2="+nchild2+"&nadult3="+nadult3+"&nchild3="+nchild3+"&nadult4="+nadult4+"&nchild4="+nchild4+"&nadult5="+nadult5+"&nchild5="+nchild5;theLink.href=href+sresults};function displayAdultChildrenDropdowns(startIndex,endIndex,lastIndex,adultPrefix,childPrefix,extrabedPrefix,adultLabelId,childLabelId,extrabedLabelId){var showStyle="display";showAdultChildrenDropdowns(showStyle,startIndex,endIndex,lastIndex,adultPrefix,childPrefix,extrabedPrefix,adultLabelId,childLabelId,extrabedLabelId)};function viewAdultChildrenDropdowns(startIndex,endIndex,lastIndex,adultPrefix,childPrefix,extrabedPrefix,adultLabelId,childLabelId,extrabedLabelId){var showStyle="visibility";showAdultChildrenDropdowns(showStyle,startIndex,endIndex,lastIndex,adultPrefix,childPrefix,extrabedPrefix,adultLabelId,childLabelId,extrabedLabelId)};function showAdultChildrenDropdowns(showStyle,startIndex,endIndex,lastIndex,adultPrefix,childPrefix,extrabedPrefix,adultLabelId,childLabelId,extrabedLabelId){var show;switch(showStyle){case "display":;show={style:"display",yes:"inline",no:"none"};break;case "visibility":;show={style:"visibility",yes:"visible",no:"hidden"};break}for(i=startIndex;i<endIndex+1;i++){document.getElementById(adultPrefix+i).style[show.style]=show.yes;document.getElementById(childPrefix+i).style[show.style]=show.yes;if(extrabedPrefix&&document.getElementById(extrabedPrefix+i)){document.getElementById(extrabedPrefix+i).style[show.style]=show.yes}}for(i=endIndex+1;i<lastIndex+1;i++){document.getElementById(adultPrefix+i).style[show.style]=show.no;document.getElementById(childPrefix+i).style[show.style]=show.no;if(extrabedPrefix&&document.getElementById(extrabedPrefix+i)){document.getElementById(extrabedPrefix+i).style[show.style]=show.no}}var showOption=(startIndex>endIndex)?show.no:show.yes;if(adultLabelId){document.getElementById(adultLabelId).style[show.style]=showOption}if(childLabelId){document.getElementById(childLabelId).style[show.style]=showOption}if(extrabedLabelId&&document.getElementById(extrabedLabelId)){document.getElementById(extrabedLabelId).style[show.style]=showOption}};function multiAdultChildrenDropdowns(startIndex,endIndex,lastIndex,adultLabelId,childLabelId,extrabedLabelId,dropRowId){for(var i=startIndex;i<=endIndex;i++)if(i<=3)$("#"+dropRowId+i).css("visibility","visible");else $("#"+dropRowId+i).css("display","");for(i=endIndex+1;i<=lastIndex;i++)if(i<=3)$("#"+dropRowId+i).css("visibility","hidden");else $("#"+dropRowId+i).css("display","none");var option=(startIndex>endIndex)?"hidden":"visible";if(adultLabelId)$("#"+adultLabelId).css("visibility",option);if(childLabelId)$("#"+childLabelId).css("visibility",option);if(extrabedLabelId&&document.getElementById(extrabedLabelId))$("#"+extrabedLabelId).css("visibility",option)};function setReserveUpdateVisibility(){document.getElementById("div_reserve").style.display="none";document.getElementById("div_update1").style.display="inline";document.getElementById("div_update2").style.display="inline"};function maskElement(element){if(Ext.getDom(element))Ext.getDom(element).style.display="none"};function showElement(element){if(Ext.getDom(element))Ext.getDom(element).style.display=""};function setHomeAddressCountry(countrycode){setAddressCountry(countrycode,"section.h")};function setBusinessAddressCountry(countrycode){setAddressCountry(countrycode,"section.b")};function setAddressCountry(countrycode,elemPrefix){switch(countrycode){case "AL":;maskElement(elemPrefix+"state");maskElement(elemPrefix+"zip");showElement(elemPrefix+"county");maskElement(elemPrefix+"district");maskElement(elemPrefix+"suburb");break;case "IE":;maskElement(elemPrefix+"state");maskElement(elemPrefix+"zip");showElement(elemPrefix+"county");showElement(elemPrefix+"district");maskElement(elemPrefix+"suburb");break;case "FJ":;maskElement(elemPrefix+"state");maskElement(elemPrefix+"zip");maskElement(elemPrefix+"county");maskElement(elemPrefix+"district");maskElement(elemPrefix+"suburb");break;case "PG":;showElement(elemPrefix+"state");showElement(elemPrefix+"zip");maskElement(elemPrefix+"county");maskElement(elemPrefix+"district");showElement(elemPrefix+"suburb");break;case "AU":;case "CA":;case "ES":;case "IT":;case "MX":;case "US":;showElement(elemPrefix+"state");showElement(elemPrefix+"zip");maskElement(elemPrefix+"county");maskElement(elemPrefix+"district");maskElement(elemPrefix+"suburb");break;case "":;showElement(elemPrefix+"state");showElement(elemPrefix+"zip");showElement(elemPrefix+"county");showElement(elemPrefix+"district");maskElement(elemPrefix+"suburb");break;default: ;maskElement(elemPrefix+"state");showElement(elemPrefix+"zip");maskElement(elemPrefix+"county");maskElement(elemPrefix+"district");maskElement(elemPrefix+"suburb");break}};function removeDispensableValues(countrycode,statefieldname,zipfieldname,countyfieldname){switch(countrycode){case "FJ":;Ext.getDom(countyfieldname).value="";case "AL":;case "IE":;Ext.getDom(zipfieldname).value="";Ext.getDom(statefieldname).value="";break;case "AU":;case "PG":;case "CA":;case "ES":;case "IT":;case "MX":;case "US":;Ext.getDom(countyfieldname).value="";break;default: ;Ext.getDom(statefieldname).value="";Ext.getDom(countyfieldname).value="";break}};function enableJSOnlyFeatures(){$(".showWithJSOnly").removeClass('hide');$(".hideWithJSOnly").addClass('hide')};