Type.registerNamespace("AjaxControlToolkit");AjaxControlToolkit.ModalPopupRepositionMode=function(){throw Error.invalidOperation()};AjaxControlToolkit.ModalPopupRepositionMode.prototype={None:0,RepositionOnWindowResize:1,RepositionOnWindowScroll:2,RepositionOnWindowResizeAndScroll:3};AjaxControlToolkit.ModalPopupRepositionMode.registerEnum("AjaxControlToolkit.ModalPopupRepositionMode");AjaxControlToolkit.ModalPopupBehavior=function(A){AjaxControlToolkit.ModalPopupBehavior.initializeBase(this,[A]);this._PopupControlID=null;this._PopupDragHandleControlID=null;this._BackgroundCssClass=null;this._DropShadow=false;this._Drag=false;this._OkControlID=null;this._CancelControlID=null;this._OnOkScript=null;this._OnCancelScript=null;this._xCoordinate=-1;this._yCoordinate=-1;this._repositionMode=AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResize;this._backgroundElement=null;this._foregroundElement=null;this._relativeOrAbsoluteParentElement=null;this._popupElement=null;this._dragHandleElement=null;this._showHandler=null;this._okHandler=null;this._cancelHandler=null;this._scrollHandler=null;this._resizeHandler=null;this._windowHandlersAttached=false;this._dropShadowBehavior=null;this._dragBehavior=null;this._isIE6=false;this._isModal=true;this._saveTabIndexes=new Array();this._saveDesableSelect=new Array();this._tagWithTabIndex=new Array("A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME")};AjaxControlToolkit.ModalPopupBehavior.prototype={initialize:function(){AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(this,"initialize");this._isIE6=(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7);if(this._PopupDragHandleControlID){this._dragHandleElement=$get(this._PopupDragHandleControlID)}this._popupElement=$get(this._PopupControlID);if(this._DropShadow){this._foregroundElement=document.createElement("div");this._foregroundElement.id=this.get_id()+"_foregroundElement";this._popupElement.parentNode.appendChild(this._foregroundElement);this._foregroundElement.appendChild(this._popupElement)}else{this._foregroundElement=this._popupElement}this._backgroundElement=document.createElement("div");this._backgroundElement.id=this.get_id()+"_backgroundElement";this._backgroundElement.style.display="none";this._backgroundElement.style.position="fixed";this._backgroundElement.style.left="0px";this._backgroundElement.style.top="0px";this._backgroundElement.style.zIndex=10000;if(this._BackgroundCssClass){this._backgroundElement.className=this._BackgroundCssClass}this._foregroundElement.parentNode.appendChild(this._backgroundElement);this._foregroundElement.style.display="none";this._foregroundElement.style.position="fixed";this._foregroundElement.style.zIndex=$common.getCurrentStyle(this._backgroundElement,"zIndex",this._backgroundElement.style.zIndex)+1;this._showHandler=Function.createDelegate(this,this._onShow);$addHandler(this.get_element(),"click",this._showHandler);if(this._OkControlID){this._okHandler=Function.createDelegate(this,this._onOk);$addHandler($get(this._OkControlID),"click",this._okHandler)}if(this._CancelControlID){this._cancelHandler=Function.createDelegate(this,this._onCancel);$addHandler($get(this._CancelControlID),"click",this._cancelHandler)}this._scrollHandler=Function.createDelegate(this,this._onLayout);this._resizeHandler=Function.createDelegate(this,this._onLayout);this.registerPartialUpdateEvents()},dispose:function(){this._hideImplementation();if(this._foregroundElement&&this._foregroundElement.parentNode){this._foregroundElement.parentNode.removeChild(this._backgroundElement);if(this._DropShadow){this._foregroundElement.parentNode.appendChild(this._popupElement);this._foregroundElement.parentNode.removeChild(this._foregroundElement)}}this._scrollHandler=null;this._resizeHandler=null;if(this._cancelHandler&&$get(this._CancelControlID)){$removeHandler($get(this._CancelControlID),"click",this._cancelHandler);this._cancelHandler=null}if(this._okHandler&&$get(this._OkControlID)){$removeHandler($get(this._OkControlID),"click",this._okHandler);this._okHandler=null}if(this._showHandler){$removeHandler(this.get_element(),"click",this._showHandler);this._showHandler=null}AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(this,"dispose")},_attachPopup:function(){if(this._DropShadow&&!this._dropShadowBehavior){this._dropShadowBehavior=$create(AjaxControlToolkit.DropShadowBehavior,{},null,null,this._popupElement)}if(this._dragHandleElement&&!this._dragBehavior){this._dragBehavior=$create(AjaxControlToolkit.FloatingBehavior,{handle:this._dragHandleElement},null,null,this._foregroundElement)}$addHandler(window,"resize",this._resizeHandler);$addHandler(window,"scroll",this._scrollHandler);this._windowHandlersAttached=true},_detachPopup:function(){if(this._windowHandlersAttached){if(this._scrollHandler){$removeHandler(window,"scroll",this._scrollHandler)}if(this._resizeHandler){$removeHandler(window,"resize",this._resizeHandler)}this._windowHandlersAttached=false}if(this._dragBehavior){this._dragBehavior.dispose();this._dragBehavior=null}if(this._dropShadowBehavior){this._dropShadowBehavior.dispose();this._dropShadowBehavior=null}},_onShow:function(A){if(!this.get_element().disabled){this.show();A.preventDefault();return false}},_onOk:function(B){var A=$get(this._OkControlID);if(A&&!A.disabled){if(this.hide()&&this._OnOkScript){window.setTimeout(this._OnOkScript,0)}B.preventDefault();return false}},_onCancel:function(B){var A=$get(this._CancelControlID);if(A&&!A.disabled){if(this.hide()&&this._OnCancelScript){window.setTimeout(this._OnCancelScript,0)}B.preventDefault();return false}},_onLayout:function(B){var A=this.get_repositionMode();if(((A===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowScroll)||(A===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll))&&(B.type==="scroll")){this._layout()}else{if(((A===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResize)||(A===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll))&&(B.type==="resize")){this._layout()}else{this._layoutBackgroundElement()}}},show:function(){var A=new Sys.CancelEventArgs();this.raiseShowing(A);if(A.get_cancel()){return }this.populate();this._attachPopup();if(this._isModal==true){this._backgroundElement.style.display=""}this._foregroundElement.style.display="";this._popupElement.style.display="";if(this._isIE6){this._foregroundElement.style.position="absolute";this._backgroundElement.style.position="absolute";var B=this._foregroundElement.parentNode;while(B&&(B!=document.documentElement)){if((B.style.position!="relative")&&(B.style.position!="absolute")){B=B.parentNode}else{this._relativeOrAbsoluteParentElement=B;break}}}this.disableTab();this._layout();this._layout();this.raiseShown(Sys.EventArgs.Empty)},disableTab:function(){var C=0;var E;var F=new Array();Array.clear(this._saveTabIndexes);for(var B=0;B<this._tagWithTabIndex.length;B++){E=this._foregroundElement.getElementsByTagName(this._tagWithTabIndex[B]);for(var A=0;A<E.length;A++){F[C]=E[A];C++}}C=0;for(var B=0;B<this._tagWithTabIndex.length;B++){E=document.getElementsByTagName(this._tagWithTabIndex[B]);for(var A=0;A<E.length;A++){if(Array.indexOf(F,E[A])==-1){this._saveTabIndexes[C]={tag:E[A],index:E[A].tabIndex};E[A].tabIndex="-1";C++}}}C=0;if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){var D=new Array();for(var B=0;B<this._tagWithTabIndex.length;B++){E=this._foregroundElement.getElementsByTagName("SELECT");for(var A=0;A<E.length;A++){D[C]=E[A];C++}}C=0;Array.clear(this._saveDesableSelect);E=document.getElementsByTagName("SELECT");for(var A=0;A<E.length;A++){if(Array.indexOf(D,E[A])==-1){this._saveDesableSelect[C]={tag:E[A],visib:$common.getCurrentStyle(E[A],"visibility")};E[A].style.visibility="hidden";C++}}}},restoreTab:function(){for(var B=0;B<this._saveTabIndexes.length;B++){this._saveTabIndexes[B].tag.tabIndex=this._saveTabIndexes[B].index}Array.clear(this._saveTabIndexes);if((Sys.Browser.agent===Sys.Browser.InternetExplorer)&&(Sys.Browser.version<7)){for(var A=0;A<this._saveDesableSelect.length;A++){this._saveDesableSelect[A].tag.style.visibility=this._saveDesableSelect[A].visib}Array.clear(this._saveDesableSelect)}},hide:function(){var A=new Sys.CancelEventArgs();this.raiseHiding(A);if(A.get_cancel()){return false}this._hideImplementation();this.raiseHidden(Sys.EventArgs.Empty);return true},_hideImplementation:function(){this._backgroundElement.style.display="none";this._foregroundElement.style.display="none";this.restoreTab();this._detachPopup()},_layout:function(){var C=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);var B=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);var G=$common.getClientBounds();var I=G.width;var F=G.height;this._layoutBackgroundElement();var A=0;var E=0;if(this._xCoordinate<0){var D=this._foregroundElement.offsetWidth?this._foregroundElement.offsetWidth:this._foregroundElement.scrollWidth;A=((I-D)/2);if(this._foregroundElement.style.position=="absolute"){A+=C}this._foregroundElement.style.left=A+"px"}else{if(this._isIE6){this._foregroundElement.style.left=(this._xCoordinate+C)+"px";A=this._xCoordinate+C}else{this._foregroundElement.style.left=this._xCoordinate+"px";A=this._xCoordinate}}if(this._yCoordinate<0){var H=this._foregroundElement.offsetHeight?this._foregroundElement.offsetHeight:this._foregroundElement.scrollHeight;E=((F-H)/2);if(this._foregroundElement.style.position=="absolute"){E+=B}this._foregroundElement.style.top=E+"px"}else{if(this._isIE6){this._foregroundElement.style.top=(this._yCoordinate+B)+"px";E=this._yCoordinate+B}else{this._foregroundElement.style.top=this._yCoordinate+"px";E=this._yCoordinate}}this._layoutForegroundElement(A,E);if(this._dropShadowBehavior){this._dropShadowBehavior.setShadow();window.setTimeout(Function.createDelegate(this,this._fixupDropShadowBehavior),0)}this._layoutBackgroundElement()},_layoutForegroundElement:function(F,E){if(this._isIE6&&this._relativeOrAbsoluteParentElement){var D=$common.getLocation(this._foregroundElement);var B=$common.getLocation(this._relativeOrAbsoluteParentElement);var C=D.x;if(C!=F){this._foregroundElement.style.left=(F-B.x)+"px"}var A=D.y;if(A!=E){this._foregroundElement.style.top=(E-B.y)+"px"}}},_layoutBackgroundElement:function(){if(this._isIE6){var B=$common.getLocation(this._backgroundElement);var F=B.x;if(F!=0){this._backgroundElement.style.left=(-F)+"px"}var D=B.y;if(D!=0){this._backgroundElement.style.top=(-D)+"px"}}var C=$common.getClientBounds();var E=C.width;var A=C.height;this._backgroundElement.style.width=Math.max(Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),E)+"px";this._backgroundElement.style.height=Math.max(Math.max(document.documentElement.scrollHeight,document.body.scrollHeight),A)+"px"},_fixupDropShadowBehavior:function(){if(this._dropShadowBehavior){this._dropShadowBehavior.setShadow()}},_partialUpdateEndRequest:function(A,C){AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[A,C]);if(this.get_element()){var B=C.get_dataItems()[this.get_element().id];if("show"==B){this.show()}else{if("hide"==B){this.hide()}}}this._layout()},_onPopulated:function(B,A){AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(this,"_onPopulated",[B,A]);this._layout()},get_PopupControlID:function(){return this._PopupControlID},set_PopupControlID:function(A){if(this._PopupControlID!=A){this._PopupControlID=A;this.raisePropertyChanged("PopupControlID")}},get_X:function(){return this._xCoordinate},set_X:function(A){if(this._xCoordinate!=A){this._xCoordinate=A;this.raisePropertyChanged("X")}},get_Y:function(){return this._yCoordinate},set_Y:function(A){if(this._yCoordinate!=A){this._yCoordinate=A;this.raisePropertyChanged("Y")}},get_PopupDragHandleControlID:function(){return this._PopupDragHandleControlID},set_PopupDragHandleControlID:function(A){if(this._PopupDragHandleControlID!=A){this._PopupDragHandleControlID=A;this.raisePropertyChanged("PopupDragHandleControlID")}},get_BackgroundCssClass:function(){return this._BackgroundCssClass},set_BackgroundCssClass:function(A){if(this._BackgroundCssClass!=A){this._BackgroundCssClass=A;this.raisePropertyChanged("BackgroundCssClass")}},get_DropShadow:function(){return this._DropShadow},set_DropShadow:function(A){if(this._DropShadow!=A){this._DropShadow=A;this.raisePropertyChanged("DropShadow")}},get_IsModal:function(){return this._isModal},set_IsModal:function(A){if(this._isModal!=A){this._isModal=A}},get_Drag:function(){return this._Drag},set_Drag:function(A){if(this._Drag!=A){this._Drag=A;this.raisePropertyChanged("Drag")}},get_OkControlID:function(){return this._OkControlID},set_OkControlID:function(A){if(this._OkControlID!=A){this._OkControlID=A;this.raisePropertyChanged("OkControlID")}},get_CancelControlID:function(){return this._CancelControlID},set_CancelControlID:function(A){if(this._CancelControlID!=A){this._CancelControlID=A;this.raisePropertyChanged("CancelControlID")}},get_OnOkScript:function(){return this._OnOkScript},set_OnOkScript:function(A){if(this._OnOkScript!=A){this._OnOkScript=A;this.raisePropertyChanged("OnOkScript")}},get_OnCancelScript:function(){return this._OnCancelScript},set_OnCancelScript:function(A){if(this._OnCancelScript!=A){this._OnCancelScript=A;this.raisePropertyChanged("OnCancelScript")}},get_repositionMode:function(){return this._repositionMode},set_repositionMode:function(A){if(this._repositionMode!==A){this._repositionMode=A;this.raisePropertyChanged("RepositionMode")}},add_showing:function(A){this.get_events().addHandler("showing",A)},remove_showing:function(A){this.get_events().removeHandler("showing",A)},raiseShowing:function(A){var B=this.get_events().getHandler("showing");if(B){B(this,A)}},add_shown:function(A){this.get_events().addHandler("shown",A)},remove_shown:function(A){this.get_events().removeHandler("shown",A)},raiseShown:function(A){var B=this.get_events().getHandler("shown");if(B){B(this,A)}},add_hiding:function(A){this.get_events().addHandler("hiding",A)},remove_hiding:function(A){this.get_events().removeHandler("hiding",A)},raiseHiding:function(A){var B=this.get_events().getHandler("hiding");if(B){B(this,A)}},add_hidden:function(A){this.get_events().addHandler("hidden",A)},remove_hidden:function(A){this.get_events().removeHandler("hidden",A)},raiseHidden:function(A){var B=this.get_events().getHandler("hidden");if(B){B(this,A)}}};AjaxControlToolkit.ModalPopupBehavior.registerClass("AjaxControlToolkit.ModalPopupBehavior",AjaxControlToolkit.DynamicPopulateBehaviorBase);AjaxControlToolkit.ModalPopupBehavior.invokeViaServer=function(B,A){var C=$find(B);if(C){if(A){C.show()}else{C.hide()}}};
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.SearchForm=function(){VacationRoost.VR.SearchForm.initializeBase(this);this._searchResultsLocation=null;this._destinationDropDown=null;this._checkInBox=null;this._checkOutBox=null;this._propertyNameBox=null;this._submitButton=null;this._submitClickDelegate=Function.createDelegate(this,this._submitClickHandler)};VacationRoost.VR.SearchForm.prototype={initialize:function(){Sys.UI.DomEvent.addHandler(this._submitButton,"click",this._submitClickDelegate);VacationRoost.VR.SearchForm.callBaseMethod(this,"initialize")},_submitClickHandler:function(C){var E=Page_ClientValidate("TravelDates");if(E){var D=this._destinationDropDown,B=this._propertyNameBox;var A=this._searchResultsLocation;if(D){A=D.value}if(B&&B.value!=""){A+="?Ntt="+B.value+"&Ntk=Property"}this._setTravelDatesCookie();document.location.href=A}},_setTravelDatesCookie:function(){var A=this._checkInBox,B=this._checkOutBox;if(A&&B){document.cookie="checkin="+A.value+"; path=/";document.cookie="checkout= "+B.value+"; path=/"}},get_searchResultsLocation:function(){return this._searchResultsLocation},set_searchResultsLocation:function(A){this._searchResultsLocation=A},get_destinationDropDown:function(){return this._destinationDropDown},set_destinationDropDown:function(A){this._destinationDropDown=A},get_checkInBox:function(){return this._checkInBox},set_checkInBox:function(A){this._checkInBox=A},get_checkOutBox:function(){return this._checkOutBox},set_checkOutBox:function(A){this._checkOutBox=A},get_propertyNameBox:function(){return this._propertyNameBox},set_propertyNameBox:function(A){this._propertyNameBox=A},get_submitButton:function(){return this._submitButton},set_submitButton:function(A){this._submitButton=A},dispose:function(){if(this._submitClickDelegate){Sys.UI.DomEvent.removeHandler(this._submitButton,"click",this._submitClickDelegate);delete this._submitClickDelegate}VacationRoost.VR.SearchForm.callBaseMethod(this,"dispose")}};VacationRoost.VR.SearchForm.registerClass("VacationRoost.VR.SearchForm",Sys.Component);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.SubmitLeadButton=function(A){VacationRoost.VR.SubmitLeadButton.initializeBase(this,[A]);this._clickDelegate=Function.createDelegate(this,this._clickHandler);this._submittedDelegate=Function.createDelegate(this,this._submittedHandler);this._leadService=null;this._leadFactory=null;this._siteId=null;this._inventoryId=null;this._checkIn=null;this._checkInBox=null;this._checkOut=null;this._checkOutBox=null;this._firstNameBox=null;this._lastNameBox=null;this._emailBox=null;this._phoneBox=null;this._commentsBox=null;this._adultsDropDown=null;this._childrenDropDown=null;this._submittingElement=null;this._redirectUrl=null;this._leadFormContainer=null;this._thankYouContainer=null;this._thankYouImage=null;this._thankYouImageUrl=null;this._destinationId=null;this._leadInformation=null;this._googleTrackingPageName=null;this._searchAdConversionCodePath=null};VacationRoost.VR.SubmitLeadButton.prototype={initialize:function(){var A=this.get_element();this._leadFactory=$create(VacationRoost.VR.LeadFactory,{siteId:this._siteId,checkIn:this._checkIn,checkInBox:this._checkInBox,checkOut:this._checkOut,checkOutBox:this._checkOutBox,firstNameBox:this._firstNameBox,lastNameBox:this._lastNameBox,emailBox:this._emailBox,phoneBox:this._phoneBox,commentsBox:this._commentsBox,adultsDropDown:this._adultsDropDown,childrenDropDown:this._childrenDropDown,destinationId:this._destinationId,leadInformation:this._leadInformation,inventoryId:this._inventoryId});this._leadService=new VacationRoost.VR.LeadService();Sys.UI.DomEvent.addHandler(A,"click",this._clickDelegate);VacationRoost.VR.SubmitLeadButton.callBaseMethod(this,"initialize");if(typeof (VacationRoost.VR.TravelDateSynchronizer!=="undefined")){VacationRoost.VR.TravelDateSynchronizer.add(this)}},_clickHandler:function(A){this._submitLead()},_submitLead:function(){var D=Page_ClientValidate("SubmitLead");if(D){var C=this._submittingElement;if(C){var B=this.get_element();B.style.display="none";C.style.display=""}var A=this._leadFactory.getLead();this._leadService.submitJavaScriptLead(A,this._submittedDelegate)}},_submittedHandler:function(A){if(this._googleTrackingPageName){_gat._getTrackerByName("pageTracker")._trackPageview(this._googleTrackingPageName);_gat._getTrackerByName("rollupTracker")._trackPageview(this._googleTrackingPageName)}if(this._redirectUrl){window.location=this._redirectUrl}else{if(this._leadFormContainer&&this._thankYouContainer){if(this._searchAdConversionCodePath){var B=document.createElement("iframe");B.src=this._searchAdConversionCodePath;B.style.position="absolute";B.style.top="0px";B.style.left="-9999px";document.getElementsByTagName("body")[0].appendChild(B)}if(this._thankYouImage){this._thankYouImage.src=this._thankYouImageUrl}this._leadFormContainer.style.display="none";this._thankYouContainer.style.display=""}else{alert("You need to set this up to either redirect, or swap visibility on two elements.")}}},clearTravelDates:function(){this._leadFactory.set_checkIn(null);this._leadFactory.set_checkOut(null)},setTravelDates:function(B,A){this._leadFactory.set_checkIn(B.localeFormat("d"));this._leadFactory.set_checkOut(A.localeFormat("d"))},get_siteId:function(){return this._siteId},set_siteId:function(A){this._siteId=A},get_inventoryId:function(){return this._inventoryId},set_inventoryId:function(A){this._inventoryId=A},get_checkIn:function(){return this._checkIn},set_checkIn:function(A){this._checkIn=A},get_checkInBox:function(){return this._checkInBox},set_checkInBox:function(A){this._checkInBox=A},get_checkOut:function(){return this._checkOut},set_checkOut:function(A){this._checkOut=A},get_checkOutBox:function(){return this._checkOutBox},set_checkOutBox:function(A){this._checkOutBox=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_phoneBox:function(){return this._phoneBox},set_phoneBox:function(A){this._phoneBox=A},get_commentsBox:function(){return this._commentsBox},set_commentsBox:function(A){this._commentsBox=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_submittingElement:function(){return this._submittingElement},set_submittingElement:function(A){this._submittingElement=A},get_redirectUrl:function(){return this._redirectUrl},set_redirectUrl:function(A){this._redirectUrl=A},get_leadFormContainer:function(){return this._leadFormContainer},set_leadFormContainer:function(A){this._leadFormContainer=A},get_thankYouContainer:function(){return this._thankYouContainer},set_thankYouContainer:function(A){this._thankYouContainer=A},get_thankYouImage:function(){return this._thankYouImage},set_thankYouImage:function(A){this._thankYouImage=A},get_thankYouImageUrl:function(){return this._thankYouImageUrl},set_thankYouImageUrl:function(A){this._thankYouImageUrl=A},get_destinationId:function(){return this._destinationId},set_destinationId:function(A){this._destinationId=A},get_leadInformation:function(){return this._leadInformation},set_leadInformation:function(A){this._leadInformation=A},get_googleTrackingPageName:function(){return this._googleTrackingPageName},set_googleTrackingPageName:function(A){this._googleTrackingPageName=A},get_searchAdConversionCodePath:function(){return this._searchAdConversionCodePath},set_searchAdConversionCodePath:function(A){this._searchAdConversionCodePath=A},dispose:function(){if(this._clickDelegate){var A=this.get_element();Sys.UI.DomEvent.removeHandler(A,"click",this._clickDelegate);delete this._clickDelegate}VacationRoost.VR.SubmitLeadButton.callBaseMethod(this,"dispose")}};VacationRoost.VR.SubmitLeadButton.registerClass("VacationRoost.VR.SubmitLeadButton",Sys.UI.Control);VacationRoost.VR.LeadForm=function(){VacationRoost.VR.LeadForm.initializeBase(this);this._defaultMessageContainer=null;this._noRatesMessageContainer=null;this._adultsDropDown=null;this._childrenDropDown=null;this._tabControl=null;this._tabIndex=null};VacationRoost.VR.LeadForm.prototype={initialize:function(){VacationRoost.VR.LeadForm.callBaseMethod(this,"initialize");if(typeof (VacationRoost.VR.PropertyPageController)!=="undefined"){VacationRoost.VR.PropertyPageController.registerLeadForm(this)}},open:function(A){if(A&&this._noRatesMessageContainer&&this._defaultMessageContainer){this._noRatesMessageContainer.style.display="";this._defaultMessageContainer.style.display="none"}else{if(this._noRatesMessageContainer&&this._defaultMessageContainer){this._noRatesMessageContainer.style.display="none";this._defaultMessageContainer.style.display=""}}if(this._tabControl&&this._tabIndex){this._tabControl.selectTab(this._tabIndex)}},get_defaultMessageContainer:function(){return this._defaultMessageContainer},set_defaultMessageContainer:function(A){this._defaultMessageContainer=A},get_noRatesMessageContainer:function(){return this._noRatesMessageContainer},set_noRatesMessageContainer:function(A){this._noRatesMessageContainer=A},get_adultsDropDown:function(){return this._adultsDropDown},set_adultsDropDown:function(A){this._adultsDropDown=A},get_isModal:function(){return this._isModal},set_isModal:function(A){this._isModal=A},get_childrenDropDown:function(){return this._childrenDropDown},set_childrenDropDown:function(A){this._childrenDropDown=A},get_tabIndex:function(){return this._tabIndex},set_tabIndex:function(A){this._tabIndex=A},get_tabControl:function(){return this._tabControl},set_tabControl:function(A){this._tabControl=A},set_adults:function(A){if(this._adultsDropDown){this._adultsDropDown.value=A}},set_children:function(A){if(this._childrenDropDown){this._childrenDropDown.value=A}},dispose:function(){VacationRoost.VR.LeadForm.callBaseMethod(this,"dispose")}};VacationRoost.VR.LeadForm.registerClass("VacationRoost.VR.LeadForm",Sys.Component);VacationRoost.VR.ModalLeadForm=function(){VacationRoost.VR.ModalLeadForm.initializeBase(this);this._popupContainer=null;this._fakeOpenButton=null;this._modalPopup=null;this._closeButtons=null;this._closeClickDelegate=Function.createDelegate(this,this._closeClickHandler)};VacationRoost.VR.ModalLeadForm.prototype={initialize:function(){VacationRoost.VR.ModalLeadForm.callBaseMethod(this,"initialize");var B=document.createElement("a");B.style.display="none";document.getElementsByTagName("body")[0].appendChild(B);this._fakeOpenButton=B;this._modalPopup=$create(AjaxControlToolkit.ModalPopupBehavior,{id:"LeadFormModalPopup",PopupControlID:this._popupContainer.id,BackgroundCssClass:"modalBackground"},null,null,B);for(var A=0;A<this._closeButtons.length;A++){Sys.UI.DomEvent.addHandler(this._closeButtons[A],"click",this._closeClickDelegate)}},open:function(A){VacationRoost.VR.ModalLeadForm.callBaseMethod(this,"open",[A]);this._modalPopup.show()},close:function(){this._modalPopup.hide()},_closeClickHandler:function(A){this.close()},get_closeButtons:function(){return this._closeButtons},set_closeButtons:function(A){this._closeButtons=A},get_popupContainer:function(){return this._popupContainer},set_popupContainer:function(A){this._popupContainer=A},dispose:function(){VacationRoost.VR.ModalLeadForm.callBaseMethod(this,"dispose")}};VacationRoost.VR.ModalLeadForm.registerClass("VacationRoost.VR.ModalLeadForm",VacationRoost.VR.LeadForm);
Type.registerNamespace("VacationRoost.VR");VacationRoost.VR.NewsletterForm=function(){VacationRoost.VR.NewsletterForm.initializeBase(this);this._newsletterService=null;this._emailBox=null;this._submitButton=null;this._submittingElement=null;this._thankyouElement=null;this._siteId=null;this._validationMessage=null;this._submitClickDelegate=Function.createDelegate(this,this._submitClickHandler);this._submittedDelegate=Function.createDelegate(this,this._submittedHandler)};VacationRoost.VR.NewsletterForm.prototype={initialize:function(){this._newsletterService=new VacationRoost.VR.NewsletterService();Sys.UI.DomEvent.addHandler(this._submitButton,"click",this._submitClickDelegate);VacationRoost.VR.NewsletterForm.callBaseMethod(this,"initialize")},_submitClickHandler:function(B){var C=this._submittingElement,A=this._submitButton,E=this._emailBox;var D=E.value&&new RegExp("\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*").test(E.value);if(D){if(this._validationMessage){this._validationMessage.style.display="none"}A.style.display="none";C.style.display="";this._newsletterService.submitEmailOnly(E.value,this._siteId,this._submittedDelegate)}else{if(this._validationMessage){this._validationMessage.style.display=""}}},_submittedHandler:function(A){var C=this._submittingElement,B=this._submitButton,D=this._thankyouElement;B.style.display="";C.style.display="none";if(D&&D!=null){D.style.display=""}else{alert("Thank you.")}},get_emailBox:function(){return this._emailBox},set_emailBox:function(A){this._emailBox=A},get_submitButton:function(){return this._submitButton},set_submitButton:function(A){this._submitButton=A},get_submittingElement:function(){return this._submittingElement},set_submittingElement:function(A){this._submittingElement=A},get_thankyouElement:function(){return this._thankyouElement},set_thankyouElement:function(A){this._thankyouElement=A},get_siteId:function(){return this._siteId},set_siteId:function(A){this._siteId=A},get_validationMessage:function(){return this._validationMessage},set_validationMessage:function(A){this._validationMessage=A},dispose:function(){if(this._submitClickDelegate){Sys.UI.DomEvent.removeHandler(this._submitButton,"click",this._submitClickDelegate);delete this._submitClickDelegate}VacationRoost.VR.NewsletterForm.callBaseMethod(this,"dispose")}};VacationRoost.VR.NewsletterForm.registerClass("VacationRoost.VR.NewsletterForm",Sys.Component);VacationRoost.VR.NewsletterService=function(){VacationRoost.VR.NewsletterService.initializeBase(this);this._url="/AjaxServices/Newsletter.svc/ajaxEndpoint/"};VacationRoost.VR.NewsletterService.prototype={submitEmailOnly:function(C,D,B){var A='{"emailAddress":"'+this._jsonEscape(C)+'","siteId":"'+D+'"}';this._submit(A,B)},_submit:function(body,successCallback){var request=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("MSXML2.XMLHTTP.3.0");var methodName="SignUpForNewsletter";request.open("POST",this._url+methodName,true);request.setRequestHeader("Content-Type","application/json");request.onreadystatechange=function(){var done=4,ok=200;if(request.readyState==done&&request.status==ok){if(request.responseText){successCallback(eval("("+request.responseText+")"))}}};request.send(body)},_jsonEscape:function(A){return A.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}};VacationRoost.VR.NewsletterService.registerClass("VacationRoost.VR.NewsletterService",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()};
