if(typeof deconcept=="undefined"){var deconcept={}}if(typeof deconcept.util=="undefined"){deconcept.util={}}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil={}}deconcept.SWFObject=function(E,C,K,F,H,J,L,G,A,D){if(!document.getElementById){return }this.DETECT_KEY=D?D:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(E){this.setAttribute("swf",E)}if(C){this.setAttribute("id",C)}if(K){this.setAttribute("width",K)}if(F){this.setAttribute("height",F)}if(H){this.setAttribute("version",new deconcept.PlayerVersion(H.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(J){this.addParam("bgcolor",J)}var B=L?L:"high";this.addParam("quality",B);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var I=(G)?G:window.location;this.setAttribute("xiRedirectUrl",I);this.setAttribute("redirectUrl","");if(A){this.setAttribute("redirectUrl",A)}};deconcept.SWFObject.prototype={useExpressInstall:function(A){this.xiSWFPath=!A?"expressinstall.swf":A;this.setAttribute("useExpressInstall",true)},setAttribute:function(A,B){this.attributes[A]=B},getAttribute:function(A){return this.attributes[A]||""},addParam:function(A,B){this.params[A]=B},getParams:function(){return this.params},addVariable:function(A,B){this.variables[A]=B},getVariable:function(A){return this.variables[A]||""},getVariables:function(){return this.variables},getVariablePairs:function(){var A=[];var B;var C=this.getVariables();for(B in C){A[A.length]=B+"="+C[B]}return A},getSWFHTML:function(){var D="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}D='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'"';D+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var C=this.getParams();for(var A in C){D+=[A]+'="'+C[A]+'" '}var B=this.getVariablePairs().join("&");if(B.length>0){D+='flashvars="'+B+'"'}D+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}D='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+(this.getAttribute("style")||"")+'">';D+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var C=this.getParams();for(var A in C){D+='<param name="'+A+'" value="'+C[A]+'" />'}var B=this.getVariablePairs().join("&");if(B.length>0){D+='<param name="flashvars" value="'+B+'" />'}D+="</object>"}return D},write:function(A){if(this.getAttribute("useExpressInstall")){var B=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(B)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var C=(typeof A=="string")?document.getElementById(A):A;C.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var C=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var A=navigator.plugins["Shockwave Flash"];if(A&&A.description){C=new deconcept.PlayerVersion(A.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var D=1;var B=3;while(D){try{B++;D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+B);C=new deconcept.PlayerVersion([B,0,0])}catch(E){D=null}}}else{try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(E){try{var D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");C=new deconcept.PlayerVersion([6,0,21]);D.AllowScriptAccess="always"}catch(E){if(C.major==6){return C}}try{D=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(E){}}if(D!=null){C=new deconcept.PlayerVersion(D.GetVariable("$version").split(" ")[1].split(","))}}}return C};deconcept.PlayerVersion=function(A){this.major=A[0]!=null?parseInt(A[0]):0;this.minor=A[1]!=null?parseInt(A[1]):0;this.rev=A[2]!=null?parseInt(A[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(A){if(this.major<A.major){return false}if(this.major>A.major){return true}if(this.minor<A.minor){return false}if(this.minor>A.minor){return true}if(this.rev<A.rev){return false}return true};deconcept.util={getRequestParameter:function(D){var C=document.location.search||document.location.hash;if(D==null){return C}if(C){var B=C.substring(1).split("&");for(var A=0;A<B.length;A++){if(B[A].substring(0,B[A].indexOf("="))==D){return B[A].substring((B[A].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var C=document.getElementsByTagName("OBJECT");for(var B=C.length-1;B>=0;B--){C[B].style.display="none";for(var A in C[B]){if(typeof C[B][A]=="function"){C[B][A]=function(){}}}}};if(!document.getElementById&&document.all){document.getElementById=function(A){return document.all[A]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.ValidatorCalloutBehavior=function AjaxControlToolkit$ValidatorCalloutBehavior(A){AjaxControlToolkit.ValidatorCalloutBehavior.initializeBase(this,[A]);this._warningIconImageUrl=null;this._closeImageUrl=null;this._cssClass="ajax__validatorcallout";this._highlightCssClass=null;this._width="200px";this._invalid=false;this._originalValidationMethod=null;this._validationMethodOverride=null;this._elementToValidate=null;this._popupTable=null;this._errorMessageCell=null;this._calloutArrowCell=null;this._warningIconImage=null;this._closeImage=null;this._closeCellInnerDiv=null;this._popupBehavior=null;this._onShowJson=null;this._onHideJson=null;this._focusAttached=false;this._isBuilt=false;this._focusHandler=Function.createDelegate(this,this._onfocus);this._closeClickHandler=Function.createDelegate(this,this._oncloseClick)};AjaxControlToolkit.ValidatorCalloutBehavior.prototype={initialize:function(){AjaxControlToolkit.ValidatorCalloutBehavior.callBaseMethod(this,"initialize");var B=this.get_element();if(B.evaluationfunction){this._originalValidationMethod=Function.createDelegate(B,B.evaluationfunction);this._validationMethodOverride=Function.createDelegate(this,this._onvalidate);B.evaluationfunction=this._validationMethodOverride}var A=this.get_ClientState();if((null!=A)&&(""!==A)){this._ensureCallout();if(this._highlightCssClass){Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass)}this.show()}},_ensureCallout:function(){if(!this._isBuilt){var E=this.get_element();var F=this._elementToValidate=$get(E.controltovalidate);var M=document.createElement("tbody");var A=document.createElement("tr");var Q=document.createElement("td");var C=document.createElement("table");var S=document.createElement("tbody");var B=document.createElement("tr");var H=document.createElement("td");var O=document.createElement("td");var J=this._closeCellInnerDiv=document.createElement("div");var R=this._popupTable=document.createElement("table");var I=this._calloutArrowCell=document.createElement("td");var G=this._warningIconImage=document.createElement("img");var D=this._closeImage=document.createElement("img");var N=this._errorMessageCell=document.createElement("td");R.id=this.get_id()+"_popupTable";R.cellPadding=0;R.cellSpacing=0;R.border=0;R.width=this.get_width();R.className=this._cssClass+" ajax__validatorcallout_popup_table";A.className="ajax__validatorcallout_popup_table_row";Q.className="ajax__validatorcallout_callout_cell";C.cellPadding=0;C.cellSpacing=0;C.border=0;C.className="ajax__validatorcallout_callout_table";B.className="ajax__validatorcallout_callout_table_row";I.className="ajax__validatorcallout_callout_arrow_cell";H.className="ajax__validatorcallout_icon_cell";G.border=0;G.src=this.get_warningIconImageUrl();N.className="ajax__validatorcallout_error_message_cell";N.innerHTML=this._getErrorMessage();O.className="ajax__validatorcallout_close_button_cell";J.className="ajax__validatorcallout_innerdiv";D.src=this.get_closeImageUrl();E.parentNode.appendChild(R);R.appendChild(M);M.appendChild(A);A.appendChild(Q);Q.appendChild(C);C.appendChild(S);S.appendChild(B);B.appendChild(I);A.appendChild(H);H.appendChild(G);A.appendChild(N);A.appendChild(O);J.appendChild(D);O.appendChild(J);var L=document.createElement("div");L.className="ajax__validatorcallout_innerdiv";I.appendChild(L);for(var P=14;P>0;P--){var K=document.createElement("div");K.style.width=P.toString()+"px";L.appendChild(K)}this._popupBehavior=$create(AjaxControlToolkit.PopupBehavior,{positioningMode:AjaxControlToolkit.PositioningMode.Absolute,parentElement:F},{},null,this._popupTable);if(this._onShowJson){this._popupBehavior.set_onShow(this._onShowJson)}if(this._onHideJson){this._popupBehavior.set_onHide(this._onHideJson)}$addHandler(this._closeCellInnerDiv,"click",this._closeClickHandler);this._isBuilt=true}},dispose:function(){if(this._isBuilt){this.hide();if(this._focusAttached){$removeHandler(this._elementToValidate,"focus",this._focusHandler);this._focusAttached=false}$removeHandler(this._closeCellInnerDiv,"click",this._closeClickHandler);this._onShowJson=null;this._onHideJson=null;if(this._popupBehavior){this._popupBehavior.dispose();this._popupBehavior=null}if(this._closeBehavior){this._closeBehavior.dispose();this._closeBehavior=null}if(this._popupTable){this._popupTable.parentNode.removeChild(this._popupTable);this._popupTable=null;this._errorMessageCell=null;this._elementToValidate=null;this._calloutArrowCell=null;this._warningIconImage=null;this._closeImage=null;this._closeCellInnerDiv=null}this._isBuilt=false}AjaxControlToolkit.ValidatorCalloutBehavior.callBaseMethod(this,"dispose")},_getErrorMessage:function(){return this.get_element().errormessage||AjaxControlToolkit.Resources.ValidatorCallout_DefaultErrorMessage},show:function(A){if(A||!this.get_isOpen()){if(A&&AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout){AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout.hide()}if(AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout!=null){return }AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout=this;this._popupBehavior.set_x($common.getSize(this._elementToValidate).width);this._popupBehavior.show()}},hide:function(){if(AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout==this){AjaxControlToolkit.ValidatorCalloutBehavior._currentCallout=null}if(this.get_isOpen()){this._popupBehavior.hide()}},_onfocus:function(A){if(!this._originalValidationMethod(this.get_element())){this._ensureCallout();if(this._highlightCssClass){Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass)}this.show(true);return false}else{this.hide();return true}},_oncloseClick:function(A){this.hide()},_onvalidate:function(A){if(!this._originalValidationMethod(A)){this._ensureCallout();if(this._highlightCssClass){Sys.UI.DomElement.addCssClass(this._elementToValidate,this._highlightCssClass)}if(!this._focusAttached){$addHandler(this._elementToValidate,"focus",this._focusHandler);this._focusAttached=true}this.show(false);this._invalid=true;return false}else{if(this._highlightCssClass&&this._invalid){Sys.UI.DomElement.removeCssClass(this._elementToValidate,this._highlightCssClass)}this._invalid=false;this.hide();return true}},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(A){if(this._popupBehavior){this._popupBehavior.set_onShow(A)}else{this._onShowJson=A}this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){if(this._popupBehavior){this._popupBehavior.onShow()}},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(A){if(this._popupBehavior){this._popupBehavior.set_onHide(A)}else{this._onHideJson=A}this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){if(this._popupBehavior){this._popupBehavior.onHide()}},get_warningIconImageUrl:function(){return this._warningIconImageUrl},set_warningIconImageUrl:function(A){if(this._warningIconImageUrl!=A){this._warningIconImageUrl=A;if(this.get_isInitialized()){this._warningIconImage.src=A}this.raisePropertyChanged("warningIconImageUrl")}},get_closeImageUrl:function(){return this._closeImageUrl},set_closeImageUrl:function(A){if(this._closeImageUrl!=A){this._closeImageUrl=A;if(this.get_isInitialized()){this._closeImage.src=A}this.raisePropertyChanged("closeImageUrl")}},get_width:function(){return this._width},set_width:function(A){if(this._width!=A){this._width=A;if(this.get_isInitialized()){this._popupTable.style.width=_width}this.raisePropertyChanged("width")}},get_cssClass:function(){return this._cssClass},set_cssClass:function(A){if(this._cssClass!=A){this._cssClass=A;this.raisePropertyChanged("cssClass")}},get_highlightCssClass:function(){return this._highlightCssClass},set_highlightCssClass:function(A){if(this._highlightCssClass!=A){this._highlightCssClass=A;this.raisePropertyChanged("highlightCssClass")}},get_isOpen:function(){return $common.getVisible(this._popupTable)}};AjaxControlToolkit.ValidatorCalloutBehavior.registerClass("AjaxControlToolkit.ValidatorCalloutBehavior",AjaxControlToolkit.BehaviorBase);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};
Type.registerNamespace("VacationRoost.VR");VacationRoost.VR.LeadFactory=function(){VacationRoost.VR.LeadFactory.initializeBase(this);this._siteId=null;this._checkInBox=null;this._checkIn=null;this._checkOutBox=null;this._checkOut=null;this._firstNameBox=null;this._lastNameBox=null;this._emailBox=null;this._signupForNewsletterCheckbox=null;this._phoneBox=null;this._bedroomsDropDown=null;this._adultsDropDown=null;this._childrenDropDown=null;this._commentsBox=null;this._leadInformation=null;this._destinationId=null;this._inventoryId=null;this._agentUserName=null};VacationRoost.VR.LeadFactory.prototype={getLead:function(){var A=true;if(this._signupForNewsletterCheckbox){A=this._signupForNewsletterCheckbox.checked}var B={SiteId:this._siteId,FirstName:this._firstNameBox.value,LastName:this._lastNameBox.value,Email:this._emailBox.value,SignupForNewsletter:A,Phone:this._phoneBox.value,EmailId:this._getEmailId(),AgentUserName:this._agentUserName};B.CheckIn=this._determineCheckIn();B.CheckOut=this._determineCheckOut();if(this._bedroomsDropDown){B.Bedrooms=this._getDropDownValue(this._bedroomsDropDown)}if(this._adultsDropDown){B.Adults=this._getDropDownValue(this._adultsDropDown)}if(this._childrenDropDown){B.Children=this._getDropDownValue(this._childrenDropDown)}if(this._commentsBox){B.Comments=this._commentsBox.value}B.LeadInformation=this._leadInformation;B.DestinationId=this._destinationId;B.InventoryId=this._inventoryId;return B},_determineCheckIn:function(){if(this._checkInBox){return this._checkInBox.value}return this._checkIn},_determineCheckOut:function(){if(this._checkOutBox){return this._checkOutBox.value}return this._checkOut},_getDropDownValue:function(D,A){var C=A;var B=D.options[D.selectedIndex].value;if(B){C=parseInt(B)}return C},_getEmailId:function(){var C="EID=";var A=document.cookie.split(";");for(var B=0;B<A.length;B++){var D=A[B];while(D.charAt(0)==" "){D=D.substring(1,D.length)}if(D.indexOf(C)==0){return D.substring(C.length,D.length)}}return""},get_siteId:function(){return this._siteId},set_siteId:function(A){this._siteId=A},get_destinationId:function(){return this._destinationId},set_destinationId:function(A){this._destinationId=A},get_inventoryId:function(){return this._inventoryId},set_inventoryId:function(A){this._inventoryId=A},get_checkInBox:function(){return this._checkInBox},set_checkInBox:function(A){this._checkInBox=A},get_checkIn:function(){return this._checkIn},set_checkIn:function(A){this._checkIn=A},get_checkOutBox:function(){return this._checkOutBox},set_checkOutBox:function(A){this._checkOutBox=A},get_checkOut:function(){return this._checkOut},set_checkOut:function(A){this._checkOut=A},get_firstNameBox:function(){return this._firstNameBox},set_firstNameBox:function(A){this._firstNameBox=A},get_lastNameBox:function(){return this._lastNameBox},set_lastNameBox:function(A){this._lastNameBox=A},get_emailBox:function(){return this._emailBox},set_emailBox:function(A){this._emailBox=A},get_signupForNewsletterCheckbox:function(){return this._signupForNewsletterCheckbox},set_signupForNewsletterCheckbox:function(A){this._signupForNewsletterCheckbox=A},get_phoneBox:function(){return this._phoneBox},set_phoneBox:function(A){this._phoneBox=A},get_bedroomsDropDown:function(){return this._bedroomsDropDown},set_bedroomsDropDown:function(A){this._bedroomsDropDown=A},get_adultsDropDown:function(){return this._adultsDropDown},set_adultsDropDown:function(A){this._adultsDropDown=A},get_childrenDropDown:function(){return this._childrenDropDown},set_childrenDropDown:function(A){this._childrenDropDown=A},get_commentsBox:function(){return this._commentsBox},set_commentsBox:function(A){this._commentsBox=A},get_leadInformation:function(){return this._leadInformation},set_leadInformation:function(A){this._leadInformation=A},get_agentUserName:function(){return this._agentUserName},set_agentUserName:function(A){this._agentUserName=A},addLeadInformation:function(A){if(!this._leadInformation){this._leadInformation=""}this._leadInformation+=A}};VacationRoost.VR.LeadFactory.registerClass("VacationRoost.VR.LeadFactory",Sys.Component);VacationRoost.VR.LeadService=function(){VacationRoost.VR.LeadService.initializeBase(this);this._url="/AjaxServices/LeadService.svc/ajaxEndpoint"};VacationRoost.VR.LeadService.prototype={submitJavaScriptLead:function(B,A){var C={lead:B};Sys.Net.WebServiceProxy.invoke(this._url,"SubmitJavaScriptLead",false,C,A,null,null)},submitShortListLead:function(C,B,A){var D={lead:C,productOfferId:B};Sys.Net.WebServiceProxy.invoke(this._url,"SubmitShortListLead",false,D,A,null,null)},_jsonEscape:function(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\r?\n/g,"\\n")}};VacationRoost.VR.LeadService.registerClass("VacationRoost.VR.LeadService",Sys.Component);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};
Type.registerNamespace("VacationRoost.VR");VacationRoost.VR.SubmitHomePageLeadButton=function(A){VacationRoost.VR.SubmitHomePageLeadButton.initializeBase(this,[A]);this._clickDelegate=Function.createDelegate(this,this._clickHandler);this._leadService=null;this._leadFactory=null;this._submittingElement=null};VacationRoost.VR.SubmitHomePageLeadButton.prototype={initialize:function(){var A=this.get_element();this._leadService=new VacationRoost.VR.LeadService();Sys.UI.DomEvent.addHandler(A,"click",this._clickDelegate);VacationRoost.VR.SubmitHomePageLeadButton.callBaseMethod(this,"initialize")},_clickHandler:function(C){var E=Page_ClientValidate("SubmitLead");if(E){var D=this._submittingElement;if(D){var B=this.get_element();B.style.display="none";D.style.display="inline"}var A=this._leadFactory.getLead();this._leadService.submitJavaScriptLead(A,function(F){window.location="/thank-you.aspx"})}},get_leadFactory:function(){return this._leadFactory},set_leadFactory:function(A){this._leadFactory=A},get_submittingElement:function(){return this._submittingElement},set_submittingElement:function(A){this._submittingElement=A},dispose:function(){if(this._clickDelegate){var A=this.get_element();Sys.UI.DomEvent.removeHandler(A,"click",this._clickDelegate);delete this._clickDelegate}VacationRoost.VR.SubmitHomePageLeadButton.callBaseMethod(this,"dispose")}};VacationRoost.VR.SubmitHomePageLeadButton.registerClass("VacationRoost.VR.SubmitHomePageLeadButton",Sys.UI.Control);if(typeof (Sys)!=="undefined"){Sys.Application.notifyScriptLoaded()};
