Type.registerNamespace("Telerik.Web.UI"); (function(a,c,k){$telerik.toWindow=function(m){return m; }; $telerik.findWindow=$find; var b=Sys.Serialization.JavaScriptSerializer; var l={top:0,left:0,bottom:0,right:0,horizontal:0,vertical:0}; var f=window; var h=f.parseInt; var e=f.document; var g="html"; var d="body"; var i="rwPreventPageScrolling"; var j=Telerik.Web.Browser.scrollBarWidth; c.RadWindowControllerClass=function(){this._activeWindow=null; this._historyStack=[]; }; c.RadWindowControllerClass.prototype={getInstance:function(){return this; },hideCurrentWindowIfNonModal:function(){if(this._activeWindow!=null&&this._activeWindow.isModal&&!this._activeWindow.isModal()){this._activeWindow.close(); }this._activeWindow=null; },inactivateCurrentWindow:function(){if(this._activeWindow!=null){this._activeWindow.setActive(false); }this._activeWindow=null; },set_activeWindow:function(m){if(m==this._activeWindow){return; }this.inactivateCurrentWindow(); this._activeWindow=m; Array.remove(this._historyStack,m); Array.add(this._historyStack,m); },notifyWindowClosed:function(m){if(this._activeWindow==m){this._activeWindow=null; }Array.remove(this._historyStack,m); this._activatePreviousWindow(); },_activatePreviousWindow:function(){var m=this._historyStack; var n=m.length-1; for(; n>=0; n--){var o=m[n]; if(!o){return; }if(o.isCreated()&&!o.isClosed()&&!o.isMinimized()){o.setActive(true); break; }else{Array.removeAt(m,n); }}},get_activeWindow:function(){return this._activeWindow; }}; c.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null); if(!c.RadWindowController){c.RadWindowController=new c.RadWindowControllerClass(); }Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.RadWindowUtils"); c.RadWindowUtils.Localization={Close:"Close",Minimize:"Minimize",Maximize:"Maximize",Reload:"Reload",PinOn:"Pin on",PinOff:"Pin off",Restore:"Restore",OK:"OK",Cancel:"Cancel",Yes:"Yes",No:"No"}; a.registerEnum(c,"WindowBehaviors",{None:0,Resize:1,Minimize:2,Close:4,Pin:8,Maximize:16,Move:32,Reload:64,Default:(1+2+4+8+16+32+64)}); a.registerEnum(c,"WindowAutoSizeBehaviors",{Width:1,WidthProportional:2,Height:4,HeightProportional:8,Default:(2+8)}); a.registerEnum(c,"WindowAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8}); a.registerEnum(c,"WindowMinimizeMode",{SameLocation:1,MinimizeZone:2,Default:1}); c.RadWindow=function(m){c.RadWindow.initializeBase(this,[m]); this._openerElement=null; this._offsetElement=null; this._popupElement=null; this._tableElement=null; this._contentElement=null; this._contentCell=null; this._titleElement=null; this._titleCell=null; this._titlebarElement=null; this._statusCell=null; this._statusMessageElement=null; this._iframe=null; this._dockMode=false; this._isPredefined=false; this._buttonsElement=null; this._buttonsArray=[]; this._iconUrl=""; this._shortCutManager=null; this._tabIndex=null; this.isIE=($telerik.isIE); this._openerElementID=null; this._offsetElementID=null; this._behaviors=c.WindowBehaviors.Default; this._left=null; this._top=null; this._title=""; this._width="300px"; this._minWidth=null; this._minHeight=null; this._defaultMinWidth=null; this._defaultMinHeight=null; this._handlesWidth=null; this._resizeOverlayElement=null; this._height="300px"; this._opacity=100; this._visibleTitlebar=true; this._visibleStatusbar=true; this._modal=false; this._overlay=false; this._keepInScreenBounds=false; this._windowAnimation=null; this._onMouseDownDelegate=null; this._onClickDelegate=null; this._onTitlebarDblclickDelegate=null; this._onTitlebarClickDelegate=null; this._onWindowResizeDelegate=null; this._onIframeLoadDelegate=null; this._onChildPageUnloadDelegate=null; this._onChildPageClickDelegate=null; this._onKeyDownDelegate=null; this._onModalShowHandler=null; this._onModalCloseHandler=null; this._loaded=false; this._isCloned=false; this._restoreRect=null; this._popupBehavior=null; this._popupVisible=false; this._initialHandlesCursor=[]; this._dropDownTouchScroll=null; this._browserWindow=window; this._stylezindex=null; this._renderMode=c.RenderMode.Classic; var n=navigator.userAgent; this._isiPhoneiPadAppleWebkit=n.match(/iPhone|iPad/)&&n.match(/AppleWebKit/); this._iframeWrapper=null; this._ariaSettings=null; this.GetWindowManager=this.get_windowManager; this.BrowserWindow=window; this.GetContentFrame=this.get_contentFrame; this.GetLeftPosition=function(){this.getWindowBounds().x; }; this.GetTopPosition=function(){this.getWindowBounds().y; }; this.GetTitlebar=function(){return this.ui?this.ui.titlebar:null; }; this.GetStatusbar=function(){return this._statusCell; }; this.SetOpenerElementId=this.set_openerElementID; this.SetStatus=this.set_status; this.GetStatus=this.get_status; this.SetModal=this.set_modal; this.SetWidth=this.set_width; this.SetHeight=this.set_height; this.GetWidth=this.get_width; this.GetHeight=this.get_height; this.SetOffsetElementId=this.set_offsetElementID; this.SetTitle=this.set_title; this.MoveTo=this.moveTo; this.Center=this.center; this.SetVisible=this.setVisible; this.SetSize=this.setSize; this.Show=this.show; this.Hide=this.hide; this.GetUrl=this.get_navigateUrl; this.SetUrl=this.setUrl; this.Reload=this.reload; this.SetActive=this.setActive; this.Minimize=this.minimize; this.Restore=this.restore; this.Maximize=this.maximize; this.Close=this.close; this.TogglePin=this.togglePin; this.IsMaximized=this.isMaximized; this.IsMinimized=this.isMinimized; this.IsModal=this.isModal; this.IsClosed=this.isClosed; this.IsPinned=this.isPinned; this.IsVisible=this.isVisible; this.IsActive=this.isActive; this.IsBehaviorEnabled=this.isBehaviorEnabled; }; c.RadWindow.prototype={_getLocalization:function(){return c.RadWindowUtils.Localization; },_getLocalizationString:function(o){var n=this.get_localization(); if(typeof(n)=="string"){n=Sys.Serialization.JavaScriptSerializer.deserialize(n); this.set_localization(n); }var m=this._getLocalization(); if(!n){return m[o]; }return n[o]; },_registerGlobalBodyEventHandlers:function(n){var m=this.get_shortcuts(); if(!m){return; }if(!this._shortCutManager){this._shortCutManager=new c.WindowShortCutManager(m); }if(n){this._onKeyDownDelegate=Function.createDelegate(this,this._onKeyDown); $addHandler(e.documentElement,"keydown",this._onKeyDownDelegate); }else{if(this._onKeyDownDelegate){$removeHandler(e.documentElement,"keydown",this._onKeyDownDelegate); this._onKeyDownDelegate=null; }}},_registerIframeLoadHandler:function(m){if(!this._iframe){return; }if(m){this._onIframeLoadDelegate=Function.createDelegate(this,this._onIframeLoad); $addHandler(this._iframe,"load",this._onIframeLoadDelegate); }else{if(this._onIframeLoadDelegate){$removeHandler(this._iframe,"load",this._onIframeLoadDelegate); this._onIframeLoadDelegate=null; $clearHandlers(this._iframe); }}},_registerWindowResizeHandler:function(m){if(m){this._onWindowResizeDelegate=Function.createDelegate(this,this._maintainMaximizedSize); $addHandler(window,"resize",this._onWindowResizeDelegate); }else{if(this._onWindowResizeDelegate){$removeHandler(window,"resize",this._onWindowResizeDelegate); this._onWindowResizeDelegate=null; }}},_registerOpenerElementHandler:function(n,m){if(!n){return; }if(Sys.UI.DomElement.containsCssClass(n,"RadButton")){n.setAttribute("rwOpener",true); }else{n.removeAttribute("rwOpener"); }if(true==m){this._onClickDelegate=Function.createDelegate(this,this._onClick); a(n).on("click",this._onClickDelegate); }else{a(n).off("click",this._onClickDelegate); this._onClickDelegate=null; }},_registerTitlebarHandlers:function(m){var n=this.ui?this.ui.titleCell||this.ui.titlebar:null; if(m){this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){if(this.isMinimized()){this.restore(); }else{if(this.isBehaviorEnabled(c.WindowBehaviors.Maximize)){if(this.isMaximized()){this.restore(); }else{this.maximize(); }}}}); this._onTitlebarClickDelegate=Function.createDelegate(this,function(){if(this._getWindowController()._activeWindow===this){this.setActive(true); }}); $addHandler(n,"dblclick",this._onTitlebarDblclickDelegate); $addHandler(n,"click",this._onTitlebarClickDelegate); }else{if(n){if(this._onTitlebarDblclickDelegate){$removeHandler(n,"dblclick",this._onTitlebarDblclickDelegate); this._onTitlebarDblclickDelegate=null; }if(this._onTitlebarClickDelegate){$removeHandler(n,"click",this._onTitlebarClickDelegate); this._onTitlebarClickDelegate=null; }$clearHandlers(n); }}},_makeModal:function(m){if(this._onModalShowHandler){this.remove_show(this._onModalShowHandler); this._onModalShowHandler=null; }if(this._onModalCloseHandler){this.remove_close(this._onModalCloseHandler); this._onModalCloseHandler=null; }if(this._modalExtender){this._modalExtender.dispose(); this._modalExtender=null; }if(!m){return; }if(typeof(c.RadWindowManager)!="undefined"&&c.RadWindowManager.isInstanceOfType(this)){return; }this._onModalShowHandler=function(r){if(!r._modalExtender){var q=r._popupElement; var p=r.get_enableAriaSupport(); r._modalExtender=new c.ModalExtender(q,{enableAriaSupport:p,getNodesToHide:function(){return a(q).nextAll(":not(script,link)").get(); },trapTabKey:p}); }r._modalExtender.show(); var o=null; try{o=e.activeElement; }catch(n){e.documentElement.focus(); o=e.activeElement; }if(o&&o.tagName&&o.tagName.toLowerCase()!="body"){var s=(!$telerik.isDescendant(this._contentElement,o)&&this._dockMode); if(!(r._isPredefined)||s){r._focusedPageElement=o; o.blur(); }}if(r.get_centerIfModal()){r.center(); }}; this.add_show(this._onModalShowHandler); this._onModalCloseHandler=function(n){window.setTimeout(function(){if(n._modalExtender){n._modalExtender.hide(); }var p=n._focusedPageElement; if(p){try{p.focus(); }catch(o){}n._focusedPageElement=null; }},10); }; this.add_close(this._onModalCloseHandler); },_enableMoveResize:function(n){if(!this.view){return; }var m={resize:this.isBehaviorEnabled(c.WindowBehaviors.Resize),move:this.isBehaviorEnabled(c.WindowBehaviors.Move)}; if(n){this.view.enableMoveResize(m); }else{this.view.disableMoveResize(m); }},_setResizeOverlayVisible:function(m){if(this._dockMode){return; }var o=this._resizeOverlayElement; if(!o){var p=this._getHandlesWidth(); var n=this._visibleTitlebar?this._getTitlebarHeight():p; o=e.createElement("div"); o.style.position="absolute"; o.style.zIndex="1"; o.style.top=n+"px"; o.style.left=Math.round(p/2)+"px"; o.style.backgroundColor="White"; o.style.filter="alpha(opacity=0)"; o.style.opacity=0; this._contentCell.appendChild(o); this._resizeOverlayElement=o; }this._setResizeOverlaySize(); o.style.display=m?"":"none"; },_setResizeOverlaySize:function(){var n=this._resizeOverlayElement; if(n){var m=this._contentCell; n.style.width=m.offsetWidth+"px"; n.style.height=m.offsetHeight+"px"; }},onResizeStart:function(){if(this.isMaximized()){return false; }this.setActive(true); this._setResizeOverlayVisible(true); this._cachedDragZoneBounds=this._getRestrictionZoneBounds(); var m=new Sys.CancelEventArgs(); this.raiseEvent("resizeStart",m); if(m.get_cancel()){return false; }},onResizing:function(m){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,m)){if(this._dockMode){this.setWidthDockMode(m.width-1); this.setHeightDockMode(m.height-1); }else{this._setResizeOverlaySize(); }var o=this._getCurrentBounds(); var s=this.get_minWidth(); var q=h(this.get_maxWidth(),10); var r=this.get_minHeight(); var p=h(this.get_maxHeight(),10); var n=false; if(m.widthq){var u=s; if(m.widthp){m.height=(m.height0){n.style.display=""; }if(this.get_visibleOnPageLoad()){setTimeout(Function.createDelegate(this,function(){this.show(); }),0); }this._registerWindowResizeHandler(true); var m=this.get_element().className; if(m){this.set_cssClass(m.replace(/^ /,"")); }},initView:function(){var m=c.Window.UIFactory; if(!this.ui||this.ui.window!=this){this.ui=m.getRenderer(this._renderMode,this); }if(!this.view||this.view.window!=this){this.view=m.getView(this._renderMode,this); }},dispose:function(){var n=this; var m=this.get_windowManager(); if(m){if(m.get_preserveClientState()){m.saveWindowState(this); }if(this.get_destroyOnClose()){m.removeWindow(this); }}this.disposeUI(); if(n._keyboardNavigation){n._keyboardNavigation.dispose(); }c.RadWindow.callBaseMethod(this,"dispose"); },disposeUI:function(){if(this._windowAnimation){this._windowAnimation.dispose(); }if(!$telerik.isChrome&&!$telerik.isSafari){this._removeFromDOM=this.get_destroyOnClose(); }this._enableMoveResize(false); this._makeModal(false); this._registerTitlebarHandlers(false); if(this._titleIconElement){$clearHandlers(this._titleIconElement); }this._registerWindowResizeHandler(false); this._registerIframeLoadHandler(false); if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false); }this.set_behaviors(c.WindowBehaviors.None); if(this.view){this.view.dispose(); }if(this.ui){this.ui.dispose(); }this.view=this.ui=null; var n=this._iframe; if(n){n.radWindow=null; var r="sandbox" in e.createElement("iframe"); n.src=r?"about:blank":"javascript:'';"; n.name=""; n.removeAttribute("name"); n.removeAttribute("NAME"); }this._createTouchScrollExtender(false); if(this._contentElement&&this._isPredefined){this._contentElement.innerHTML=""; }var m=this.get_contentElement(); if(this._dockMode&&m){if(Sys&&Sys.WebForms){var q=Sys.WebForms.PageRequestManager.getInstance(); if(q&&q.get_isInAsyncPostBack()){$telerik.disposeElement(m); }}}var o=this._popupElement; if(o&&o.parentNode){o.parentNode.removeChild(o); }this._popupVisible=false; var p=this._popupBehavior; if(this.get_destroyOnClose()&&p){p.dispose(); this._popupBehavior=null; }},hide:function(){this._hide(); this._registerGlobalBodyEventHandlers(false); return true; },clone:function(o){var p=e.createElement("span"); var q; if(o){p.setAttribute("id",o); }var n=this.get_contentElement(); var m=n?n.cloneNode(true):null; if(this._renderMode!=c.RenderMode.Classic){this._contentElement=m; }try{q=$telerik.cloneControl(this,c.RadWindow,p); q._enableRippleEffect=this._enableRippleEffect; }finally{if(this._renderMode!=c.RenderMode.Classic&&n){this.set_contentElement(n); }}return q; },_createTouchScrollExtender:function(o){var m=$get(this.get_id()+"_C"); if(m){var n=this._dropDownTouchScroll; if(n){if(!o){n.dispose(); this._dropDownTouchScroll=null; }}else{if(o){this._dropDownTouchScroll=new c.TouchScrollExtender(m); this._dropDownTouchScroll.initialize(); }}}},set_contentElement:function(m){if(!this._isPredefined&&m.getElementsByTagName("iframe").length==0){this._dockMode=true; }if(this.view){this.view.setContent(m); }},_setShadowCSSClass:function(m){this.ui.setShadowCssClass(m); },get_contentElement:function(){return this._contentElement||(this.ui?this.ui.pendingContent:null); },isCreated:function(){return this._popupElement!=null; },show:function(){var n=this.isCreated(); this._createUI(); var m=new Sys.CancelEventArgs(); this.setZIndexCss(); this.raiseEvent("beforeShow",m); if(m.get_cancel()){return; }if(this.get_navigateUrl()&&(!n||this.get_reloadOnShow())){this.setUrl(this.get_navigateUrl()); }if(!n&&(this.get_initialBehaviors()!=c.WindowBehaviors.None)){this._show(); this._afterShow(); if(this.isInitialBehaviorEnabled(c.WindowBehaviors.Minimize)){this.minimize(); }if(this.isInitialBehaviorEnabled(c.WindowBehaviors.Maximize)){this.maximize(); }if(this.isInitialBehaviorEnabled(c.WindowBehaviors.Pin)){this.togglePin(); }return; }if(this.get_animation()==c.WindowAnimation.None){this._show(); this._afterShow(); }else{this._playAnimation(); }},_show:function(){var q=this; if(this.get_offsetElementID()&&!this._offsetElement){var o=$get(this.get_offsetElementID()); if(o){this._offsetElement=o; }}var n=this._popupBehavior.get_parentElement(); if(this._offsetElement&&!this._offsetSet){this._popupBehavior.set_parentElement(this._offsetElement); this._offsetSet=true; }this.set_visibleTitlebar(this._visibleTitlebar); this.set_visibleStatusbar(this._visibleStatusbar); if(q.get_enableShadow()){q._setShadowCSSClass(true); }else{q._setShadowCSSClass(false); }this._reSetWindowPosition(); this._popupVisible=true; this.setVisible(true); var p=this._getStoredBounds(); if(this._firstShow&&!p){this.set_width(this.get_width()); this.set_height(this.get_height()); }else{this._restoreBounds(); }if(n!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(n); }var m=this.get_contentElement(); if(!this._isPredefned&&m){$telerik.repaintChildren(m); }},_hide:function(){if(!this.get_animation()||this.get_animation()==0){this._afterHide(); }else{if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false); }var n=Function.createDelegate(this,this._afterHide),o=this.isMaximized(),m=this.get_animationDuration(); $telerik.$(this._popupElement).stopTransition().transition({opacity:0},m,"linear",function(){n(o); }); }},_afterHide:function(m){if(!this._popupBehavior){return; }if(m==null){m=this.isMaximized(); }var n=this.isMinimized(); if(m||n){this.restore(); }if($telerik.isFirefox){this.setOverflowVisible(false); }this._popupVisible=false; if($telerik.isIE9||$telerik.isIE10){this._moveElementToShowOutOfView(); }else{this.setVisible(false); }this._getWindowController().notifyWindowClosed(this); this._isClosing=false; },_moveElementToShowOutOfView:function(){if(!this.view){this.initView(); }this.view.moveOutOfSight(); },get_leftHidingPoint:function(){return this._isRightToLeft?10000:-10000; },_afterShow:function(){if($telerik.isIE9||$telerik.isIE10){this._restoreElementToShowStyling(); }this._restoreElementToShowOpacity(); this.setActive(true); if($telerik.isFirefox){this.setOverflowVisible(true); }this._registerGlobalBodyEventHandlers(true); this._storeBounds(); this.raiseEvent("show",new Sys.EventArgs()); var m=this.get_animation()!=c.WindowAnimation.None; if(this.get_autoSize()&&(this._dockMode||m)){this.autoSize(m); }if(this.get_enableAriaSupport()&&this._popupElement&&this.isVisible()){this._popupElement.setAttribute("aria-hidden","false"); }},_restoreElementToShowStyling:function(){if(this._popupBehavior){a(this._popupBehavior.get_elementToShow()).css("overflow",""); }},_restoreElementToShowOpacity:function(){if(this._popupBehavior){var m=a(this._popupBehavior.get_elementToShow()); if(m.css("opacity")==="0"){m.css("opacity",""); }}},_playAnimation:function(){var p=Function.createDelegate(this,function(){var z=this._getCalculatedPopupBounds(); this._setPopupVisible(z.x,z.y); var v=$telerik.getBounds(this._popupElement); var y=this.get_offsetElementID(); if(y){var w=$get(y); if(w){var x=$telerik.getBounds(w); v.x=x.x; v.y=x.y; }}$telerik.$(this._popupElement).hide(); return v; }); var m=this._popupElement; if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false); }var o=this.get_animation(); var u=this._openerElement?$telerik.getBounds(this._openerElement):null; var q=p(); var n=this.get_animationDuration(); var t=""+this._position; var s=null; var r=Function.createDelegate(this,function(){var v=this.get_popupElement(); v.style.filter=""; if($telerik.isIE7){v.style.removeAttribute("filter"); }v.style.opacity=""; if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true); }this._show(); this._afterShow(); }); c.Animations.playJQueryAnimation(m,o,u,q,t,s,r,n); },_onClick:function(m){this.show(); return this._cancelEvent(m); },_onKeyDown:function(m){var n=this._shortCutManager.isShortCutHit(m); if(!n){return; }if(this.isActive()){this.fire(n.get_name()); }},_cancelEvent:function(m){if(m){m.returnValue=false; m.cancelBubble=true; m.preventDefault(); m.stopPropagation(); }return false; },_getWindowController:function(){return c.RadWindowController.getInstance(); },_getReloadOnShowUrl:function(n){var o="rwndrnd="+Math.random(); if(n.indexOf("?")>-1){o="&"+o; }else{o="?"+o; }var m=n.indexOf("#"); n=(m>-1)?n.substr(0,m)+o+n.substr(m):n+o; return n; },getWindowBounds:function(){return this._getCalculatedPopupBounds(); },toString:function(){return"[RadWindow id="+this.get_id()+"]"; },center:function(){var m=this._getCentralBounds(); this.moveTo(m.x,m.y); },moveTo:function(q,r){var n=this._popupElement; if(n){var m=this.ui.getBounds(); var o=this._getRestrictionZoneBounds(); if(o){var p=this._checkRestrictionZoneBounds(null,new Telerik.Web.UI.Bounds(q+o.x,r+o.y,m.width,m.height)); if(!p){return false; }}}q=h(q,10); r=h(r,10); this._createUI(); this._setPopupVisible(q,r); this._storeBounds(); return true; },setZIndexCss:function(){var p=this.ui,m=p.container; var o=h(m.style.zIndex,10); if(!this.isMaximized()){var n=p.get_initialZIndexCss()||Telerik.Web.UI.RadWindowUtils.get_newZindex(o); m.style.zIndex=""+n; }},setSize:function(n,m){this._firstShow=false; this.set_width(n); this.set_height(m); this._storeBounds(); },_calculateBoundsToFit:function(I,r){var v=this._renderMode==c.RenderMode.Lite; var J=this.get_minWidth()-this._getHandlesWidth(); var H=this._tableElement?(h(this._tableElement.offsetHeight,10)-h(this.get_height(),10)):0; var K=this._getTitleElement(); if(K){K.style.width=!v?"1px":""; }var p; var q; var B=I.parentNode; var C=B.style.height; var D=B.style.width; var u=I.nodeName=="IFRAME"; I.style.height=!v||u?"1px":""; I.style.width=!v||u?"1px":""; if(v){B.style.height="1px"; B.style.width="1px"; }if(this._dockMode){var A=I.style.overflow; var E=I.style.position; a(I).css({position:"absolute",overflow:"visible"}); try{var F=I.scrollWidth+$telerik.getBorderBox(I).horizontal; q=F>J?F:J; p=I.scrollHeight; if(this._contentCell){Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading"); }}finally{a(I).css({position:E,overflow:A}); }}else{var m=r.getElementsByTagName("body")[0]; var o=m&&m.scrollWidth||0; var n=m&&m.scrollHeight||0; q=Math.max(r.scrollWidth,o); if(q0){t-=H; }}var M=N; var s=t; if(N>L.width){M=L.width; s+=j; }if(t>L.height){s=L.height; M+=j; }var z=this.get_minWidth(); var y=this.get_minHeight(); var w=h(this.get_maxHeight(),10); var x=h(this.get_maxWidth(),10); if(z>M){M=z; }if(y>s){s=y; }if(w&&ws){r=Math.round(Math.abs((s-o)/2)); if(this.isAutoSizeBehaviorEnabled(c.WindowAutoSizeBehaviors.Default)){var n=this._dockMode?window:this.BrowserWindow; r+=m?Math.max(n.document.documentElement.scrollTop,n.document.body.scrollTop):Math.max(n.document.documentElement.scrollLeft,n.document.body.scrollLeft); }}return r; },_maintainMaximizedSize:function(){if(!this.isMaximized()){return; }if(this.view){this.view.setMaximizeSize(); }},_enablePageScrolling:function(m){if(m){a(g).removeClass(i); a(d).removeClass(i); }else{a(g).addClass(i); a(d).addClass(i); }},_getRestrictionZoneBounds:function(){var m=null; var n=this._getRestrictionZoneElement(); if(n){m=$telerik.getBounds(n); m.scrollLeft=0; m.scrollTop=0; }return m; },_getRestrictionZoneElement:function(){var m=this.get_restrictionZoneID(); return m&&$get(m); },_storeBounds:function(){if(!this.isCreated()){return; }var m=this._getCurrentBounds(); if(this.isMaximized()){return false; }if(this.isMinimized()){if(this._restoreRect){m.width=this._restoreRect.width; m.height=this._restoreRect.height; }else{m.width=this.get_width(); m.height=this.get_height(); }}if(($telerik.isIE9||$telerik.isIE10)&&this._restoreRect&&m.x==this.get_leftHidingPoint()&&m.y==-10000){m.x=this._restoreRect.x; m.y=this._restoreRect.y; }this._restoreRect=m; },_restoreBounds:function(){if(!this._restoreRect){return; }var m=this._restoreRect; this.setSize(m.width,m.height); this.moveTo(m.x,m.y); },_getStoredBounds:function(){if(this._restoreRect){return this._restoreRect; }},_deleteStoredBounds:function(){this._restoreRect=null; },_getCurrentBounds:function(){var m=this.ui.getBounds(); if(this._firstShow!=true){this._updateWindowSize(this._height); this._firstShow=true; }var n=this._getRestrictionZoneBounds(); if(n){m.x-=n.x; m.y-=n.y; }return m; },_getCentralBounds:function(){var m=this._getCurrentBounds(); var n=this._getViewportBounds(); var o=h((n.width-m.width)/2,10); var p=h((n.height-m.height)/2,10); m.x=o+n.scrollLeft; m.y=p+n.scrollTop; return m; },_getViewportBounds:function(){var p=this._getRestrictionZoneBounds(); if(p){return p; }var m=$telerik.getClientBounds(); var n=$telerik.getCorrectScrollLeft(e.documentElement)||$telerik.getCorrectScrollLeft(e.body); var o=e.documentElement.scrollTop||e.body.scrollTop; m.scrollLeft=n; m.scrollTop=o; if(this.isIE){if(m.width==0){m.width=e.body.clientWidth; }if(m.height==0){m.height=e.body.clientHeight; }}return m; },_getCalculatedPopupBounds:function(){var v=this; var o=v.isModal(); var m=v.isMaximized(); var n=v.isMinimized(); var t=this._getStoredBounds(); if(t&&!(m||n)){return t; }var r=this._getCurrentBounds(); var q=this._offsetElement; if((!o&&v._top==null&&v._left==null&&!q)||(o&&v.get_centerIfModal())){r=this._getCentralBounds(); }else{if(q){r.y=0; r.x=0; }else{var s=this._getViewportBounds(); r.x=s.scrollLeft; r.y=s.scrollTop; }if(!m){var p=this._left?this._left:0; r.x+=p; var u=this._top?this._top:0; r.y+=u; }}return r; },_checkRestrictionZoneBounds:function(o,m){var n=o; if(!n){n=this._getRestrictionZoneBounds(); if(!n){return true; }}return c.ResizeExtender.containsBounds(n,m); },_getTitlebarHeight:function(){if(!this.ui){return 0; }return this.ui.getTitlebarHeight(); },_reSetWindowPosition:function(){var m=this._getCalculatedPopupBounds(); this._setPopupVisible(m.x,m.y); },_fixIeHeight:function(p,n){if("CSS1Compat"==e.compatMode){var m=(p.offsetHeight-h(n,10)); if(m>0){var o=(h(p.style.height,10)-m); if(o>0){p.style.height=o+"px"; }}}},_setPopupVisible:function(m,n){var o=this._getRestrictionZoneBounds(); if(o){m+=o.x; n+=o.y; }if(this.isCreated()){this.view.moveTo(m,n); }},_isWindowRightToLeft:function(){var n=this._isRightToLeft; if(n==null){var m=this.get_element(); var o=m.parentNode?m:this._getDefaultParent(); n=this._isRightToLeft=$telerik.isRightToLeft(o); }return n; },_createStatusbarResizer:function(m){if(this.ui){this.ui.createStatusbarResizer(); }},_createUI:function(){this.initView(); this.ui.createUI(); },_getDefaultParent:function(){var m=this.get_formID()?e.getElementById(this.get_formID()):null; if(!m){if(e.forms&&e.forms.length>0){m=e.forms[0]; }else{m=e.body; }}return m; },_getStatusMessageElement:function(){if(this.ui){return this.ui.getStatusMessageNode(); }},_getTitleCommandButtonsHolder:function(){if(this.ui){return this.ui.getTitleCommandsContainer(); }},_getTitleElement:function(){if(this.ui){return this.ui.getTitleNode(); }},_getTitleIcon:function(){if(this.ui){return this.ui.getIconNode(); }},_getTitleCommandButton:function(m){if(this.ui){return this.ui.getCommandButton(m); }},getTitleCommandButton:function(m){return this._getTitleCommandButton(m); },_getHandlesWidth:function(){if(!this._handlesWidth&&this.ui){this._handlesWidth=this.ui.getHandlesWidth(); }return this._handlesWidth; },get_defaultMinWidth:function(){if(this.ui){return this.ui.get_uiMinWidth(); }},get_defaultMinHeight:function(){if(this.ui){return this.ui.get_uiMinHeight(); }},setOverflowVisible:function(o){if(!o&&this._overflowHidden){return; }var p="hidden"; var n="hidden"; var s="hidden"; var r; var m; if(!this._dockMode){try{var q=this.get_contentFrame(); if(q){q.style.overflow=o?"":"hidden"; }r=q.contentWindow.document.documentElement; if(!r){return; }m=q.contentWindow.document.body; if(!o){this._oldBodyOverflow=m.style.overflow; this._oldDocOverflow=r.style.overflow; this._overflowHidden=true; }}catch(t){}}if(o){n=this._oldBodyOverflow; s=this._oldDocOverflow; p="auto"; this._overflowHidden=false; }if(this._dockMode){this.get_contentElement().style.overflow=p; }else{if(r&&m){if(s||s==""){r.style.overflow=s; }if(n||n==""){m.style.overflow=n; }}}},_updateTitleWidth:function(){if(this.ui){this.ui.updateTitleWidth(); }},_addWindowToDocument:function(){this.view.moveToDefaultParent(); },_createBackReference:function(){var o=this; if(!o.Argument){o.Argument={}; }var n=this._iframe; try{n.radWindow=o; if(n.contentWindow!=null){n.contentWindow.radWindow=o; }}catch(m){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this.get_skin()+" rwNormalWindow rwTransparentWindow"; },_configureMinimizeButton:function(m){var o=(true==m)?this._getLocalizationString("Restore"):this._getLocalizationString("Minimize"); var n=(true==m)?this.restore:this._minimize; var q=this._getTitleCommandButton("Minimize"); if(!(this.isBehaviorEnabled(c.WindowBehaviors.Close))&&q){var r=q.parentNode; var p=this._isWindowRightToLeft()?"right":"left"; if(true==m){p=(p=="right")?"left":"right"; }r.style.styleFloat=p; r.style.cssFloat=p; }this._registerTitlebarHandlersButton("Minimize",o,n); },_configureMaximizeButton:function(m){var o=(true==m)?this._getLocalizationString("Restore"):this._getLocalizationString("Maximize"); var n=(true==m)?this.restore:this.maximize; this._registerTitlebarHandlersButton("Maximize",o,n); },_registerTitlebarHandlersButton:function(n,o,m){if(this.ui){this.ui.changeCommandButtonByName(n,o,Function.createDelegate(this,m)); }},isCloned:function(){return this._isCloned; },isBehaviorEnabled:function(m){return !!(m&this.get_behaviors()); },isInitialBehaviorEnabled:function(m){return !!(m&this.get_initialBehaviors()); },isAutoSizeBehaviorEnabled:function(m){return !!(m&this.get_autoSizeBehaviors()); },setVisible:function(m){if(!this.view){this.initView(); }if(m){this.view.show(); }else{this.view.hide(); }},isVisible:function(){return this._popupVisible; },isModal:function(){return this._modal; },isActive:function(){return this.view&&this.view.isActive(); },isPinned:function(){var m=this._getTitleCommandButton("Pin"); return(m&&Sys.UI.DomElement.containsCssClass(m,"on")); },isClosed:function(){return(!this.isVisible()); },isMinimized:function(){return(this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMinimizedWindow")); },isMaximized:function(){return(this._popupElement&&Sys.UI.DomElement.containsCssClass(this._popupElement,"rwMaximizedWindow")); },_moveToMinimizeZone:function(){var m=$get(this.get_minimizeZoneID()); if(m){if(this.isPinned()){this._isMinimizePinned=true; this.togglePin(); }this.view.minimizeToZone(m); }},_moveToDocument:function(){this.view.revertToDefaultParent(); if(this._isMinimizePinned){this._isMinimizePinned=false; this.togglePin(); }},minimize:function(){this._clearTouchEventIdentifier(); if(this._minimize()!==false){this.setActive(true); }},_minimize:function(){this._clearTouchEventIdentifier(); if(!this.isCreated()){return false; }var m=this.onCommand("Minimize"); if(!m){return false; }if(this.isMaximized()){this._normalizeWindowRootCss(); this._restoreBounds(); }if(this.view){this.view.minimize(); }},restore:function(){var m=this; this._clearTouchEventIdentifier(); if(!m.isCreated()||m.isClosed()){return; }var n=m.onCommand("Restore"); if(!n){return; }m._configureMinimizeButton(); m._configureMaximizeButton(); if(m.isMinimized()&&m.get_minimizeZoneID()){m._moveToDocument(); }if(m.isMaximized()){m.view.restoreResizeHandlesCursor(); }m._normalizeWindowRootCss(); m._enablePageScrolling(true); m._restoreBounds(); m.setVisible(true); if(m._enableShadow&&!$telerik.isIE6){m._setShadowCSSClass(true); }if(m.get_showOnTopWhenMaximized()&&m._restoreZindex){m._popupElement.style.zIndex=m._restoreZindex; if(m.get_modal()&&m._modalExtender){m._modalExtender.updateModalOverlayZIndex(); }m._restoreZindex=null; }m.setVisible(true); m.setActive(true); if(this.isVisible()){m._show(); }m._restoreDocumentScrollPosition(); },_restoreDocumentScrollPosition:function(){var r=this; var q=r._restoreOptions; var m=a(e); var n=e.body; var p=function(s,t){if(t&&t>0){m["scroll"+s](t); }}; var o=function(s,t){if(t&&t>0){n["scroll"+s]=t; }}; if(q){p("Top",q.documentScrollTop); p("Left",q.documentScrollLeft); o("Left",q.bodyScrollLeft); o("Top",q.bodyScrollTop); }},maximize:function(){var m=this; this._clearTouchEventIdentifier(); if(!this.isCreated()){return; }var n=this.onCommand("Maximize"); if(!n){return; }this._storeBounds(); if(this.isMinimized()&&this.get_minimizeZoneID()){this._moveToDocument(); }if(this.isMinimized()){this._normalizeWindowRootCss(); this._checkRestrictionZoneBounds=function(){return true; }; this._restoreBounds(); this._checkRestrictionZoneBounds=c.RadWindow.prototype._checkRestrictionZoneBounds; }m._saveDocumentScrollPosition(); m._removeDocumentBodyScrolling(); m.view.maximize(); if(!m.get_restrictionZoneID()){a(m.get_popupElement()).css({left:0,top:0}); }if(!this.isActive()){this.setActive(true); }},_saveDocumentScrollPosition:function(){var o=this; var m=a(e); var n=e.body; o._restoreOptions={documentScrollLeft:m.scrollLeft(),documentScrollTop:m.scrollTop(),bodyScrollLeft:n.scrollLeft,bodyScrollTop:n.scrollTop}; },_removeDocumentBodyScrolling:function(){var m=e.body; m.scrollLeft=0; m.scrollTop=0; },setActive:function(m){if(this.isCreated()&&this.view){this.view.setActive(m); }if(m){this._getWindowController().set_activeWindow(this); this.raiseEvent("activate",new Sys.EventArgs()); }},togglePin:function(){this._clearTouchEventIdentifier(); if(!this.isCreated()){return; }var o=this.onCommand("Pin"); if(!o){return; }this.setActive(true); var n=this.isPinned(); var m=n?this._getLocalizationString("PinOn"):this._getLocalizationString("PinOff"); this.view.toggleCommand("Pin"); this._registerTitlebarHandlersButton("Pin",m,this.togglePin); c.RadWindowUtils.setPinned(!n,this); },reload:function(){this._clearTouchEventIdentifier(); if(!this.isCreated()){return; }var n=this.onCommand("Reload"); if(!n){return; }if(!this._iframe){return; }this._onWindowUrlChanging(); try{this._iframe.contentWindow.location.reload(); if(($telerik.isChrome||$telerik.isSafari)&&this._iframe.contentWindow.document.domain!=e.domain){this._onWindowUrlChanged(); }}catch(m){this._onWindowUrlChanged(); }},fire:function(m){if(m&&typeof(this[m])=="function"){this[m](); }else{var n=this.get_windowManager(); if(!n){return; }if(m&&typeof(n[m])=="function"){n[m](); }}},_normalizeWindowRootCss:function(){var n=this._popupElement; if(n){$telerik.removeCssClasses(n,["rwMinimizedWindow","rwMaximizedWindow","rwMinimizedWindowShadow"]); Sys.UI.DomElement.addCssClass(n,"rwNormalWindow"); var m=n._hideWindowedElementsIFrame; if(m){Sys.UI.DomElement.removeCssClass(m,"rwMinimizedWindowOverlay"); }}this._updateTitleWidth(); },close:function(n){if(this.isClosed()){return; }var o=new Sys.CancelEventArgs(); var p=(typeof(n)!="undefined"&&!(this._isDomEventObject(n)))?n:null; o._argument=p; o.get_argument=function(){return this._argument; }; this.raiseEvent("beforeClose",o); if(o.get_cancel()){return; }this._isClosing=true; this.hide(); var m=new Sys.EventArgs(); m._argument=p; m.get_argument=function(){return this._argument; }; this.raiseEvent("close",m); this._enablePageScrolling(true); this._normalizeWindowRootCss(); if(this._isDomEventObject(n)){n=null; }this._invokeDialogCallBackFunction(n); if(this.get_destroyOnClose()&&!this._dockMode){this.dispose(); }},_invokeDialogCallBackFunction:function(n){var m=this.get_clientCallBackFunction(); if(m){if("string"==typeof(m)){m=eval(m); }if("function"==typeof(m)){m(this,n); }}},_isDomEventObject:function(m){return m instanceof Sys.UI.DomEvent||m instanceof a.Event; },onCommand:function(n){var m=new Sys.CancelEventArgs(); m._commandName=n; m.get_commandName=function(){return this._commandName; }; this.raise_command(m); if(m.get_cancel()){return false; }return true; },setUrl:function(n){if(this._dockMode){return; }this._createUI(); this.set_navigateUrl(n); var m=n; if(this.get_reloadOnShow()){m=this._getReloadOnShowUrl(m); }this.view.setUrl(m); if(!this._loaded){this._registerIframeLoadHandler(true); }this._loaded=true; },_registerChildPageHandlers:function(m){var n=null; try{n=this._iframe.contentWindow.document; if(n.domain!=e.domain){return; }}catch(o){return; }if(null==n){return; }if(m){this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload); this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate; this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick); $telerik.addExternalHandler(n,"click",this._onChildPageClickDelegate); }else{if(this._onChildPageClickDelegate){$telerik.removeExternalHandler(n,"click",this._onChildPageClickDelegate); this._onChildPageClickDelegate=null; }}},_onChildPageUnload:function(m){this._registerChildPageHandlers(false); if(this._removeFromDOM&&!$telerik.isChrome&&!$telerik.isSafari){this._removeFromDOM=false; var n=this._popupElement; if(n&&n.parentNode){n.parentNode.removeChild(n); }}},_onChildPageClick:function(m){if(!this.isVisible()||this.isClosed()){return; }var n=m.target?m.target:m.srcElement; if(n){if(n.tagName=="INPUT"&&n.type=="button"){return; }else{if(n.tagName=="BUTTON"||n.tagName=="A"){return; }}}this.setActive(true); },_onIframeLoad:function(){this._onWindowUrlChanged(); if($telerik.isFirefox){this.setOverflowVisible(true); }this._registerChildPageHandlers(true); this.raiseEvent("pageLoad",new Sys.EventArgs()); if(this.get_autoSize()){var o=this.get_animation()!=c.WindowAnimation.None; this.autoSize(o); }var n=null; try{n=this._iframe.contentWindow; n.close=Function.createDelegate(this,function(){this.close(); }); }catch(m){return false; }},_onWindowUrlChanging:function(){if(this.isCreated()){this.view.onUrlChanging(); }},_onWindowUrlChanged:function(){if(this.isCreated()){this.view.onUrlChanged(); }},_updatePopupZindex:function(){if(this._popupBehavior){if(this.isVisible()){this._popupBehavior.show(); }}},_updateOpacity:function(){var m=this._dockMode?this.get_contentElement():this.get_contentFrame(); if(m){if(this._opacity<100){if(this._contentCell){this._contentCell.style.background="none transparent"; }var n=m.style; n.filter="alpha(opacity="+this._opacity+")"; n.opacity=(this._opacity/100); }else{if(this._contentCell){this._contentCell.style.background=""; }if($telerik.isIE){if(this._contentCell){this._contentCell.removeAttribute("style"); }m.style.removeAttribute("filter"); m.style.removeAttribute("opacity"); }else{m.style.filter=""; m.style.opacity=""; }}}},get_zindex:function(){return this.ui?this.ui.get_zIndexCss():-1; },get_browserWindow:function(){return this._browserWindow; },get_contentFrame:function(){return this._iframe; },get_offsetElementID:function(){return this._offsetElementID; },set_offsetElementID:function(m){if(this._offsetElementID!=m){this._offsetElementID=m; this._offsetElement=$get(m); this._deleteStoredBounds(); this._offsetSet=false; }if(this.isVisible()){this._show(); }},get_openerElementID:function(){return this._openerElementID; },set_openerElementID:function(m){if(this._openerElementID!=m){if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false); this._openerElement=null; }this._openerElementID=m; if(this._openerElementID){this._openerElement=$get(this._openerElementID); }if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,true); }}},get_left:function(){return this._left; },set_left:function(n){if(this._left!=n){var m=h(n,10); this._left=m||m==0?m:null; this._positionX=this._left; }},get_top:function(){return this._top; },set_top:function(n){if(this._top!=n){var m=h(n,10); this._top=m||m==0?m:null; this._positionY=this._top; }},get_stylezindex:function(){if(this.ui){return this.ui.get_initialZIndexCss(); }},get_title:function(){return this._title; },set_title:function(m){if(this._title!=m){this._title=m; }if(this.isCreated()){this.view.setTitleText(this._title); }},get_tabIndex:function(){return this._tabIndex; },set_tabIndex:function(m){this._tabIndex=m; if(this.isCreated()){this.view.setTabIndex(this._tabIndex); }},get_width:function(){return h(this._width,10); },_fixSizeValue:function(m){m=""+m; if(-1==m.indexOf("px")){m=h(m,10); if(!isNaN(m)){m=m+"px"; }else{m=""; }}return m; },set_width:function(r){if(null==r){return false; }if(this.isMaximized()){return false; }var o=this.get_minWidth(); if(o&&o>r){r=o; }var n=h(this.get_maxWidth(),10); if(n&&no){r=n; }r=this._fixSizeValue(r); if(this.isCreated()){var p=this.ui.getBounds(); var m=h(r,10); if(isNaN(m)){m=p.width; }var q=this._checkRestrictionZoneBounds(null,new Telerik.Web.UI.Bounds(p.x,p.y,m,p.height)); if(!q){return false; }}if(this._width!=r){this._width=r; }if(this._dockMode){this.setWidthDockMode(this.get_width()); }if(this.isCreated()){if(!this.popupElementIsOutOfView()){this._deleteStoredBounds(); }this.view.setWidth(this._width); }this._updateTitleWidth(); return true; },popupElementIsOutOfView:function(){return !!this.view&&this.view.isOutOfSight(); },get_minWidth:function(){var n=h(this._minWidth,10); if(!this.isCreated()){return n; }var m=this.get_defaultMinWidth(); return(n&&(n>m))?n:m; },set_minWidth:function(m){if(this._minWidth!=m){this._minWidth=m; }},get_minHeight:function(){var n=h(this._minHeight,10); if(!this.isCreated()){return n; }var m=this.get_defaultMinHeight(); return(n&&(n>m))?n:m; },set_minHeight:function(m){if(this._minHeight!=m){this._minHeight=m; }},get_height:function(){return h(this._height,10); },set_height:function(r){var n; if(null==r){return false; }if(this.isMaximized()){return false; }var o=this.get_minHeight(); if(o&&o>r&&(!n||(n&&n>=o))){r=o; }n=h(this.get_maxHeight(),10); if(n&&n100?100:m; this._opacity=m<0?0:m; if(this.isCreated()){this._updateOpacity(); }}},get_iconUrl:function(){return this._iconUrl; },set_iconUrl:function(m){this._iconUrl=m; if(this._titleIconElement){if(!this.get_iconUrl()||this.get_iconUrl()==""){this._titleIconElement.className="rwIcon"; this._titleIconElement.style.background=""; }else{this._titleIconElement.className="rwIcon rwCustomIcon"; this._titleIconElement.style.background="transparent url('"+m+"') no-repeat scroll 0px 0px"; }}},get_renderMode:function(){return this._renderMode; },set_renderMode:function(m){this._renderMode=m; },get_restrictionZoneID:function(){return this._restrictionZoneID; },set_restrictionZoneID:function(m){this._restrictionZoneID=m; if(m&&this.isCreated()){this.fitInRestrictionZone(); }},fitInRestrictionZone:function(){var n=this._getCurrentBounds(); var p=this._getRestrictionZoneElement(); var o=this._getRestrictionZoneBounds(); var m=$telerik.getBorderBox(p); var r={x:o.x+m.left,y:o.y+m.top,width:o.width-m.horizontal,height:o.height-m.vertical}; var q={width:0,height:0}; if(n.xr.width){n.x=r.width-n.width+m.left; if(n.xr.height){n.y=r.height-n.height+m.top; if(n.y"):document.createElement("iframe"); l.name=x; l.src="javascript:'';"; l.style.width="100%"; l.style.height="100%"; l.style.border="0px"; l.frameBorder="0"; if($telerik.isIE8){l.style.display="block"; }this.contentFrame=J._iframe=l; if(($telerik.isMobileSafari||J._isiPhoneiPadAppleWebkit)&&!J._isPredefined){var t=document.createElement("div"); a(t).addClass("rwIframeWrapperIOS"); t.appendChild(this.contentFrame); this.contentCell.appendChild(t); if(J._isiOS5Safari){J.setContentFixedHeight(J.get_height(),t); }J._iframeWrapper=t; }else{this.contentCell.appendChild(J._iframe); }J._createBackReference(); }J._updateOpacity(); }if(!$telerik.isTouchDevice){this.container.style.Transform="none"; this.container.style.BackfaceVisibility="visible"; this.container.style.webkitTransform="none"; this.container.style.webkitBackfaceVisibility="visible"; this.container.style.OTransform="none"; this.container.style.OBackfaceVisibility="visible"; this.container.style.MozTransform="none"; this.container.style.MozBackfaceVisibility="visible"; this.container.style.msTransform="none"; this.container.style.msBackfaceVisibility="visible"; }if(!J._popupBehavior){J.set_behaviors(J._behaviors); this.popupBehavior=J._popupBehavior=$create(Telerik.Web.PopupBehavior,{id:(new Date()-100)+"PopupBehavior",parentElement:null,overlay:J._overlay,keepInScreenBounds:J._keepInScreenBounds},null,null,this.container); }},setContent:function(i){this.contentCell.appendChild(i); i.style.display=""; this.content=this.window._contentElement=i; },get_container:function(){return this.container; },getHandlesWidth:function(){if(!this._handlesWidth){var j=this.table; if(!j){return 0; }var i=parseInt($telerik.getCurrentStyle(j.rows[2].cells[0],"width"),10); if(!i){return 0; }this._handlesWidth=2*i; }return this._handlesWidth; },setShadowCssClass:function(i){if(i){Sys.UI.DomElement.addCssClass(this.container,"rwShadow"); Sys.UI.DomElement.addCssClass(this.table,"rwShadow"); }else{Sys.UI.DomElement.removeCssClass(this.container,"rwShadow"); Sys.UI.DomElement.removeCssClass(this.table,"rwShadow"); }},getBounds:function(){var j=this.container; var k=(j.style.display=="none"); j.style.display=""; var i=$telerik.getBounds(j); if(k){j.style.display="none"; }return i; },updateTitleWidth:function(){if(this.window._visibleTitlebar&&!this.window.isMinimized()){var p=this.getTitleNode(); if(!p){return; }p.style.width="1px"; var q=0; var j=this.getTitleCommandsContainer(); var i=j.offsetWidth; if(i>0){var m=j.getElementsByTagName("LI"); if(m.length==0){i=0; }else{if(m[0]&&m[0].offsetWidth>0){i=m.length*m[0].offsetWidth; }}j.style.width=i?i+"px":""; q+=i; }var k=this.getIconNode(); var l=k.offsetWidth; if(l>0&&k.parentNode.tagName=="TD"){k.parentNode.style.width=l+"px"; q+=l; }q+=this.getHandlesWidth(); var n=0; var o=this.titlebar; n=o?o.offsetWidth-q:q; if(n>0){p.style.width=n+"px"; }}},getTitleNode:function(){if(!this.title){this.createTitle(); }return this.title; },createTitle:function(){var i=document.createElement("em"); i.setAttribute("unselectable","on"); if(this.window.get_enableAriaSupport()){i.id=this.window.get_id()+"_title"; i.setAttribute("role","label"); }this.title=this.window._titleElement=i; return i; },getIconNode:function(){if(!this.icon){this.createIcon(); }return this.icon; },createIcon:function(){var i=document.createElement("a"); i.className="rwIcon"; $addHandler(i,"mousedown",this.window._cancelEvent); this.icon=this.window._titleIconElement=i; },getTitleCommandsContainer:function(){if(!this.commandsContainer){this.createTitleCommandsContainer(); }return this.commandsContainer; },createTitleCommandsContainer:function(){var i=document.createElement("ul"); i.className="rwControlButtons"; if(this.window.get_enableAriaSupport()){i.setAttribute("role","toolbar"); }this.commandsContainer=this.window._buttonsElement=i; },getStatusMessageNode:function(){if(!this.statusMessage){this.createStatusMessage(); }return this.statusMessage; },createStatusMessage:function(){var i=document.createElement("input"); i.id=this.window.get_id()+"_status"; i.readOnly="readonly"; i.setAttribute("unselectable","on"); i.setAttribute("tabindex","-1"); this.statusMessage=this.window._statusMessageElement=i; },getStatusbar:function(){return this.statusCell||this.createStatusbar; },createStatusbar:function(i){var k=this.table; var j=d(); j.style.width="100%"; this.statusCell=this.window._statusCell=k.rows[2].cells[1]; this.statusbar=this.statusCell.parentNode; this.statusCell.innerHTML=""; this.statusCell.appendChild(j); if(!i){e(j,this.getStatusMessageNode()); }if(this.window.isBehaviorEnabled(b.WindowBehaviors.Resize)){this.createStatusbarResizer(j); }if(i){e(j,this.getStatusMessageNode()); }},createStatusbarResizer:function(){if(this.bottomResizer){return; }var i=this.statusCell.firstChild.rows[0].insertCell(-1); i.style.width="15px"; var j=document.createElement("div"); i.appendChild(j); this.bottomResizer=this.window._bottomResizer=j; },getCommandButtons:function(){return a(this.commandsContainer).find("a[class$='Button']"); },getCommandButton:function(i){if(!i||!this.commandsContainer){return null; }var j=i.toLowerCase(); j=j.charAt(0).toUpperCase()+j.substring(1); i="rw"+j+"Button"; return a("."+i,this.commandsContainer)[0]; },createCommandButton:function(i){var k=document.createElement("li"); var j=document.createElement("a"); j.href="javascript:void(0);"; j.className=i[0]; j.setAttribute("title",i[1]); if(this.window.get_enableAriaSupport()){k.setAttribute("role","presentation"); j.setAttribute("role","button"); }this._setTabIndex(j); this.attachButtonEvents(j,i[2]); var l=document.createElement("span"); l.innerHTML=i[1]; j.appendChild(l); k.appendChild(j); this.commandsContainer.appendChild(k); return j; },changeCommandButton:function(i,k,j){if(!i){return; }i.setAttribute("title",k); i.innerHTML=k; this.clearCommandButton(i); this.attachButtonEvents(i,j); },changeCommandButtonByName:function(j,l,k){var i=this.getCommandButton(j); if(i){this.changeCommandButton(i,l,k); }},clearCommandButtons:function(){var k=a(this.commandsContainer); var j=this.getCommandButtons(); for(var l=0; lf?h-f:h; var i=h+"px"; j.style.height=i; this._fixTableHeightInIE(j,h); g.style.height=i; },setContentFixedHeight:function(h,f){if(!f){return; }var l=this.ui; var i=this._substractWrappersBorder(h); var m=this.window.isVisible(); var g=l.table.rows[3].cells[1]; var k=l.table.rows[0].cells[1]; var j=l.table.rows[2].cells[1]; i-=m?parseInt($telerik.getBounds(g).height,10):parseInt($telerik.getCurrentStyle(g,"height"),10); if(this.window._visibleTitlebar){i-=m?parseInt($telerik.getBounds(l.titlebar).height,10):parseInt($telerik.getCurrentStyle(l.titlebar,"height"),10); i-=m?parseInt($telerik.getBounds(l.topResizer).height,10):parseInt($telerik.getCurrentStyle(l.topResizer,"height"),10); }else{i-=m?parseInt($telerik.getBounds(k).height,10):parseInt($telerik.getCurrentStyle(k,"height"),10); }if(this.window._visibleStatusbar){i-=m?parseInt($telerik.getBounds(j).height,10):parseInt($telerik.getCurrentStyle(j,"height"),10); }if(i>0){f.style.height=i+"px"; }},setContentWidth:function(f){if(!this.ui.content){return; }var g=this.window._substractWrappersBorder(f)-this.ui.getHandlesWidth(); if(g>0){this.ui.content.style.width=g+"px"; }},setTitleText:function(f){if(!this.ui.title){return; }this.ui.title.innerHTML=f||" "; this.ui.updateTitleWidth(); },showStatusbar:function(){this._displayStatusbar("",true); },hideStatusbar:function(){this._displayStatusbar("none",false); },_displayStatusbar:function(h,f){var g=this.ui.statusbar; d(g,h); if(this._hasAriaSupport()){c(g,f); }},showShadow:function(){this.ui.setShadowCssClass(true); },hideShadow:function(){this.ui.setShadowCssClass(false); },moveOutOfSight:function(){var g=this.ui.popupBehavior; if(g){this.window._storeBounds(); var f=g.get_elementToShow(); a(f).css({display:"",position:"absolute",top:"-10000px",left:this.window.get_leftHidingPoint()+"px",overflow:"hidden"}); if(f._hideWindowedElementsIFrame&&f._hideWindowedElementsIFrame.style){f._hideWindowedElementsIFrame.style.display="none"; }}this._ariaHide(); },isOutOfSight:function(){var f=this.ui.container; if(!f){return false; }var g=parseInt(f.style.left,10); return($telerik.isIE&&($telerik.isIE9||$telerik.isIE10))&&g==this.window.get_leftHidingPoint(); },enableMoveResize:function(f){this.disableMoveResize(f); if(!this.ui.container){return; }var j=this.ui.table.rows; var g={}; var i=this.window._isWindowRightToLeft(); if(f.resize){this.ui.createStatusbarResizer(); this.ui.bottomResizer.style.display=""; if(i){g={nw:j[0].cells[2],n:this.ui.topResizer,ne:j[0].cells[0],w:[j[1].cells[2],j[2].cells[2]],e:[j[1].cells[0],j[2].cells[0]],sw:j[3].cells[2],s:j[3].cells[1],se:[j[3].cells[0],this.ui.bottomResizer]}; }else{g={nw:j[0].cells[0],n:this.ui.topResizer,ne:j[0].cells[2],w:[j[1].cells[0],j[2].cells[0]],e:[j[1].cells[2],j[2].cells[2]],sw:j[3].cells[0],s:j[3].cells[1],se:[j[3].cells[2],this.ui.bottomResizer]}; }}if(f.move){g.move=this.ui.titleCell; }this.resizeExtender=this.window._resizeExtender=new Telerik.Web.UI.ResizeExtender(this.window,this.ui.container,g,this.ui.table); var h=this.window._dockMode?null:this.ui.contentFrame; this.resizeExtender.set_iframeToSkip(h); },disableMoveResize:function(f){if(this.resizeExtender){this.resizeExtender.dispose(); this.resizeExtender=this.window._resizeExtender=null; }if(f.Resize&&this.ui.bottomResizer){this.ui.bottomResizer.style.display="none"; }},setCommandButtons:function(f){var g=[]; this.ui.clearCommandButtons(); for(var h=0; h/g,">")); }}catch(g){}},updatePopupZindex:function(){var f=this.ui.popupBehavior; if(f){if(this.window.isVisible()){f.show(); }}},dispose:function(){},_substractWrappersBorder:function(h,i){var k=this.ui.container; var f=this.ui.contentCell; if(!k||!f){return h; }var j=$telerik.getBorderBox(k); var g=$telerik.getBorderBox(f); h-=i?(j.horizontal+g.hrizontal):(j.vertical+g.vertical); return h; },_fixTableHeightInIE:function(i,g){if("CSS1Compat"==document.compatMode){var f=(i.offsetHeight-parseInt(g,10)); if(f>0){var h=(parseInt(i.style.height,10)-f); if(h>0){i.style.height=h+"px"; }}}},_removeExplicitMSAjaxWidth:function(){if(!this.window.get_width()){this.ui.container.style.width=""; }},_ariaHide:function(){if(this.window.get_enableAriaSupport()&&this.ui.container&&!this.window.isVisible()){this.ui.container.setAttribute("aria-hidden","true"); }},_hasAriaSupport:function(){return this.window.get_enableAriaSupport(); },restoreResizeHandlesCursor:function(){}}; b.ClassicView.registerClass("Telerik.Web.UI.Window.ClassicView",b.ViewBase,b.IView); function d(f,g){f&&(f.style.display=g); }function c(f,g){f&&f.setAttribute("aria-hidden",!g); }})($telerik.$,Telerik.Web.UI.Window); (function(a,c,n){Type.registerNamespace("Telerik.Web.UI.Window"); var b=Telerik.Web.UI; var g=".rwCommand"; var l=function(p){return p+g; }; var h=b.EventType; var f=l(h.Down); var o=l(h.Up); var e=l("dblclick"); var d=$telerik.cancelRawEvent; var m=$telerik.preventDefault; c.LightweightRenderer=function(p){c.LightweightRenderer.initializeBase(this,[p]); this.options={skin:this.window.get_skin(),minTitleWidth:30}; this.container=null; this.titlebar=null; this.icon=null; this.title=null; this.commandsContainer=null; this.content=null; this.contentFrame=null; this.statusbar=null; this.statusMessage=null; this.topResizer=null; this.bottomResizer=null; }; c.LightweightRenderer.prototype={createUI:function(){if(this.container){return; }var C=this.window; var x=C._isWindowRightToLeft(); var p=Sys.UI.DomElement.addCssClass; var q=document.createElement("div"); this._appendToDom(q); this.container=C._popupElement=q; q.id="RadWindowWrapper_"+C.get_id(); q.className=this._getSkinCssClass(); var u=C.get_cssClass(); if(u){p(q,u); }if(x){p(q,"rwRtl"); }if(!C._visibleTitlebar){p(q,"rwNoTitleBar"); }this.setShadowCssClass(C._enableShadow); q.setAttribute("unselectable","on"); this._setTabIndex(q); var r=q.style; r.width=C._width; r.height=C._height; r.position="absolute"; var A=this.titlebar=C._titlebarElement=document.createElement("div"); A.className="rwTitleBar"; q.appendChild(A); var B=document.createElement("div"); B.className="rwTitleWrapper"; A.appendChild(B); this._setRolePresentation(B); B.appendChild(this.getIconNode()); B.appendChild(this.getTitleNode()); C.set_title(C._title); B.appendChild(this.getTitleCommandsContainer()); C._registerTitlebarHandlers(true); C.set_iconUrl(C.get_iconUrl()); var s=this.content=$get(C.get_id()+"_C")||this.pendingContent||document.createElement("div"); this._setRolePresentation(s); if(s){s.style.display="none"; s.className="rwContent"; this.setContent(s); }if(!C._dockMode){var t=s.getElementsByTagName("iframe"); var y=C.get_name(); var v=t.length>0?t[0]:document.createElement(($telerik.isIE&&!$telerik.isIE9Mode)?"