Type.registerNamespace("Telerik.Web.UI"); (function(){$telerik.toWindow=function(c){return c; }; $telerik.findWindow=$find; var b=$telerik.$; var a=Telerik.Web.UI; a.RadWindowControllerClass=function(){this._activeWindow=null; this._historyStack=[]; }; a.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(c){if(c==this._activeWindow){return; }this.inactivateCurrentWindow(); this._activeWindow=c; Array.remove(this._historyStack,c); Array.add(this._historyStack,c); },notifyWindowClosed:function(c){if(this._activeWindow==c){this._activeWindow=null; }Array.remove(this._historyStack,c); this._activatePreviousWindow(); },_activatePreviousWindow:function(){var c=this._historyStack; var d=c.length-1; for(; d>=0; d--){var e=c[d]; if(!e){return; }if(e.isCreated()&&!e.isClosed()&&!e.isMinimized()){e.setActive(true); break; }else{Array.removeAt(c,d); }}},get_activeWindow:function(){return this._activeWindow; }}; a.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null); if(!a.RadWindowController){a.RadWindowController=new a.RadWindowControllerClass(); }Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.RadWindowUtils"); a.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"}; b.registerEnum(a,"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)}); b.registerEnum(a,"WindowAutoSizeBehaviors",{Width:1,WidthProportional:2,Height:4,HeightProportional:8,Default:(2+8)}); b.registerEnum(a,"WindowAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8}); b.registerEnum(a,"WindowMinimizeMode",{SameLocation:1,MinimizeZone:2,Default:1}); a.RadWindow=function(c){a.RadWindow.initializeBase(this,[c]); 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._buttonsElement=null; this._buttonsArray=[]; this._shortCutManager=null; this.isIE=($telerik.isIE); this._openerElementID=null; this._offsetElementID=null; this._behaviors=a.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._dropDownTouchScroll=null; this._browserWindow=window; this._stylezindex=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._titleCell; }; 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; }; a.RadWindow.prototype={_getLocalization:function(){return a.RadWindowUtils.Localization; },_getLocalizationString:function(e){var c=this.get_localization(); if(typeof(c)=="string"){c=Sys.Serialization.JavaScriptSerializer.deserialize(c); this.set_localization(c); }var d=this._getLocalization(); if(!c){return d[e]; }return c[e]; },_registerGlobalBodyEventHandlers:function(c){var d=this.get_shortcuts(); if(!d){return; }if(!this._shortCutManager){this._shortCutManager=new a.WindowShortCutManager(d); }if(c){this._onKeyDownDelegate=Function.createDelegate(this,this._onKeyDown); $addHandler(document.documentElement,"keydown",this._onKeyDownDelegate); }else{if(this._onKeyDownDelegate){$removeHandler(document.documentElement,"keydown",this._onKeyDownDelegate); this._onKeyDownDelegate=null; }}},_registerIframeLoadHandler:function(c){if(!this._iframe){return; }if(c){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(c){if(c){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(d,c){if(!d){return; }if(Sys.UI.DomElement.containsCssClass(d,"RadButton")){d.setAttribute("rwOpener",true); }else{d.removeAttribute("rwOpener"); }if(true==c){this._onClickDelegate=Function.createDelegate(this,this._onClick); $addHandler(d,"click",this._onClickDelegate); }else{var e=$removeHandler(d,"click",this._onClickDelegate); this._onClickDelegate=null; }},_registerTitlebarHandlers:function(d){var c=this._titleCell; if(d){this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){if(this.isMinimized()){this.restore(); }else{if(this.isBehaviorEnabled(a.WindowBehaviors.Maximize)){if(this.isMaximized()){this.restore(); }else{this.maximize(); }}}}); this._onTitlebarClickDelegate=Function.createDelegate(this,function(){this.setActive(true); }); $addHandler(c,"dblclick",this._onTitlebarDblclickDelegate); $addHandler(c,"click",this._onTitlebarClickDelegate); }else{if(c){if(this._onTitlebarDblclickDelegate){$removeHandler(c,"dblclick",this._onTitlebarDblclickDelegate); this._onTitlebarDblclickDelegate=null; }if(this._onTitlebarClickDelegate){$removeHandler(c,"click",this._onTitlebarClickDelegate); this._onTitlebarClickDelegate=null; }$clearHandlers(c); }}},_makeModal:function(c){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(!c){return; }if(typeof(a.RadWindowManager)!="undefined"&&a.RadWindowManager.isInstanceOfType(this)){return; }this._onModalShowHandler=function(e){if(!e._modalExtender){e._modalExtender=new a.ModalExtender(e._popupElement); }e._modalExtender.show(); var f=document.activeElement; if(f&&f.tagName.toLowerCase()!="body"){var d=(!$telerik.isDescendant(this._contentElement,f)&&this._dockMode); if(!(e._isPredefined)||d){e._focusedPageElement=f; f.blur(); }}e.center(); }; this.add_show(this._onModalShowHandler); this._onModalCloseHandler=function(d){window.setTimeout(function(){if(d._modalExtender){d._modalExtender.hide(); }var e=d._focusedPageElement; if(e){try{e.focus(); }catch(f){}d._focusedPageElement=null; }},10); }; this.add_close(this._onModalCloseHandler); },_enableMoveResize:function(d){if(this._resizeExtender){this._resizeExtender.dispose(); this._resizeExtender=null; }if(!d){return; }if(!this._popupElement){return; }var g=this._tableElement.rows; var f={}; var e=this._isWindowRightToLeft(); if(this.isBehaviorEnabled(a.WindowBehaviors.Resize)){if(e){f={nw:g[0].cells[2],n:this._topResizer,ne:g[0].cells[0],w:[g[1].cells[2],g[2].cells[2]],e:[g[1].cells[0],g[2].cells[0]],sw:g[3].cells[2],s:g[3].cells[1],se:[g[3].cells[0],this._bottomResizer]}; }else{f={nw:g[0].cells[0],n:this._topResizer,ne:g[0].cells[2],w:[g[1].cells[0],g[2].cells[0]],e:[g[1].cells[2],g[2].cells[2]],sw:g[3].cells[0],s:g[3].cells[1],se:[g[3].cells[2],this._bottomResizer]}; }}if(this.isBehaviorEnabled(a.WindowBehaviors.Move)){f.move=this._titleCell; }this._resizeExtender=new a.ResizeExtender(this,this._popupElement,f,this._tableElement); var c=this._dockMode?null:this._iframe; this._resizeExtender.set_iframeToSkip(c); },_setResizeOverlayVisible:function(f){if(this._dockMode){return; }var d=this._resizeOverlayElement; if(!d){var e=this._getHandlesWidth(); var c=this._visibleTitlebar?this._tableElement.rows[0].offsetHeight:e; d=document.createElement("div"); d.style.position="absolute"; d.style.zIndex="1"; d.style.top=c+"px"; d.style.left=Math.round(e/2)+"px"; d.style.backgroundColor="White"; d.style.filter="alpha(opacity=0)"; d.style.opacity=0; this._contentCell.appendChild(d); this._resizeOverlayElement=d; }this._setResizeOverlaySize(); d.style.display=f?"":"none"; },_setResizeOverlaySize:function(){var c=this._resizeOverlayElement; if(c){var d=this._contentCell; c.style.width=d.offsetWidth+"px"; c.style.height=d.offsetHeight+"px"; }},onResizeStart:function(){if(this.isMaximized()){return false; }this.setActive(true); this._setResizeOverlayVisible(true); this._cachedDragZoneBounds=this._getRestrictionZoneBounds(); var c=new Sys.CancelEventArgs(); this.raiseEvent("resizeStart",c); if(c.get_cancel()){return false; }},onResizing:function(e){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,e)){this._manageVisibilityFirefox(false); if(this._dockMode){this.setWidthDockMode(e.width-1); this.setHeightDockMode(e.height-1); }else{this._setResizeOverlaySize(); }var g=this._getCurrentBounds(); var d=this.get_minWidth(); var j=parseInt(this.get_maxWidth()); var f=this.get_minHeight(); var k=parseInt(this.get_maxHeight()); var i=false; if(e.widthj){var c=d; if(e.widthk){e.height=(e.height';"; i.name=""; i.removeAttribute("name"); i.removeAttribute("NAME"); }this._createTouchScrollExtender(false); if(this._contentElement&&this._isPredefined){this._contentElement.innerHTML=""; }var c=this.get_contentElement(); if(this._dockMode&&c){if(Sys&&Sys.WebForms){var f=Sys.WebForms.PageRequestManager.getInstance(); if(f&&f.get_isInAsyncPostBack()){$telerik.disposeElement(c); }}}var e=this._popupElement; if(e&&e.parentNode){e.parentNode.removeChild(e); }var h=this._popupBehavior; if(this.get_destroyOnClose()&&h){h.dispose(); this._popupBehavior=null; }a.RadWindow.callBaseMethod(this,"dispose"); },hide:function(){this._hide(); this._registerGlobalBodyEventHandlers(false); return true; },clone:function(c){var d=document.createElement("span"); if(c){d.setAttribute("id",c); }return $telerik.cloneControl(this,a.RadWindow,d); },_createTouchScrollExtender:function(d){var e=$get(this.get_id()+"_C"); if(e){var c=this._dropDownTouchScroll; if(c){if(!d){c.dispose(); this._dropDownTouchScroll=null; }}else{if(d){this._dropDownTouchScroll=new a.TouchScrollExtender(e); this._dropDownTouchScroll.initialize(); }}}},set_contentElement:function(c){if(!this._isPredefined){this._dockMode=true; }var d=$get(this.get_id()+"_C"); if(d&&c!=d){$telerik.disposeElement(d); d.innerHTML=""; d.appendChild(c); c=d; }this._createUI(); if(this._iframe){this._iframe.style.display="none"; }else{if(!this._dropDownTouchScroll&&a.TouchScrollExtender._getNeedsScrollExtender()){this._createTouchScrollExtender(true); }}if(c.parentNode&&c.parentNode.removeChild){c.parentNode.removeChild(c); }this._contentCell.appendChild(c); c.style.display=""; this._contentElement=c; },_setShadowCSSClass:function(c){var e=this._tableElement; var d=this.get_popupElement(); if(!e||!d){return; }if(c){Sys.UI.DomElement.addCssClass(e,"rwShadow"); Sys.UI.DomElement.addCssClass(d,"rwShadow"); }else{Sys.UI.DomElement.removeCssClass(e,"rwShadow"); Sys.UI.DomElement.removeCssClass(d,"rwShadow"); }},get_contentElement:function(){return this._contentElement; },isCreated:function(){return this._popupElement!=null; },show:function(){var d=this.isCreated(); this._createUI(); var c=new Sys.CancelEventArgs(); this.raiseEvent("beforeShow",c); if(c.get_cancel()){return; }if(this.get_navigateUrl()&&(!d||this.get_reloadOnShow())){this.setUrl(this.get_navigateUrl()); }if(!d&&(this.get_initialBehaviors()!=a.WindowBehaviors.None)){this._show(); this._afterShow(); if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Minimize)){this.minimize(); }if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Maximize)){this.maximize(); }if(this.isInitialBehaviorEnabled(a.WindowBehaviors.Pin)){this.togglePin(); }return; }if(this.isModal()){this.center(); }if(this.get_animation()==a.WindowAnimation.None){this._show(); this._afterShow(); }else{this._playAnimation(); }},_show:function(){if(this.get_offsetElementID()&&!this._offsetElement){var d=$get(this.get_offsetElementID()); if(d){this._offsetElement=d; }}var c=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); this._reSetWindowPosition(); if(this._firstShow){this.set_width(this.get_width()); this.set_height(this.get_height()); }if(c!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(c); }this._popupVisible=true; var e=this.get_contentElement(); if(!this._isPredefned&&e){$telerik.repaintChildren(e); }},_hide:function(){if(!this.get_animation()||this.get_animation()==0){this._afterHide(); }else{if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false); }var c=Function.createDelegate(this,this._afterHide); var d=this.isMaximized(); $telerik.$(this._popupElement).stop().fadeOut(this.get_animationDuration(),function(){c(d); }); }},_afterHide:function(d){if(!this._popupBehavior){return; }if(d==null){d=this.isMaximized(); }var c=this.isMinimized(); if(d||c){this.restore(); }if($telerik.isFirefox){this.setOverflowVisible(false); }this._popupBehavior.hide(true); this._popupVisible=false; this._getWindowController().notifyWindowClosed(this); if(this.get_enableAriaSupport()&&this._popupElement&&!this.isVisible()){this._popupElement.setAttribute("aria-hidden","true"); }},_afterShow:function(){this.setActive(true); if($telerik.isFirefox){this.setOverflowVisible(true); }this._registerGlobalBodyEventHandlers(true); this._storeBounds(); this.raiseEvent("show",new Sys.EventArgs()); var c=!this.get_animation()==a.WindowAnimation.None; if(this.get_autoSize()&&(this._dockMode||c)){this.autoSize(c); }if(this.get_enableAriaSupport()&&this._popupElement&&this.isVisible()){this._popupElement.setAttribute("aria-hidden","false"); }},_playAnimation:function(){var h=Function.createDelegate(this,function(){var m=this._getCalculatedPopupBounds(); this._setPopupVisible(m.x,m.y); var l=$telerik.getBounds(this._popupElement); var n=this.get_offsetElementID(); if(n){var o=$get(n); if(o){var p=$telerik.getBounds(o); l.x=p.x; l.y=p.y; }}$telerik.$(this._popupElement).hide(); return l; }); var d=this._popupElement; if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false); }var i=this.get_animation(); var f=this._openerElement?$telerik.getBounds(this._openerElement):null; var c=h(); var g=this.get_animationDuration(); var e=""+this._position; var k=null; var j=Function.createDelegate(this,function(){var l=this.get_popupElement(); l.style.filter=""; if($telerik.isIE7){l.style.removeAttribute("filter"); }l.style.opacity=""; if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true); }this._show(); this._afterShow(); }); a.Animations.playJQueryAnimation(d,i,f,c,e,k,j,g); },_onClick:function(c){this.show(); return this._cancelEvent(c); },_onKeyDown:function(d){var c=this._shortCutManager.isShortCutHit(d); if(!c){return; }if(this.isActive()){this.fire(c.get_name()); }},_cancelEvent:function(c){if(c){c.returnValue=false; c.cancelBubble=true; c.preventDefault(); c.stopPropagation(); }return false; },_getWindowController:function(){return a.RadWindowController.getInstance(); },_getReloadOnShowUrl:function(d){var e="rwndrnd="+Math.random(); if(d.indexOf("?")>-1){e="&"+e; }else{e="?"+e; }var c=d.indexOf("#"); d=(c>-1)?d.substr(0,c)+e+d.substr(c):d+e; return d; },getWindowBounds:function(){return this._getCalculatedPopupBounds(); },toString:function(){return"[RadWindow id="+this.get_id()+"]"; },center:function(){var c=this._getCentralBounds(); this.moveTo(c.x,c.y); },moveTo:function(d,e){var f=this._popupElement; if(this.isVisible()){this._manageVisibilityFirefox(false); }if(f){var c=$telerik.getBounds(f); var h=this._getRestrictionZoneBounds(); if(h){var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(d+h.x,e+h.y,c.width,c.height)); if(!g){return false; }}}d=parseInt(d); e=parseInt(e); this._createUI(); this._setPopupVisible(d,e); this._storeBounds(); if(this.isVisible()){this._manageVisibilityFirefox(true); }return true; },setSize:function(c,d){this._firstShow=false; this.set_width(c); this.set_height(d); this._storeBounds(); },_calculateBoundsToFit:function(f,d){var t=this.get_minWidth(); var q=this._getTitleElement(); if(q){q.style.width="1px"; }var s; var p; f.style.height="1px"; f.style.width="1px"; if(this._dockMode){var m=f.scrollWidth; p=m>t?m:t; s=f.scrollHeight; Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading"); }else{p=d.scrollWidth; if(p0){k-=j; }}var c=Math.min(g,r.width); var i=Math.min(k,r.height); var e=this.get_minWidth(); var l=this.get_minHeight(); var o=parseInt(this.get_maxHeight()); var h=parseInt(this.get_maxWidth()); if(e>c){c=e; }if(l>i){i=l; }if(o&&o0){this._contentElement.style.width=widthToSet+"px"; }},setHeightDockMode:function(f){if(!this._dockMode||!this.get_contentElement()){return; }var d=this._substractWrappersBorder(f); var e=this.isVisible(); var c=this._tableElement.rows[3].cells[1]; var g=this._tableElement.rows[0].cells[1]; var h=this._tableElement.rows[2].cells[1]; d-=e?parseInt($telerik.getBounds(c).height):parseInt($telerik.getCurrentStyle(c,"height")); if(this._visibleTitlebar){d-=e?parseInt($telerik.getBounds(this._titlebarElement).height):parseInt($telerik.getCurrentStyle(this._titlebarElement,"height")); d-=e?parseInt($telerik.getBounds(this._topResizer).height):parseInt($telerik.getCurrentStyle(this._topResizer,"height")); }else{d-=e?parseInt($telerik.getBounds(g).height):parseInt($telerik.getCurrentStyle(g,"height")); }if(this._visibleStatusbar){d-=e?parseInt($telerik.getBounds(h).height):parseInt($telerik.getCurrentStyle(h,"height")); }if(d>0){this._contentElement.style.height=d+"px"; }},calcPosition:function(d,e,c,f,i){var g=d+Math.round((e-c)/2); if(g<0||g+e>f){g=Math.round(Math.abs((f-c)/2)); if(this.isAutoSizeBehaviorEnabled(a.WindowAutoSizeBehaviors.Default)){var h=this._dockMode?window:this.BrowserWindow; g+=i?Math.max(h.document.documentElement.scrollTop,h.document.body.scrollTop):Math.max(h.document.documentElement.scrollLeft,h.document.body.scrollLeft); }}return g; },_maintainMaximizedSize:function(){if(!this.isMaximized()){return; }var g=this._popupElement; if(!g){return; }var j=this._getViewportBounds(); g.style.top=(j.scrollTop+j.y)+"px"; g.style.left=(j.scrollLeft+j.x)+"px"; var i=parseInt(this.get_maxWidth()); var d=parseInt(this.get_maxHeight()); if(i){j.width=i; }if(d){j.height=d; }$telerik.setSize(g,{width:j.width,height:j.height}); var k=this._getRestrictionZoneBounds(); if(!k){this._enablePageScrolling(false); }var e=this._tableElement; j=$telerik.getContentSize(g); var c=$telerik.getBorderBox(e); var f=$telerik.getPaddingBox(e); var h=j.height-c.vertical-f.vertical; e.style.height=h+"px"; this._fixIeHeight(e,h); if(this._dockMode){this.setWidthDockMode(j.width); this.setHeightDockMode(j.height); }this._updateTitleWidth(); },_enablePageScrolling:function(c){var d=document.body; var e=document.documentElement; if(c){if(null!=this._documentOverflow){e.style.overflow=this._documentOverflow; }if(null!=this._bodyOverflow){d.style.overflow=this._bodyOverflow; }this._documentOverflow=null; this._bodyOverflow=null; }else{if(null==this._documentOverflow){this._documentOverflow=e.style.overflow; }if(null==this._bodyOverflow){this._bodyOverflow=d.style.overflow; }d.style.overflow="hidden"; e.style.overflow="hidden"; }},_getRestrictionZoneBounds:function(){var d=null; if(this.get_restrictionZoneID()){var c=$get(this.get_restrictionZoneID()); if(c){d=$telerik.getBounds(c); d.scrollLeft=0; d.scrollTop=0; }}return d; },_storeBounds:function(){if(!this.isCreated()){return; }var c=this._getCurrentBounds(); if(this.isMaximized()){return false; }if(this.isMinimized()){if(this._restoreRect){c.width=this._restoreRect.width; c.height=this._restoreRect.height; }else{c.width=this.get_width(); c.height=this.get_height(); }}this._restoreRect=c; },_restoreBounds:function(){if(!this._restoreRect){return; }var c=this._restoreRect; this.setSize(c.width,c.height); this.moveTo(c.x,c.y); },_getStoredBounds:function(){if(this._restoreRect){return this._restoreRect; }},_deleteStoredBounds:function(){this._restoreRect=null; },_getCurrentBounds:function(){var c=(this._popupElement.style.display=="none")?true:false; this._popupElement.style.display=""; if(this._firstShow!=true){this._updateWindowSize(this._height); this._firstShow=true; }var e=$telerik.getBounds(this._popupElement); if(c){this._popupElement.style.display="none"; }var d=this._getRestrictionZoneBounds(); if(d){e.x-=d.x; e.y-=d.y; }return e; },_getCentralBounds:function(){var f=this._getCurrentBounds(); var c=this._getViewportBounds(); var e=parseInt((c.width-f.width)/2); var d=parseInt((c.height-f.height)/2); f.x=e+c.scrollLeft; f.y=d+c.scrollTop; return f; },_getViewportBounds:function(){var d=this._getRestrictionZoneBounds(); if(d){return d; }var f=$telerik.getClientBounds(); var c=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body); var e=document.documentElement.scrollTop||document.body.scrollTop; f.scrollLeft=c; f.scrollTop=e; if(this.isIE){if(f.width==0){f.width=document.body.clientWidth; }if(f.height==0){f.height=document.body.clientHeight; }}return f; },_getCalculatedPopupBounds:function(){var g=this._getStoredBounds(); if(g){return g; }var c=this._getCurrentBounds(); var d=this._offsetElement; if(this._top==null&&this._left==null&&!d){c=this._getCentralBounds(); }else{if(d){c.y=0; c.x=0; }else{var h=this._getViewportBounds(); c.x=h.scrollLeft; c.y=h.scrollTop; }var e=this._left?this._left:0; c.x+=e; var f=this._top?this._top:0; c.y+=f; }return c; },_checkRestrictionZoneBounds:function(c,e){var d=c; if(!d){d=this._getRestrictionZoneBounds(); if(!d){return true; }}return a.ResizeExtender.containsBounds(d,e); },_reSetWindowPosition:function(){var c=this._getCalculatedPopupBounds(); this._setPopupVisible(c.x,c.y); },_fixIeHeight:function(d,c){if("CSS1Compat"==document.compatMode){var e=(d.offsetHeight-parseInt(c)); if(e>0){var f=(parseInt(d.style.height)-e); if(f>0){d.style.height=f+"px"; }}}},_setPopupVisible:function(d,e){var c=this._getRestrictionZoneBounds(); if(c){d+=c.x; e+=c.y; }this._popupBehavior._setCoordinates(d,e); this._popupBehavior.show(); if(!this.get_width()){this._popupElement.style.width=""; }this._updateTitleWidth(); },_createDefaultTable:function(){var c=document.createElement("table"); c.align="left"; c.cellSpacing=0; c.cellPadding=0; c.insertRow(-1); return c; },_isWindowRightToLeft:function(){var c=this._isRightToLeft; if(c==null){var d=this.get_element(); var e=d.parentNode?d:this._getDefaultParent(); c=this._isRightToLeft=$telerik.isRightToLeft(e); }return c; },_createStatusbarResizer:function(d){var c=d.rows[0].insertCell(-1); c.style.width="15px"; var e=document.createElement("div"); c.appendChild(e); this._bottomResizer=e; },_createStatusbarMessageCell:function(c){var e=c.rows[0].insertCell(-1); e.style.width="100%"; var f=this._getStatusMessageElement(); e.appendChild(f); var d=document.createElement("label"); d.setAttribute("for",f.id); d.innerHTML="status label"; d.style.display="none"; e.appendChild(d); },_createUI:function(){if(!this._popupElement){var z=this.get_id(); var q="RadWindowWrapper_"+z; var A=this._isWindowRightToLeft(); var p=document.createElement("div"); p.id=q; p.className=this._getFullSkinName(); var g=this.get_cssClass(); if(g){Sys.UI.DomElement.addCssClass(p,g); }if(A){Sys.UI.DomElement.addCssClass(p,"RadWindow_rtl"); }if(!this._visibleTitlebar){Sys.UI.DomElement.addCssClass(p,"rwNoTitleBar"); }p.style.width=this._width; p.style.height=this._height; p.setAttribute("unselectable","on"); this._popupElement=p; var h=document.createElement("table"); h.cellSpacing=0; h.cellPadding=0; Sys.UI.DomElement.addCssClass(h,"rwTable"); this._tableElement=h; var f=[]; if(A){f=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"]; }else{f=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"]; }var x=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"]; var v=0; for(var t=0; t<4; t++){var n=h.insertRow(-1); n.className=x[t]; for(var u=1; u<=3; u++){var D=n.insertCell(-1); D.innerHTML=" "; D.className=f[v]; v++; }}var r=h.rows[0].cells[1]; r.innerHTML=""; this._titleCell=r; var e=document.createElement("div"); e.className="rwTopResize"; e.innerHTML=""; this._topResizer=e; this._titleCell.appendChild(this._topResizer); var s=this._createDefaultTable(); s.className="rwTitlebarControls"; this._titlebarElement=s; this._titleCell.appendChild(this._titlebarElement); var d=this._getTitleIcon(); var l=this._titlebarElement.rows[0].insertCell(-1); l.appendChild(d); var y=this._getTitleElement(); var r=this._titlebarElement.rows[0].insertCell(-1); r.appendChild(y); r.id=this.get_id()+"_title"; this.set_title(this._title); var B=this._titlebarElement.rows[0].insertCell(-1); B.noWrap=true; B.style.whiteSpace="nowrap"; B.appendChild(this._getTitleCommandButtonsHolder()); var m=h.rows[1].cells[1]; m.vAlign="top"; m.innerHTML=""; this._contentCell=m; if(!(this._dockMode||this._isPredefined)){Sys.UI.DomElement.addCssClass(this._contentCell,"rwExternalContent"); }if(this._enableShadow&&!$telerik.isIE6){this._setShadowCSSClass(true); }var c=this.get_name(); var C=this._createDefaultTable(); C.style.width="100%"; this._statusCell=h.rows[2].cells[1]; this._statusCell.innerHTML=""; this._statusCell.appendChild(C); if(A){this._createStatusbarResizer(C); this._createStatusbarMessageCell(C); }else{this._createStatusbarMessageCell(C); this._createStatusbarResizer(C); }this._popupElement.appendChild(this._tableElement); this._popupElement.style.display="none"; this._popupElement.style.position="absolute"; this._addWindowToDocument(); this._registerTitlebarHandlers(true); this.set_visibleTitlebar(this._visibleTitlebar); this.set_visibleStatusbar(this._visibleStatusbar); if(this._dockMode){var k=$get(this.get_id()+"_C"); if(k&&k.innerHTML){k.style.overflow="auto"; k.style.border="0px"; this.set_contentElement(k); this.setWidthDockMode(this.get_width()); this.setHeightDockMode(this.get_height()); }}else{var o=($telerik.isIE&&!$telerik.isIE9)?document.createElement("