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(d){var c=false,b=null,a=this;AjaxControlToolkit.ModalPopupBehavior.initializeBase(a,[d]);a._PopupControlID=b;a._PopupDragHandleControlID=b;a._BackgroundCssClass=b;a._DropShadow=c;a._Drag=c;a._OkControlID=b;a._CancelControlID=b;a._OnOkScript=b;a._OnCancelScript=b;a._xCoordinate=-1;a._yCoordinate=-1;a._repositionMode=AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll;a._backgroundElement=b;a._foregroundElement=b;a._relativeOrAbsoluteParentElement=b;a._popupElement=b;a._dragHandleElement=b;a._showHandler=b;a._okHandler=b;a._cancelHandler=b;a._scrollHandler=b;a._resizeHandler=b;a._windowHandlersAttached=c;a._dropShadowBehavior=b;a._dragBehavior=b;a._isIE6=c;a._saveTabIndexes=[];a._saveDesableSelect=[];a._tagWithTabIndex=["A","AREA","BUTTON","INPUT","OBJECT","SELECT","TEXTAREA","IFRAME"]};AjaxControlToolkit.ModalPopupBehavior.prototype={initialize:function(){var b="click",a=this;AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(a,"initialize");a._isIE6=Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7;if(a._PopupDragHandleControlID)a._dragHandleElement=$get(a._PopupDragHandleControlID);a._popupElement=$get(a._PopupControlID);if(a._DropShadow){a._foregroundElement=document.createElement("div");a._foregroundElement.id=a.get_id()+"_foregroundElement";a._popupElement.parentNode.appendChild(a._foregroundElement);a._foregroundElement.appendChild(a._popupElement)}else a._foregroundElement=a._popupElement;a._backgroundElement=document.createElement("div");a._backgroundElement.id=a.get_id()+"_backgroundElement";a._backgroundElement.style.display="none";if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&document.compatMode!="CSS1Compat")a._backgroundElement.style.position="absolute";else a._backgroundElement.style.position="fixed";a._backgroundElement.style.left="0px";a._backgroundElement.style.top="0px";a._backgroundElement.style.zIndex=1e4;if(a._BackgroundCssClass)a._backgroundElement.className=a._BackgroundCssClass;$common.appendElementToFormOrBody(a._foregroundElement);$common.appendElementToFormOrBody(a._backgroundElement);a._foregroundElement.style.display="none";a._foregroundElement.style.position="fixed";a._foregroundElement.style.zIndex=$common.getCurrentStyle(a._backgroundElement,"zIndex",a._backgroundElement.style.zIndex)+1;a._showHandler=Function.createDelegate(a,a._onShow);$addHandler(a.get_element(),b,a._showHandler);if(a._OkControlID){a._okHandler=Function.createDelegate(a,a._onOk);$addHandler($get(a._OkControlID),b,a._okHandler)}if(a._CancelControlID){a._cancelHandler=Function.createDelegate(a,a._onCancel);$addHandler($get(a._CancelControlID),b,a._cancelHandler)}a._scrollHandler=Function.createDelegate(a,a._onLayout);a._resizeHandler=Function.createDelegate(a,a._onLayout);a.registerPartialUpdateEvents()},dispose:function(){var c="click",b=null,a=this;a._hideImplementation();if(a._foregroundElement&&a._foregroundElement.parentNode){a._backgroundElement.parentNode.removeChild(a._backgroundElement);if(a._DropShadow){a._foregroundElement.parentNode.appendChild(a._popupElement);a._foregroundElement.parentNode.removeChild(a._foregroundElement)}}a._scrollHandler=b;a._resizeHandler=b;if(a._cancelHandler&&$get(a._CancelControlID)){$removeHandler($get(a._CancelControlID),c,a._cancelHandler);a._cancelHandler=b}if(a._okHandler&&$get(a._OkControlID)){$removeHandler($get(a._OkControlID),c,a._okHandler);a._okHandler=b}if(a._showHandler){$removeHandler(a.get_element(),c,a._showHandler);a._showHandler=b}AjaxControlToolkit.ModalPopupBehavior.callBaseMethod(a,"dispose")},_attachPopup:function(){var b=null,a=this;if(a._DropShadow&&!a._dropShadowBehavior)a._dropShadowBehavior=$create(AjaxControlToolkit.DropShadowBehavior,{},b,b,a._popupElement);if(a._dragHandleElement&&!a._dragBehavior)a._dragBehavior=$create(AjaxControlToolkit.FloatingBehavior,{handle:a._dragHandleElement},b,b,a._foregroundElement);$addHandler(window,"resize",a._resizeHandler);$addHandler(window,"scroll",a._scrollHandler);a._windowHandlersAttached=true},_detachPopup:function(){var a=this;if(a._windowHandlersAttached){a._scrollHandler&&$removeHandler(window,"scroll",a._scrollHandler);a._resizeHandler&&$removeHandler(window,"resize",a._resizeHandler);a._windowHandlersAttached=false}if(a._dragBehavior){a._dragBehavior.dispose();a._dragBehavior=null}if(a._dropShadowBehavior){a._dropShadowBehavior.dispose();a._dropShadowBehavior=null}},_onShow:function(a){if(!this.get_element().disabled){this.show();a.preventDefault();return false}},_onOk:function(c){var a=this,b=$get(a._OkControlID);if(b&&!b.disabled){a.hide()&&a._OnOkScript&&window.setTimeout(a._OnOkScript,0);c.preventDefault();return false}},_onCancel:function(c){var a=this,b=$get(a._CancelControlID);if(b&&!b.disabled){a.hide()&&a._OnCancelScript&&window.setTimeout(a._OnCancelScript,0);c.preventDefault();return false}},_onLayout:function(c){var b=this,a=b.get_repositionMode();if((a===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowScroll||a===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll)&&c.type==="scroll")b._layout();else if((a===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResize||a===AjaxControlToolkit.ModalPopupRepositionMode.RepositionOnWindowResizeAndScroll)&&c.type==="resize")b._layout();else b._layoutBackgroundElement()},show:function(){var c="absolute",a=this,d=new Sys.CancelEventArgs;a.raiseShowing(d);if(d.get_cancel())return;a.populate();a._attachPopup();a._backgroundElement.style.display="";a._foregroundElement.style.display="";a._popupElement.style.display="";if(a._isIE6){a._foregroundElement.style.position=c;a._backgroundElement.style.position=c;var b=a._foregroundElement.parentNode;while(b&&b!=document.documentElement)if(b.style.position!="relative"&&b.style.position!=c)b=b.parentNode;else{a._relativeOrAbsoluteParentElement=b;break}}a.disableTab();a._layout();a._layout();a.raiseShown(Sys.EventArgs.Empty)},disableTab:function(){var c=this,d=0,a,f=[];Array.clear(c._saveTabIndexes);for(var e=0;e КартаКарта