/* generated Fri Feb 10 20:58:40 EST 2012 */

var oldUserRating=null;var clipTop=0;var clipWidth=500;var clipBottom=0;var topper=450;var lyrheight=0;var pictureArray=new Array();var curPhotoIndex=0;var rating=0;function openAWindow(c,b,a,d,e){window.open(c,b,"height="+a+",width="+d+",location=no,menubar=no,resizable=yes,toolbar="+e+",status=no,scrollbars=yes").focus()}function openHelpWindow(b,a){openAWindow("/help.html#"+a,"help",400,700,"yes")}function initPhotos(a){if(pictureArray.length>0){curPhotoIndex=0;document.getElementById("displayImage").src=pictureArray[0].thumburl;document.getElementById("displayImage").border=1}}function initRating(){if((rating-0)>0){document.getElementById("hotelRating").src="/images/orangestars-"+rating+".gif";document.getElementById("hotelRating").style.visibility="visible"}}function nextPhoto(a,b){curPhotoIndex+=a;if(curPhotoIndex>=pictureArray.length){curPhotoIndex=0}else{if(curPhotoIndex<0){curPhotoIndex=(pictureArray.length-1)}}document.getElementById("curPhotoID").innerHTML=(curPhotoIndex+1);document.getElementById("imageFullLink").href="/vR114/h/hotel/hotelphotos.vtl?photoidx="+curPhotoIndex+"&hid="+b;document.getElementById("displayImage").src=pictureArray[curPhotoIndex].thumburl}function setExpandLink(){if(lyrheight<clipBottom){document.getElementById("sizeControlLink").style.visibility="hidden"}else{document.getElementById("sizeControlLink").style.visibility="visible";document.getElementById("sizeControlLink").innerHTML="Expand"}}function changeContent(a){var b=document.getElementById("divContent");if(a=="description"){b.innerHTML=document.getElementById("descriptionDiv").innerHTML}else{if(a=="amenities"){b.innerHTML=document.getElementById("amenitiesDiv").innerHTML}else{if(a=="policies"){b.innerHTML=document.getElementById("policiesDiv").innerHTML}else{if(a=="roomtypes"){b.innerHTML=document.getElementById("roomTypesDiv").innerHTML}}}}setSelectedTab(a);b.style.display="block";b.style.visibility="visible";setExpandLink()}function setSelectedTab(a){document.getElementById("tabDescription").className=(a=="description")?"tabHeadingTDSelected":"tabHeadingTD";document.getElementById("tabAmenities").className=(a=="amenities")?"tabHeadingTDSelected":"tabHeadingTD";document.getElementById("tabPolicies").className=(a=="policies")?"tabHeadingTDSelected":"tabHeadingTD"}function highlightHeading(a){if(a.className=="tabHeadingTD"){a.className="tabHeadingTDOver";a.style.cursor="pointer"}}function unHighlightHeading(a){if(a.className=="tabHeadingTDOver"){a.className="tabHeadingTD";a.style.cursor="default"}}function scrollContentDiv(){var a=document.getElementById("divContent");var b=document.getElementById("sizeControlLink");if(a.style.height=="auto"){a.style.height=0;b.innerHTML.style.visbility="hidden"}else{if(clipBottom<lyrheight){a.style.height="auto";b.innerHTML="Collapse"}}}function uro(a){if(a.className=="ratingTDSelected"){return}a.style.cursor="hand";a.className="ratingTDHover"}function cur(a){if(a.className=="ratingTDSelected"){return}a.className="ratingTDUnselected"}function urc(d,b,a,c){if(oldUserRating!=null&&oldUserRating.id==d.id){return}if(oldUserRating!=null){oldUserRating.className="ratingTDUnselected"}oldUserRating=d;d.className="ratingTDSelected";jq.ajax({url:"/vR114/h/affinity?action=hotelrating&hid="+a+"&rating="+b+"&sid="+escape(c),success:function(){document.getElementById("ratingSaved").style.visibility="visible";document.getElementById("keywordArea").style.display="block"},error:function(){alert("Sorry, we could not save your rating please try again later.")}})}function allcomments(a){if(window.location.href.indexOf("?")>=0){window.location.href=window.location.href+"&"+a+"=true"}else{window.location.href=window.location.href+"?"+a+"=true"}}function moveNextToAndShow(b,d){var a=document.getElementById(d);var c=jq(b).offset();a.style.left=c.left;a.style.top=(c.top+b.offsetHeight+5);a.style.display=""}function noop(){}function atmClick(c,b,e){if(c.checked){var a=0;for(var d=0;d<document.keywordForm.atmosphere.length;d++){if(document.keywordForm.atmosphere[d].checked){a++}}if(a>3){c.checked=false;alert("You many only select up to three attributes.  Please uncheck another one if you wish to set this one.");return}}jq.ajax({type:"POST",url:"/vR114/h/affinity",data:"action=setkeyword&keyword="+c.value+"&sid="+escape(e)+"&keytoggle="+((c.checked)?"true":"false")+"&hid="+b,success:function(){document.getElementById("keywordSaved").style.display="inline";document.getElementById("commentArea").style.display="block"},error:function(){alert("There was a problem submitting your atmosphere rating.")}})}function moreBookOptions(a){if(a){jq(".moreoptions").show()}else{jq(".moreoptions").hide()}}var _lastEmailAttemptID=null;function emailresult(d,g,f,a){var h=585;var b=550;var e=0;var c="?resultid="+d+"&searchid="+g;if(a){c+="&bookingid="+a}if(typeof parent.addAdt=="function"){parent.addAdt("details/email")}var i=window.open("/s/emailresult"+c,"emailresult","scrollbars,height="+(h+e)+",width="+b+",menubar=no,toolbar=no,resizable");if(i!=null){if(f>0){_lastEmailAttemptID=f}i.focus()}}function closeAllDialogs(){jq(".ui-dialog-content").r9dialog("close");jq(".ui-dialog-content").r9popover("close")}function showTripsAjaxRegAfterClick(a){jq("body").unbind("click.hidepricesel");if(!AjaxReg.alreadyRegistered){showTripsAjaxReg(a)}else{openSaveToMyTripsDialogAfterClick(searchId,resultId,showPrice,providerCode)}}function showTripsAjaxReg(e,d,a,b,c){if(!AjaxReg.alreadyRegistered){AjaxReg.regtype="trips";AjaxReg.searchid="";AjaxReg.ui.register(function(){openSaveToMyTripsDialog(d,a,b,c)})}else{openSaveToMyTripsDialog(d,a,b,c)}}function openSaveToMyTripsDialogAfterClick(d,a,b,c){jq("body").unbind("click.hidepricesel").bind("click.hidepricesel",hidePriceSelections);openSaveToMyTripsDialog(d,a,b,c)}function openSaveToMyTripsDialog(d,a,b,c){if(!checkTripsTos()){showTripsTosBubble(d,a,b,c);return}jq.ajax({type:"POST",url:"/s/run/saveToMyTrips/chooseTrip",data:{searchId:d},dataType:"json",success:function(f){if(f.success){var e=jq(f.html);e.r9dialog({width:510}).find("#saveToMyTripsTabs").tabs();e.r9dialog("option","close",function(){e.r9dialog("destroy");e.remove()});jq("a").blur();jq("#saveToMyTripsResultId").val(a);jq("#saveToMyTripsShowPrice").val(b);jq("#saveToMyTripsProviderCode").val(c)}else{alert(f.error)}},error:function(){alert("There was an unexpected error. Please try again.")},cache:false})}function showSaveToMyTripsControls(b,a){hideSaveToMyTripsControls();jq("#"+b).addClass("selectedTrip");jq("#saveToMyTripsTripId").val(b);jq("#saveToMyTripsTripName").html(a);jq("#saveToMyTripsControls").show()}function hideSaveToMyTripsControls(){jq(".saveToMyTripsTrip").removeClass("selectedTrip");jq("#saveToMyTripsTripId").val("");jq("#saveToMyTripsTripName").html("");jq("#saveToMyTripsControls").hide();jq("#saveToMyTripsDuplicate").hide()}function saveToMyTrips(){jq.ajax({type:"POST",url:"/s/run/saveToMyTrips/save",data:{searchId:jq("#saveToMyTripsSearchId").val(),resultId:jq("#saveToMyTripsResultId").val(),showPrice:jq("#saveToMyTripsShowPrice").val(),providerCode:jq("#saveToMyTripsProviderCode").val(),encodedTripId:jq("#saveToMyTripsTripId").val()},dataType:"json",success:function(a){if(a.success){jq("#saveToMyTrips").html(a.html)}else{if(a.duplicate){hideSaveToMyTripsControls();jq("#saveToMyTripsDuplicate").html(a.error).show()}else{alert(a.error)}}},error:function(){alert("There was an unexpected error. Please try again.")},cache:false})}function saveToNewTrip(){jq("#saveToMyTripsTripId").val("");saveToMyTrips()}function checkTripsTos(){var a=false;jq.ajax({type:"POST",url:"/k/run/tripsTos/check",async:false,dataType:"json",success:function(b){if(b.success){a=b.ok}else{alert(b.error)}},error:function(){alert("There was an unexpected error. Please try again.")},cache:false});return a}function showTripsTosBubble(d,a,b,c){jq.ajax({type:"POST",url:"/k/run/tripsTos/showTosBubble",data:{searchId:d,resultId:a,showPrice:b,providerCode:c},dataType:"html",success:function(f){var e=jq(f);e.r9dialog({width:440});e.r9dialog("option","close",function(){e.r9dialog("destroy");e.remove()});jq("a").blur()},error:function(f,g,e){alert(f.statusText)},cache:false})}function sendTripsTosResponse(e,d,a,b,c){if(e){jq.ajax({type:"POST",url:"/k/run/tripsTos/accept",dataType:"json",success:function(f){if(f.success){closeAllDialogs();openSaveToMyTripsDialog(d,a,b,c)}else{alert(f.error)}},error:function(){alert("There was an unexpected error. Please try again.")},cache:false})}else{jq.ajax({type:"POST",url:"/k/run/tripsTos/showTosRejected",dataType:"html",success:function(f){jq("#tosBubble").html(f)},error:function(g,h,f){alert(g.statusText)},cache:false})}};

;var jsck_hoteldetail="v428";
/* et=2, mt=3, c=p2, i=sparkle007, v=R114, cc=2, r=none */

