Type.registerNamespace("Telerik.Web.UI"); (function(a,b,c){$telerik.toWindow=function(d){return d; }; $telerik.findWindow=$find; b.RadWindowControllerClass=function(){this._activeWindow=null; this._historyStack=[]; }; b.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(d){if(d==this._activeWindow){return; }this.inactivateCurrentWindow(); this._activeWindow=d; Array.remove(this._historyStack,d); Array.add(this._historyStack,d); },notifyWindowClosed:function(d){if(this._activeWindow==d){this._activeWindow=null; }Array.remove(this._historyStack,d); this._activatePreviousWindow(); },_activatePreviousWindow:function(){var d=this._historyStack; var e=d.length-1; for(; e>=0; e--){var f=d[e]; if(!f){return; }if(f.isCreated()&&!f.isClosed()&&!f.isMinimized()){f.setActive(true); break; }else{Array.removeAt(d,e); }}},get_activeWindow:function(){return this._activeWindow; }}; b.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null); if(!b.RadWindowController){b.RadWindowController=new b.RadWindowControllerClass(); }Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.RadWindowUtils"); b.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(b,"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(b,"WindowAutoSizeBehaviors",{Width:1,WidthProportional:2,Height:4,HeightProportional:8,Default:(2+8)}); a.registerEnum(b,"WindowAnimation",{None:0,Resize:1,Fade:2,Slide:4,FlyIn:8}); a.registerEnum(b,"WindowMinimizeMode",{SameLocation:1,MinimizeZone:2,Default:1}); b.RadWindow=function(d){b.RadWindow.initializeBase(this,[d]); 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=null; this._shortCutManager=null; this.isIE=($telerik.isIE); this._openerElementID=null; this._offsetElementID=null; this._behaviors=b.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._renderMode=b.RenderMode.Classic; var e=navigator.userAgent; this._isiOS5Safari=e.match(/OS 5_\d like Mac OS X/i); this._isiPhoneiPadAppleWebkit=e.match(/iPhone|iPad/)&&e.match(/AppleWebKit/); this._iframeWrapper=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; }; b.RadWindow.prototype={_getLocalization:function(){return b.RadWindowUtils.Localization; },_getLocalizationString:function(f){var e=this.get_localization(); if(typeof(e)=="string"){e=Sys.Serialization.JavaScriptSerializer.deserialize(e); this.set_localization(e); }var d=this._getLocalization(); if(!e){return d[f]; }return e[f]; },_registerGlobalBodyEventHandlers:function(e){var d=this.get_shortcuts(); if(!d){return; }if(!this._shortCutManager){this._shortCutManager=new b.WindowShortCutManager(d); }if(e){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(d){if(!this._iframe){return; }if(d){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(d){if(d){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(e,d){if(!e){return; }if(Sys.UI.DomElement.containsCssClass(e,"RadButton")){e.setAttribute("rwOpener",true); }else{e.removeAttribute("rwOpener"); }if(true==d){this._onClickDelegate=Function.createDelegate(this,this._onClick); $addHandler(e,"click",this._onClickDelegate); }else{$removeHandler(e,"click",this._onClickDelegate); this._onClickDelegate=null; }},_registerTitlebarHandlers:function(d){var e=this.ui?this.ui.titleCell||this.ui.titlebar:null; if(d){this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){if(this.isMinimized()){this.restore(); }else{if(this.isBehaviorEnabled(b.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(e,"dblclick",this._onTitlebarDblclickDelegate); $addHandler(e,"click",this._onTitlebarClickDelegate); }else{if(e){if(this._onTitlebarDblclickDelegate){$removeHandler(e,"dblclick",this._onTitlebarDblclickDelegate); this._onTitlebarDblclickDelegate=null; }if(this._onTitlebarClickDelegate){$removeHandler(e,"click",this._onTitlebarClickDelegate); this._onTitlebarClickDelegate=null; }$clearHandlers(e); }}},_makeModal:function(d){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(!d){return; }if(typeof(b.RadWindowManager)!="undefined"&&b.RadWindowManager.isInstanceOfType(this)){return; }this._onModalShowHandler=function(g){if(!g._modalExtender){g._modalExtender=new b.ModalExtender(g._popupElement); }g._modalExtender.show(); var f=null; try{f=document.activeElement; }catch(e){document.documentElement.focus(); f=document.activeElement; }if(f&&f.tagName&&f.tagName.toLowerCase()!="body"){var h=(!$telerik.isDescendant(this._contentElement,f)&&this._dockMode); if(!(g._isPredefined)||h){g._focusedPageElement=f; f.blur(); }}if(g.get_centerIfModal()){g.center(); }}; this.add_show(this._onModalShowHandler); this._onModalCloseHandler=function(e){window.setTimeout(function(){if(e._modalExtender){e._modalExtender.hide(); }var g=e._focusedPageElement; if(g){try{g.focus(); }catch(f){}e._focusedPageElement=null; }},10); }; this.add_close(this._onModalCloseHandler); },_enableMoveResize:function(e){if(!this.view){return; }var d={resize:this.isBehaviorEnabled(b.WindowBehaviors.Resize),move:this.isBehaviorEnabled(b.WindowBehaviors.Move)}; if(e){this.view.enableMoveResize(d); }else{this.view.disableMoveResize(d); }},_setResizeOverlayVisible:function(d){if(this._dockMode){return; }var f=this._resizeOverlayElement; if(!f){var g=this._getHandlesWidth(); var e=this._visibleTitlebar?this._getTitlebarHeight():g; f=document.createElement("div"); f.style.position="absolute"; f.style.zIndex="1"; f.style.top=e+"px"; f.style.left=Math.round(g/2)+"px"; f.style.backgroundColor="White"; f.style.filter="alpha(opacity=0)"; f.style.opacity=0; this._contentCell.appendChild(f); this._resizeOverlayElement=f; }this._setResizeOverlaySize(); f.style.display=d?"":"none"; },_setResizeOverlaySize:function(){var e=this._resizeOverlayElement; if(e){var d=this._contentCell; e.style.width=d.offsetWidth+"px"; e.style.height=d.offsetHeight+"px"; }},onResizeStart:function(){if(this.isMaximized()){return false; }this.setActive(true); this._setResizeOverlayVisible(true); this._cachedDragZoneBounds=this._getRestrictionZoneBounds(); var d=new Sys.CancelEventArgs(); this.raiseEvent("resizeStart",d); if(d.get_cancel()){return false; }},onResizing:function(d){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,d)){this._manageVisibilityFirefox(false); if(this._isiOS5Safari){this.setContentFixedHeight(d.height,this._iframeWrapper); }if(this._dockMode){this.setWidthDockMode(d.width-1); this.setHeightDockMode(d.height-1); }else{this._setResizeOverlaySize(); }var f=this._getCurrentBounds(); var j=this.get_minWidth(); var h=parseInt(this.get_maxWidth()); var i=this.get_minHeight(); var g=parseInt(this.get_maxHeight()); var e=false; if(d.widthh){var l=j; if(d.widthg){d.height=(d.height0){e.style.display=""; }if(this.get_visibleOnPageLoad()){setTimeout(Function.createDelegate(this,function(){this.show(); }),0); }this._registerWindowResizeHandler(true); var d=this.get_element().className; if(d){this.set_cssClass(d.replace(/^ /,"")); }},initView:function(){var d=b.Window.UIFactory; if(!this.ui||this.ui.window!=this){this.ui=d.getRenderer(this._renderMode,this); }if(!this.view||this.view.window!=this){this.view=d.getView(this._renderMode,this); }},dispose:function(){var d=this.get_windowManager(); if(d){if(d.get_preserveClientState()){d.saveWindowState(this); }if(this.get_destroyOnClose()){d.removeWindow(this); }}this.disposeUI(); b.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(b.WindowBehaviors.None); if(this.view){this.view.dispose(); }if(this.ui){this.ui.dispose(); }this.view=this.ui=null; var e=this._iframe; if(e){e.radWindow=null; var i="sandbox" in document.createElement("iframe"); e.src=i?"about:blank":"javascript:'';"; e.name=""; e.removeAttribute("name"); e.removeAttribute("NAME"); }this._createTouchScrollExtender(false); if(this._contentElement&&this._isPredefined){this._contentElement.innerHTML=""; }var d=this.get_contentElement(); if(this._dockMode&&d){if(Sys&&Sys.WebForms){var h=Sys.WebForms.PageRequestManager.getInstance(); if(h&&h.get_isInAsyncPostBack()){$telerik.disposeElement(d); }}}var f=this._popupElement; if(f&&f.parentNode){f.parentNode.removeChild(f); }this._popupVisible=false; var g=this._popupBehavior; if(this.get_destroyOnClose()&&g){g.dispose(); this._popupBehavior=null; }},hide:function(){this._hide(); this._registerGlobalBodyEventHandlers(false); return true; },clone:function(f){var g=document.createElement("span"); if(f){g.setAttribute("id",f); }var e=this.get_contentElement(); var d=e?e.cloneNode(true):null; if(this._renderMode!=b.RenderMode.Classic){this._contentElement=d; }try{var h=$telerik.cloneControl(this,b.RadWindow,g); }finally{if(this._renderMode!=b.RenderMode.Classic&&e){this.set_contentElement(e); }}return h; },_createTouchScrollExtender:function(f){var d=$get(this.get_id()+"_C"); if(d){var e=this._dropDownTouchScroll; if(e){if(!f){e.dispose(); this._dropDownTouchScroll=null; }}else{if(f){this._dropDownTouchScroll=new b.TouchScrollExtender(d); this._dropDownTouchScroll.initialize(); }}}},set_contentElement:function(d){if(!this._isPredefined&&d.getElementsByTagName("iframe").length==0){this._dockMode=true; }if(this.view){this.view.setContent(d); }},_setShadowCSSClass:function(d){this.ui.setShadowCssClass(d); },get_contentElement:function(){return this._contentElement||(this.ui?this.ui.pendingContent:null); },isCreated:function(){return this._popupElement!=null; },show:function(){var e=this.isCreated(); this._createUI(); var d=new Sys.CancelEventArgs(); this.raiseEvent("beforeShow",d); if(d.get_cancel()){return; }if(this.get_navigateUrl()&&(!e||this.get_reloadOnShow())){this.setUrl(this.get_navigateUrl()); }if(!e&&(this.get_initialBehaviors()!=b.WindowBehaviors.None)){this._show(); this._afterShow(); if(this.isInitialBehaviorEnabled(b.WindowBehaviors.Minimize)){this.minimize(); }if(this.isInitialBehaviorEnabled(b.WindowBehaviors.Maximize)){this.maximize(); }if(this.isInitialBehaviorEnabled(b.WindowBehaviors.Pin)){this.togglePin(); }return; }if(this.isModal()&&this.get_centerIfModal()){this.center(); }if(this.get_animation()==b.WindowAnimation.None){this._show(); this._afterShow(); }else{this._playAnimation(); }},_show:function(){if(this.get_offsetElementID()&&!this._offsetElement){var f=$get(this.get_offsetElementID()); if(f){this._offsetElement=f; }}var e=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(); this._popupVisible=true; this.setVisible(true); var g=this._getStoredBounds(); if(this._firstShow&&!g){this.set_width(this.get_width()); this.set_height(this.get_height()); }else{this._restoreBounds(); }if(e!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(e); }var d=this.get_contentElement(); if(!this._isPredefned&&d){$telerik.repaintChildren(d); }},_hide:function(){if(!this.get_animation()||this.get_animation()==0){this._afterHide(); }else{if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false); }var e=Function.createDelegate(this,this._afterHide),f=this.isMaximized(),d=this.get_animationDuration(); $telerik.$(this._popupElement).stopTransition().transition({opacity:0},d,"linear",function(){e(f); }); }},_afterHide:function(d){if(!this._popupBehavior){return; }this._manageVisibilityFirefox(true); if(d==null){d=this.isMaximized(); }var e=this.isMinimized(); if(d||e){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); },_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.setActive(true); if($telerik.isFirefox){this.setOverflowVisible(true); }this._registerGlobalBodyEventHandlers(true); this._storeBounds(); this.raiseEvent("show",new Sys.EventArgs()); var d=!this.get_animation()==b.WindowAnimation.None; if(this.get_autoSize()&&(this._dockMode||d)){this.autoSize(d); }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",""); }},_playAnimation:function(){var g=Function.createDelegate(this,function(){var q=this._getCalculatedPopupBounds(); this._setPopupVisible(q.x,q.y); var m=$telerik.getBounds(this._popupElement); var p=this.get_offsetElementID(); if(p){var n=$get(p); if(n){var o=$telerik.getBounds(n); m.x=o.x; m.y=o.y; }}$telerik.$(this._popupElement).hide(); return m; }); var d=this._popupElement; if(this._enableShadow&&$telerik.isIE){this._setShadowCSSClass(false); }var f=this.get_animation(); var l=this._openerElement?$telerik.getBounds(this._openerElement):null; var h=g(); var e=this.get_animationDuration(); var k=""+this._position; var j=null; var i=Function.createDelegate(this,function(){var m=this.get_popupElement(); m.style.filter=""; if($telerik.isIE7){m.style.removeAttribute("filter"); }m.style.opacity=""; if(this._enableShadow&&$telerik.isIE&&!$telerik.isIE6){this._setShadowCSSClass(true); }this._show(); this._afterShow(); }); b.Animations.playJQueryAnimation(d,f,l,h,k,j,i,e); },_onClick:function(d){this.show(); return this._cancelEvent(d); },_onKeyDown:function(d){var f=this._shortCutManager.isShortCutHit(d); if(!f){return; }if(this.isActive()){this.fire(f.get_name()); }},_cancelEvent:function(d){if(d){d.returnValue=false; d.cancelBubble=true; d.preventDefault(); d.stopPropagation(); }return false; },_getWindowController:function(){return b.RadWindowController.getInstance(); },_getReloadOnShowUrl:function(e){var f="rwndrnd="+Math.random(); if(e.indexOf("?")>-1){f="&"+f; }else{f="?"+f; }var d=e.indexOf("#"); e=(d>-1)?e.substr(0,d)+f+e.substr(d):e+f; return e; },getWindowBounds:function(){return this._getCalculatedPopupBounds(); },toString:function(){return"[RadWindow id="+this.get_id()+"]"; },center:function(){var d=this._getCentralBounds(); this.moveTo(d.x,d.y); },moveTo:function(h,i){var e=this._popupElement; if(this.isVisible()){this._manageVisibilityFirefox(false); }if(e){var d=this.ui.getBounds(); var f=this._getRestrictionZoneBounds(); if(f){var g=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(h+f.x,i+f.y,d.width,d.height)); if(!g){return false; }}}h=parseInt(h); i=parseInt(i); this._createUI(); this._setPopupVisible(h,i); this._storeBounds(); if(this.isVisible()){this._manageVisibilityFirefox(true); }return true; },setSize:function(e,d){this._firstShow=false; this.set_width(e); this.set_height(d); this._storeBounds(); },_calculateBoundsToFit:function(p,f){var q=this.get_minWidth()-this._getHandlesWidth(); var o=this._tableElement?(parseInt(this._tableElement.offsetHeight)-parseInt(this.get_height())):0; var r=this._getTitleElement(); if(r){r.style.width="1px"; }var d; var e; p.style.height=this._renderMode==b.RenderMode.Classic?"1px":""; p.style.width=this._renderMode==b.RenderMode.Classic?"1px":""; if(this._dockMode){p.style.position="absolute"; try{var m=p.scrollWidth+$telerik.getBorderBox(p).horizontal; e=m>q?m:q; d=p.scrollHeight; if(this._contentCell){Sys.UI.DomElement.addCssClass(this._contentCell,"rwLoading"); }}finally{p.style.position=""; }}else{e=f.scrollWidth; if(e0){h-=o; }}var t=Math.min(u,s.width); var g=Math.min(h,s.height); var l=this.get_minWidth(); var k=this.get_minHeight(); var i=parseInt(this.get_maxHeight()); var j=parseInt(this.get_maxWidth()); if(l>t){t=l; }if(k>g){g=k; }if(i&&ij){i=Math.round(Math.abs((j-f)/2)); if(this.isAutoSizeBehaviorEnabled(b.WindowAutoSizeBehaviors.Default)){var e=this._dockMode?window:this.BrowserWindow; i+=d?Math.max(e.document.documentElement.scrollTop,e.document.body.scrollTop):Math.max(e.document.documentElement.scrollLeft,e.document.body.scrollLeft); }}return i; },_maintainMaximizedSize:function(){if(this.isVisible()&&this._getRestrictionZoneBounds()){this._reSetWindowPosition(); }if(!this.isMaximized()){return; }if(this.view){this.view.setMaximizeSize(); }},_enablePageScrolling:function(f){var d=document.body; var e=document.documentElement; if(f){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 e=null; if(this.get_restrictionZoneID()){var d=$get(this.get_restrictionZoneID()); if(d){e=$telerik.getBounds(d); e.scrollLeft=0; e.scrollTop=0; }}return e; },_storeBounds:function(){if(!this.isCreated()){return; }var d=this._getCurrentBounds(); if(this.isMaximized()){return false; }if(this.isMinimized()){if(this._restoreRect){d.width=this._restoreRect.width; d.height=this._restoreRect.height; }else{d.width=this.get_width(); d.height=this.get_height(); }}if(($telerik.isIE9||$telerik.isIE10)&&this._restoreRect&&d.x==this.get_leftHidingPoint()&&d.y==-10000){d.x=this._restoreRect.x; d.y=this._restoreRect.y; }this._restoreRect=d; },_restoreBounds:function(){if(!this._restoreRect){return; }var d=this._restoreRect; this.setSize(d.width,d.height); this.moveTo(d.x,d.y); },_getStoredBounds:function(){if(this._restoreRect){return this._restoreRect; }},_deleteStoredBounds:function(){this._restoreRect=null; },_getCurrentBounds:function(){var d=this.ui.getBounds(); if(this._firstShow!=true){this._updateWindowSize(this._height); this._firstShow=true; }var e=this._getRestrictionZoneBounds(); if(e){d.x-=e.x; d.y-=e.y; }return d; },_getCentralBounds:function(){var d=this._getCurrentBounds(); var e=this._getViewportBounds(); var f=parseInt((e.width-d.width)/2); var g=parseInt((e.height-d.height)/2); d.x=f+e.scrollLeft; d.y=g+e.scrollTop; return d; },_getViewportBounds:function(){var g=this._getRestrictionZoneBounds(); if(g){return g; }var d=$telerik.getClientBounds(); var e=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body); var f=document.documentElement.scrollTop||document.body.scrollTop; d.scrollLeft=e; d.scrollTop=f; if(this.isIE){if(d.width==0){d.width=document.body.clientWidth; }if(d.height==0){d.height=document.body.clientHeight; }}return d; },_getCalculatedPopupBounds:function(){var h=this._getStoredBounds(); if(h){return h; }var f=this._getCurrentBounds(); var e=this._offsetElement; if(this._top==null&&this._left==null&&!e){f=this._getCentralBounds(); }else{if(e){f.y=0; f.x=0; }else{var g=this._getViewportBounds(); f.x=g.scrollLeft; f.y=g.scrollTop; }var d=this._left?this._left:0; f.x+=d; var i=this._top?this._top:0; f.y+=i; }return f; },_checkRestrictionZoneBounds:function(f,d){var e=f; if(!e){e=this._getRestrictionZoneBounds(); if(!e){return true; }}return b.ResizeExtender.containsBounds(e,d); },_getTitlebarHeight:function(){if(!this.ui){return 0; }return this.ui.getTitlebarHeight(); },_reSetWindowPosition:function(){var d=this._getCalculatedPopupBounds(); this._setPopupVisible(d.x,d.y); },_fixIeHeight:function(g,e){if("CSS1Compat"==document.compatMode){var d=(g.offsetHeight-parseInt(e)); if(d>0){var f=(parseInt(g.style.height)-d); if(f>0){g.style.height=f+"px"; }}}},_setPopupVisible:function(d,e){var f=this._getRestrictionZoneBounds(); if(f){d+=f.x; e+=f.y; }if(this.isCreated()){this.view.moveTo(d,e); }},_createDefaultTable:function(){var d=document.createElement("table"); d.align="left"; d.cellSpacing=0; d.cellPadding=0; d.insertRow(-1); return d; },_isWindowRightToLeft:function(){var e=this._isRightToLeft; if(e==null){var d=this.get_element(); var f=d.parentNode?d:this._getDefaultParent(); e=this._isRightToLeft=$telerik.isRightToLeft(f); }return e; },_createStatusbarResizer:function(d){if(this.ui){this.ui.createStatusbarResizer(); }},_createStatusbarMessageCell:function(f){var g=f.rows[0].insertCell(-1); g.style.width="100%"; var e=this._getStatusMessageElement(); g.appendChild(e); var d=document.createElement("label"); d.setAttribute("for",e.id); d.innerHTML="status label"; d.style.display="none"; g.appendChild(d); },_createUI:function(){this.initView(); this.ui.createUI(); },_getDefaultParent:function(){var d=this.get_formID()?document.getElementById(this.get_formID()):null; if(!d){if(document.forms&&document.forms.length>0){d=document.forms[0]; }else{d=document.body; }}return d; },_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(d){if(this.ui){return this.ui.getCommandButton(d); }},getTitleCommandButton:function(d){return this._getTitleCommandButton(d); },_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(f){if(!f&&this._overflowHidden){return; }var g="hidden"; var e="hidden"; var j="hidden"; var i; var d; if(!this._dockMode){try{var h=this.get_contentFrame(); if(h){h.style.overflow=f?"":"hidden"; }i=h.contentWindow.document.documentElement; if(!i){return; }d=h.contentWindow.document.body; if(!f){this._oldBodyOverflow=d.style.overflow; this._oldDocOverflow=i.style.overflow; this._overflowHidden=true; }}catch(k){}}if(f){e=this._oldBodyOverflow; j=this._oldDocOverflow; g="auto"; this._overflowHidden=false; }if(this._dockMode){this.get_contentElement().style.overflow=g; }else{if(i&&d){if(j||j==""){i.style.overflow=j; }if(e||e==""){d.style.overflow=e; }}}},_manageVisibilityFirefox:function(e){var d=this._popupBehavior; if($telerik.isFirefox&&Sys.Browser.version<4&&d){d.set_manageVisibility(e); }},_updateTitleWidth:function(){if(this.ui){this.ui.updateTitleWidth(); }},_addWindowToDocument:function(){this.view.moveToDefaultParent(); },_createBackReference:function(){var g=this; if(!g.Argument){g.Argument={}; }var f=this._iframe; try{f.radWindow=g; if(f.contentWindow!=null){f.contentWindow.radWindow=g; }}catch(d){}},_getFullSkinName:function(){return"RadWindow RadWindow_"+this.get_skin()+" rwNormalWindow rwTransparentWindow"; },_configureMinimizeButton:function(d){var f=(true==d)?this._getLocalizationString("Restore"):this._getLocalizationString("Minimize"); var e=(true==d)?this.restore:this._minimize; var h=this._getTitleCommandButton("Minimize"); if(!(this.isBehaviorEnabled(b.WindowBehaviors.Close))&&h){var i=h.parentNode; var g=this._isWindowRightToLeft()?"right":"left"; if(true==d){g=(g=="right")?"left":"right"; }i.style.styleFloat=g; i.style.cssFloat=g; }this._registerTitlebarHandlersButton("Minimize",f,e); },_configureMaximizeButton:function(d){var f=(true==d)?this._getLocalizationString("Restore"):this._getLocalizationString("Maximize"); var e=(true==d)?this.restore:this.maximize; this._registerTitlebarHandlersButton("Maximize",f,e); },_registerTitlebarHandlersButton:function(e,f,d){if(this.ui){this.ui.changeCommandButtonByName(e,f,Function.createDelegate(this,d)); }},isCloned:function(){return this._isCloned; },isBehaviorEnabled:function(d){return d&this._behaviors?true:false; },isInitialBehaviorEnabled:function(d){return d&this.get_initialBehaviors()?true:false; },isAutoSizeBehaviorEnabled:function(d){return d&this.get_autoSizeBehaviors()?true:false; },setVisible:function(d){if(!this.view){this.initView(); }if(d){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 d=this._getTitleCommandButton("Pin"); return(d&&Sys.UI.DomElement.containsCssClass(d,"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 d=$get(this.get_minimizeZoneID()); if(d){if(this.isPinned()){this._isMinimizePinned=true; this.togglePin(); }this.view.minimizeToZone(d); }},_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 d=this.onCommand("Minimize"); if(!d){return false; }if(this.isMaximized()){this._normalizeWindowRootCss(); this._restoreBounds(); }if(this.view){this.view.minimize(); }},restore:function(){var d=this; this._clearTouchEventIdentifier(); if(!d.isCreated()||d.isClosed()){return; }var e=d.onCommand("Restore"); if(!e){return; }d._configureMinimizeButton(); d._configureMaximizeButton(); if(d.isMinimized()&&d.get_minimizeZoneID()){d._moveToDocument(); }d._normalizeWindowRootCss(); d._enablePageScrolling(true); d._restoreBounds(); d._manageVisibilityFirefox(false); d.setVisible(true); if(d._enableShadow&&!$telerik.isIE6){d._setShadowCSSClass(true); }if(d.get_showOnTopWhenMaximized()&&d._restoreZindex){d._popupElement.style.zIndex=d._restoreZindex; d._restoreZindex=null; }d.setVisible(true); d.setActive(true); d._manageVisibilityFirefox(true); if(this.isVisible()){d._show(); }},maximize:function(){this._clearTouchEventIdentifier(); if(!this.isCreated()){return; }var d=this.onCommand("Maximize"); if(!d){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=b.RadWindow.prototype._checkRestrictionZoneBounds; }this.view.maximize(); if(!this.isActive()){this.setActive(true); }},setActive:function(d){if(this.isCreated()&&this.view){this.view.setActive(d); }if(d){this._getWindowController().set_activeWindow(this); this.raiseEvent("activate",new Sys.EventArgs()); }},togglePin:function(){this._clearTouchEventIdentifier(); if(!this.isCreated()){return; }var f=this.onCommand("Pin"); if(!f){return; }this.setActive(true); var e=this.isPinned(); var d=e?this._getLocalizationString("PinOn"):this._getLocalizationString("PinOff"); this.view.toggleCommand("Pin"); this._registerTitlebarHandlersButton("Pin",d,this.togglePin); b.RadWindowUtils.setPinned(!e,this); },reload:function(){this._clearTouchEventIdentifier(); if(!this.isCreated()){return; }var f=this.onCommand("Reload"); if(!f){return; }if(!this._iframe){return; }this._onWindowUrlChanging(); try{this._iframe.contentWindow.location.reload(); if(($telerik.isChrome||$telerik.isSafari)&&this._iframe.contentWindow.document.domain!=document.domain){this._onWindowUrlChanged(); }}catch(d){this._onWindowUrlChanged(); }},fire:function(d){if(d&&typeof(this[d])=="function"){this[d](); }else{var e=this.get_windowManager(); if(!e){return; }if(d&&typeof(e[d])=="function"){e[d](); }}},_normalizeWindowRootCss:function(){var e=this._popupElement; if(e){$telerik.removeCssClasses(e,["rwMinimizedWindow","rwMaximizedWindow","rwMinimizedWindowShadow"]); Sys.UI.DomElement.addCssClass(e,"rwNormalWindow"); var d=e._hideWindowedElementsIFrame; if(d){Sys.UI.DomElement.removeCssClass(d,"rwMinimizedWindowOverlay"); }}this._updateTitleWidth(); },close:function(e){if(this.isClosed()){return; }var f=new Sys.CancelEventArgs(); var g=(typeof(e)!="undefined"&&!(e instanceof Sys.UI.DomEvent))?e:null; f._argument=g; f.get_argument=function(){return this._argument; }; this.raiseEvent("beforeClose",f); if(f.get_cancel()){return; }if($telerik.isIE9Mode&&this.isMaximized()&&this.get_destroyOnClose()){this._callHideWithTimeOut(); }else{this.hide(); }var d=new Sys.EventArgs(); d._argument=g; d.get_argument=function(){return this._argument; }; this.raiseEvent("close",d); this._enablePageScrolling(true); this._normalizeWindowRootCss(); if(e instanceof Sys.UI.DomEvent){e=null; }this._invokeDialogCallBackFunction(e); if(this.get_destroyOnClose()&&!this._dockMode){this.dispose(); }},_callHideWithTimeOut:function(){window.setTimeout(Function.createDelegate(this,this.hide),0); },_invokeDialogCallBackFunction:function(d){var e=this.get_clientCallBackFunction(); if(e){if("string"==typeof(e)){e=eval(e); }if("function"==typeof(e)){e(this,d); }}},onCommand:function(e){var d=new Sys.CancelEventArgs(); d._commandName=e; d.get_commandName=function(){return this._commandName; }; this.raise_command(d); if(d.get_cancel()){return false; }return true; },setUrl:function(e){if(this._dockMode){return; }this._createUI(); this.set_navigateUrl(e); var d=e; if(this.get_reloadOnShow()){d=this._getReloadOnShowUrl(d); }this.view.setUrl(d); if(!this._loaded){this._registerIframeLoadHandler(true); }this._loaded=true; },_registerChildPageHandlers:function(d){var f=null; try{f=this._iframe.contentWindow.document; if(f.domain!=document.domain){return; }}catch(g){return; }if(null==f){return; }if(d){this._onChildPageUnloadDelegate=Function.createDelegate(this,this._onChildPageUnload); this._iframe.contentWindow.onunload=this._onChildPageUnloadDelegate; this._onChildPageClickDelegate=Function.createDelegate(this,this._onChildPageClick); $telerik.addExternalHandler(f,"click",this._onChildPageClickDelegate); }else{if(this._onChildPageClickDelegate){$telerik.removeExternalHandler(f,"click",this._onChildPageClickDelegate); this._onChildPageClickDelegate=null; }}},_onChildPageUnload:function(d){this._registerChildPageHandlers(false); if(this._removeFromDOM&&!$telerik.isChrome&&!$telerik.isSafari){this._removeFromDOM=false; var f=this._popupElement; if(f&&f.parentNode){f.parentNode.removeChild(f); }}},_onChildPageClick:function(d){if(!this.isVisible()||this.isClosed()){return; }var f=d.target?d.target:d.srcElement; if(f){if(f.tagName=="INPUT"&&f.type=="button"){return; }else{if(f.tagName=="BUTTON"||f.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 f=this.get_animation()!=b.WindowAnimation.None; this.autoSize(f); }var e=null; try{e=this._iframe.contentWindow; e.close=Function.createDelegate(this,function(){this.close(); }); }catch(d){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 d=this._dockMode?this.get_contentElement():this.get_contentFrame(); if(d){if(this._opacity<100){if(this._contentCell){this._contentCell.style.background="none transparent"; }var e=d.style; e.filter="alpha(opacity="+this._opacity+")"; e.opacity=(this._opacity/100); }else{if(this._contentCell){this._contentCell.style.background=""; }if($telerik.isIE){if(this._contentCell){this._contentCell.removeAttribute("style"); }d.style.removeAttribute("filter"); d.style.removeAttribute("opacity"); }else{d.style.filter=""; d.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(d){if(this._offsetElementID!=d){this._offsetElementID=d; this._offsetElement=$get(d); this._deleteStoredBounds(); this._offsetSet=false; }if(this.isVisible()){this._show(); }},get_openerElementID:function(){return this._openerElementID; },set_openerElementID:function(d){if(this._openerElementID!=d){if(this._openerElement){this._registerOpenerElementHandler(this._openerElement,false); this._openerElement=null; }this._openerElementID=d; 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(d){if(this._left!=d){this._left=parseInt(d)||parseInt(d)==0?parseInt(d):null; }},get_top:function(){return this._top; },set_top:function(d){if(this._top!=d){this._top=parseInt(d)||parseInt(d)==0?parseInt(d):null; }},get_stylezindex:function(){if(this.ui){return this.ui.get_initialZIndexCss(); }},get_title:function(){return this._title; },set_title:function(d){if(this._title!=d){this._title=d; }if(this.isCreated()){this.view.setTitleText(this._title); }},get_width:function(){return parseInt(this._width); },_fixSizeValue:function(d){d=""+d; if(-1==d.indexOf("px")){d=parseInt(d); if(!isNaN(d)){d=d+"px"; }else{d=""; }}return d; },set_width:function(i){if(null==i){return false; }if(this.isMaximized()){return false; }var f=this.get_minWidth(); if(f&&f>i){i=f; }var e=parseInt(this.get_maxWidth()); if(e&&ef){i=e; }if(this.isVisible()){this._manageVisibilityFirefox(false); }i=this._fixSizeValue(i); if(this.isCreated()){var g=this.ui.getBounds(); var d=parseInt(i); if(isNaN(d)){d=g.width; }var h=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(g.x,g.y,d,g.height)); if(!h){return false; }}if(this._width!=i){this._width=i; }if(this._dockMode){this.setWidthDockMode(this.get_width()); }if(this.isCreated()){if(!this.popupElementIsOutOfView()){this._deleteStoredBounds(); }this.view.setWidth(this._width); }this._updateTitleWidth(); this._manageVisibilityFirefox(true); return true; },popupElementIsOutOfView:function(){return !!this.view&&this.view.isOutOfSight(); },get_minWidth:function(){var e=parseInt(this._minWidth); if(!this.isCreated()){return e; }var d=this.get_defaultMinWidth(); return(e&&(e>d))?e:d; },set_minWidth:function(d){if(this._minWidth!=d){this._minWidth=d; }},get_minHeight:function(){var e=parseInt(this._minHeight); if(!this.isCreated()){return e; }var d=this.get_defaultMinHeight(); return(e&&(e>d))?e:d; },set_minHeight:function(d){if(this._minHeight!=d){this._minHeight=d; }},get_height:function(){return parseInt(this._height); },set_height:function(i){if(null==i){return false; }if(this.isMaximized()){return false; }var f=this.get_minHeight(); if(f&&f>i&&(!e||(e&&e>=f))){i=f; }var e=parseInt(this.get_maxHeight()); if(e&&e100?100:d; this._opacity=d<0?0:d; if(this.isCreated()){this._updateOpacity(); }}},get_iconUrl:function(){return this._iconUrl; },set_iconUrl:function(d){this._iconUrl=d; if(this._titleIconElement){if(this.get_iconUrl()==""){this._titleIconElement.className="rwIcon"; }else{this._titleIconElement.style.background="transparent url('"+d+"') no-repeat scroll 0px 0px"; }}},get_renderMode:function(){return this._renderMode; },set_renderMode:function(d){this._renderMode=d; },get_keepInScreenBounds:function(){return this._keepInScreenBounds; },set_keepInScreenBounds:function(d){this._keepInScreenBounds=d; if(this._popupBehavior){this._popupBehavior.set_keepInScreenBounds(this._keepInScreenBounds); }if(this.isVisible()){this._reSetWindowPosition(); }},get_popupElement:function(){return this._popupElement; },set_status:function(e){var d=this._getStatusMessageElement(); if(d){window.setTimeout(function(){d.value=e; },0); }},get_status:function(){var d=this._getStatusMessageElement(); if(d){return d.value; }},raise_command:function(d){this.raiseEvent("command",d); },add_resize:function(d){this.get_events().addHandler("resizeEnd",d); },remove_resize:function(d){this.get_events().removeHandler("resizeEnd",d); },saveClientState:function(){var e=["position"]; var f={}; for(var d=0; d"):document.createElement("iframe"); e.name=s; e.src="javascript:'';"; e.style.width="100%"; e.style.height="100%"; e.style.border="0px"; e.frameBorder="0"; if($telerik.isIE8){e.style.display="block"; }this.contentFrame=this.window._iframe=e; if(($telerik.isMobileSafari||this.window._isiPhoneiPadAppleWebkit)&&!this.window._isPredefined){var o=document.createElement("div"); a(o).addClass("rwIframeWrapperIOS"); o.appendChild(this.contentFrame); this.contentCell.appendChild(o); if(this.window._isiOS5Safari){this.window.setContentFixedHeight(this.window.get_height(),o); }this.window._iframeWrapper=o; }else{this.contentCell.appendChild(this.window._iframe); }this.window._createBackReference(); }this.window._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(!this.window._popupBehavior){this.window.set_behaviors(this.window._behaviors); this.popupBehavior=this.window._popupBehavior=$create(Telerik.Web.PopupBehavior,{id:(new Date()-100)+"PopupBehavior",parentElement:null,overlay:this.window._overlay,keepInScreenBounds:this.window._keepInScreenBounds},null,null,this.container); }},setContent:function(d){this.contentCell.appendChild(d); d.style.display=""; this.content=this.window._contentElement=d; },get_container:function(){return this.container; },getHandlesWidth:function(){if(!this._handlesWidth){var e=this.table; if(!e){return 0; }var d=parseInt($telerik.getCurrentStyle(e.rows[2].cells[0],"width")); if(!d){return 0; }this._handlesWidth=2*d; }return this._handlesWidth; },setShadowCssClass:function(d){if(d){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 e=this.container; var f=(e.style.display=="none"); e.style.display=""; var d=$telerik.getBounds(e); if(f){e.style.display="none"; }return d; },updateTitleWidth:function(){if(this.window._visibleTitlebar&&!this.window.isMinimized()){var k=this.getTitleNode(); if(!k){return; }k.style.width="1px"; var l=0; var e=this.getTitleCommandsContainer(); var d=e.offsetWidth; if(d>0){var h=e.getElementsByTagName("LI"); if(h.length==0){d=0; }else{if(h[0]&&h[0].offsetWidth>0){d=h.length*h[0].offsetWidth; }}e.style.width=d?d+"px":""; l+=d; }var f=this.getIconNode(); var g=f.offsetWidth; if(g>0&&f.parentNode.tagName=="TD"){f.parentNode.style.width=g+"px"; l+=g; }l+=this.getHandlesWidth(); var i=0; var j=this.titlebar; i=j?j.offsetWidth-l:l; if(i>0){k.style.width=i+"px"; }}},getTitleNode:function(){if(!this.title){this.createTitle(); }return this.title; },createTitle:function(){var d=document.createElement("em"); d.setAttribute("unselectable","on"); if(this.window.get_enableAriaSupport()){d.id=this.window.get_id()+"_title"; d.setAttribute("role","label"); }return this.title=this.window._titleElement=d; },getIconNode:function(){if(!this.icon){this.createIcon(); }return this.icon; },createIcon:function(){var d=document.createElement("a"); d.className="rwIcon"; $addHandler(d,"mousedown",this.window._cancelEvent); this.icon=this.window._titleIconElement=d; },getTitleCommandsContainer:function(){if(!this.commandsContainer){this.createTitleCommandsContainer(); }return this.commandsContainer; },createTitleCommandsContainer:function(){var d=document.createElement("ul"); d.className="rwControlButtons"; if(this.window.get_enableAriaSupport()){d.setAttribute("role","presentation"); }this.commandsContainer=this.window._buttonsElement=d; },getStatusMessageNode:function(){if(!this.statusMessage){this.createStatusMessage(); }return this.statusMessage; },createStatusMessage:function(){var d=document.createElement("input"); d.id=this.window.get_id()+"_status"; d.readOnly="readonly"; d.setAttribute("unselectable","on"); d.setAttribute("tabindex","-1"); this.statusMessage=this.window._statusMessageElement=d; },createStatusbarResizer:function(){if(this.bottomResizer){return; }var d=this.statusCell.firstChild.rows[0].insertCell(-1); d.style.width="15px"; var e=document.createElement("div"); d.appendChild(e); this.bottomResizer=this.window._bottomResizer=e; },getCommandButton:function(d){if(!d||!this.commandsContainer){return null; }var e=d.toLowerCase(); e=e.charAt(0).toUpperCase()+e.substring(1); d="rw"+e+"Button"; return a("."+d,this.commandsContainer)[0]; },createCommandButton:function(d){var f=document.createElement("li"); var e=document.createElement("a"); e.href="javascript:void(0);"; e.className=d[0]; e.setAttribute("title",d[1]); if(this.window.get_enableAriaSupport()){f.setAttribute("role","presentation"); e.setAttribute("role","button"); }var g=document.createElement("span"); g.innerHTML=d[1]; e.appendChild(g); $telerik.addHandler(e,"click",d[2]); $addHandlers(e,{dblclick:this._cancelEvent,mousedown:this._cancelEvent},this); $telerik.addHandler(e,"click",this._cancelEvent); f.appendChild(e); this.commandsContainer.appendChild(f); return e; },changeCommandButton:function(d,f,e){if(!d){return; }d.setAttribute("title",f); d.innerHTML=f; $telerik.clearHandlers(d); $telerik.addHandler(d,"click",e); $addHandlers(d,{dblclick:this._cancelEvent,mousedown:this._cancelEvent},this); },changeCommandButtonByName:function(e,g,f){var d=this.getCommandButton(e); if(d){this.changeCommandButton(d,g,f); }},clearCommandButtons:function(){var e=a(this.commandsContainer); var d=e.find("a[class$='Button']"); for(var f=0; fd?f-d:f; var g=f+"px"; h.style.height=g; this._fixTableHeightInIE(h,f); e.style.height=g; },setContentFixedHeight:function(f,d){if(!d){return; }var j=this.ui; var g=this._substractWrappersBorder(f); var k=this.window.isVisible(); var e=j.table.rows[3].cells[1]; var i=j.table.rows[0].cells[1]; var h=j.table.rows[2].cells[1]; g-=k?parseInt($telerik.getBounds(e).height):parseInt($telerik.getCurrentStyle(e,"height")); if(this.window._visibleTitlebar){g-=k?parseInt($telerik.getBounds(j.titlebar).height):parseInt($telerik.getCurrentStyle(j.titlebar,"height")); g-=k?parseInt($telerik.getBounds(j.topResizer).height):parseInt($telerik.getCurrentStyle(j.topResizer,"height")); }else{g-=k?parseInt($telerik.getBounds(i).height):parseInt($telerik.getCurrentStyle(i,"height")); }if(this.window._visibleStatusbar){g-=k?parseInt($telerik.getBounds(h).height):parseInt($telerik.getCurrentStyle(h,"height")); }if(g>0){d.style.height=g+"px"; }},setContentWidth:function(d){if(!this.ui.content){return; }widthToSet=this.window._substractWrappersBorder(d)-this.ui.getHandlesWidth(); if(widthToSet>0){this.ui.content.style.width=widthToSet+"px"; }},setTitleText:function(d){if(!this.ui.title){return; }this.ui.title.innerHTML=d||" "; this.ui.updateTitleWidth(); },showShadow:function(){this.ui.setShadowCssClass(true); },hideShadow:function(){this.ui.setShadowCssClass(false); },moveOutOfSight:function(){var e=this.ui.popupBehavior; if(e){this.window._storeBounds(); var d=e.get_elementToShow(); a(d).css({display:"",position:"absolute",top:"-10000px",left:this.window.get_leftHidingPoint()+"px",overflow:"hidden"}); if(d._hideWindowedElementsIFrame&&d._hideWindowedElementsIFrame.style){d._hideWindowedElementsIFrame.style.display="none"; }}this._ariaHide(); },isOutOfSight:function(){var d=this.ui.container; if(!d){return false; }var e=parseInt(d.style.left,10); return($telerik.isIE9||$telerik.isIE10)&&e==this.window.get_leftHidingPoint(); },enableMoveResize:function(d){this.disableMoveResize(d); if(!this.ui.container){return; }var h=this.ui.table.rows; var e={}; var g=this.window._isWindowRightToLeft(); if(d.resize){this.ui.createStatusbarResizer(); this.ui.bottomResizer.style.display=""; if(g){e={nw:h[0].cells[2],n:this.ui.topResizer,ne:h[0].cells[0],w:[h[1].cells[2],h[2].cells[2]],e:[h[1].cells[0],h[2].cells[0]],sw:h[3].cells[2],s:h[3].cells[1],se:[h[3].cells[0],this.ui.bottomResizer]}; }else{e={nw:h[0].cells[0],n:this.ui.topResizer,ne:h[0].cells[2],w:[h[1].cells[0],h[2].cells[0]],e:[h[1].cells[2],h[2].cells[2]],sw:h[3].cells[0],s:h[3].cells[1],se:[h[3].cells[2],this.ui.bottomResizer]}; }}if(d.move){e.move=this.ui.titleCell; }this.resizeExtender=this.window._resizeExtender=new Telerik.Web.UI.ResizeExtender(this.window,this.ui.container,e,this.ui.table); var f=this.window._dockMode?null:this.ui.contentFrame; this.resizeExtender.set_iframeToSkip(f); },disableMoveResize:function(d){if(this.resizeExtender){this.resizeExtender.dispose(); this.resizeExtender=this.window._resizeExtender=null; }if(d.Resize&&this.ui.bottomResizer){this.ui.bottomResizer.style.display="none"; }},setCommandButtons:function(d){var e=[]; this.ui.clearCommandButtons(); for(var f=0; f/g,">")); }}catch(f){}},updatePopupZindex:function(){var d=this.ui.popupBehavior; if(d){if(this.window.isVisible()){d.show(); }}},dispose:function(){},_substractWrappersBorder:function(f,g){var i=this.ui.container; var d=this.ui.contentCell; if(!i||!d){return f; }var h=$telerik.getBorderBox(i); var e=$telerik.getBorderBox(d); f-=g?(h.horizontal+e.hrizontal):(h.vertical+e.vertical); return f; },_fixTableHeightInIE:function(g,e){if("CSS1Compat"==document.compatMode){var d=(g.offsetHeight-parseInt(e)); if(d>0){var f=(parseInt(g.style.height)-d); if(f>0){g.style.height=f+"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"); }}}; b.ClassicView.registerClass("Telerik.Web.UI.Window.ClassicView",b.ViewBase,b.IView); })($telerik.$,Telerik.Web.UI.Window); Type.registerNamespace("Telerik.Web.UI.Window"); (function(a,b,c){b.LightweightRenderer=function(d){b.LightweightRenderer.initializeBase(this,[d]); this.options=a.extend({skin:this.window.get_skin(),minTitleWidth:30}); this.container=this.titlebar=this.icon=this.title=this.commandsContainer=this.content=this.contentFrame=this.statusbar=this.statusMessage=this.topResizer=this.bottomResizer=null; }; b.LightweightRenderer.prototype={createUI:function(){if(this.container){return; }var l=this.window._isWindowRightToLeft(); var d=Sys.UI.DomElement.addCssClass; var e=document.createElement("div"); this.container=this.window._popupElement=e; e.id="RadWindowWrapper_"+this.window.get_id(); e.className=this._getSkinCssClass(); var i=this.window.get_cssClass(); if(i){d(e,i); }if(l){d(e,"rwRtl"); }if(!this.window._visibleTitlebar){d(e,"rwNoTitleBar"); }this.setShadowCssClass(this.window._enableShadow); e.setAttribute("unselectable","on"); var f=e.style; f.width=this.window._width; f.height=this.window._height; f.position="absolute"; var n=this.titlebar=this.window._titlebarElement=document.createElement("div"); n.className="rwTitleBar"; e.appendChild(n); var o=document.createElement("div"); o.className="rwTitleWrapper"; n.appendChild(o); o.appendChild(this.getIconNode()); o.appendChild(this.getTitleNode()); this.window.set_title(this.window._title); o.appendChild(this.getTitleCommandsContainer()); this.window._registerTitlebarHandlers(true); this.window.set_iconUrl(this.window.get_iconUrl()); var g=this.content=$get(this.window.get_id()+"_C")||this.pendingContent||document.createElement("div"); if(g){g.removeAttribute("id"); g.style.display="none"; g.className="rwContent"; this.setContent(g); }if(!this.window._dockMode){var h=g.getElementsByTagName("iframe"); var j=h.length>0?h[0]:document.createElement(($telerik.isIE&&!$telerik.isIE9Mode)?"