Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.RadWindowControllerClass=function(){ this._activeWindow=null; this._historyStack=[]; this._registerGlobalBodyEventHandlers(); }; Telerik.Web.UI.RadWindowControllerClass.prototype={getInstance:function(){ return this; },_registerGlobalBodyEventHandlers:function(){ var _1=Function.createDelegate(null,function(e){ if(e.keyCode==27){ Telerik.Web.UI.RadWindowController.hideCurrentWindowIfNonModal(); } }); $addHandler(document.documentElement,"keydown",_1); Sys.Application.add_unload(function(){ $removeHandler(document.documentElement,"keydown",_1); }); },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(_3){ if(_3==this._activeWindow){ return; } this.inactivateCurrentWindow(); this._activeWindow=_3; Array.remove(this._historyStack,_3); Array.add(this._historyStack,_3); },notifyWindowClosed:function(_4){ if(this._activeWindow==_4){ this._activeWindow=null; } Array.remove(this._historyStack,_4); this._activatePreviousWindow(); },_activatePreviousWindow:function(){ var _5=this._historyStack; var i=_5.length-1; for(;i>=0;i--){ var _7=_5[i]; if(!_7){ return; } if(_7.isCreated()&&!_7.isClosed()&&!_7.isMinimized()){ _7.setActive(true); break; }else{ Array.removeAt(_5,i); } } },get_activeWindow:function(){ return this._activeWindow; }}; Telerik.Web.UI.RadWindowControllerClass.registerClass("Telerik.Web.UI.RadWindowControllerClass",null); if(!Telerik.Web.UI.RadWindowController){ Telerik.Web.UI.RadWindowController=new Telerik.Web.UI.RadWindowControllerClass(); } Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.RadWindowUtils"); Telerik.Web.UI.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"}; Telerik.Web.UI.RadWindow=function(_8){ Telerik.Web.UI.RadWindow.initializeBase(this,[_8]); this._eventNames=["resize","activate","dragStart","dragEnd","show","pageLoad","close","command"]; 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._buttonsElement=null; this._buttonsArray=[]; this.isIE=($telerik.isIE); this._openerElementID=null; this._offsetElementID=null; this._behaviors=Telerik.Web.UI.WindowBehaviors.Default; this._initialBehaviors=Telerik.Web.UI.WindowBehaviors.None; this._navigateUrl=null; this._left=""; this._top=""; this._formID=null; this._skin="Default"; this._title=""; this._width="300px"; this._height="300px"; this._minimizeZoneID=null; this._restrictionZoneID=""; this._clientCallBackFunction=null; this._reloadOnShow=false; this._visibleOnPageLoad=false; this._destroyOnClose=false; this._visibleTitlebar=true; this._visibleStatusbar=true; this._showContentDuringLoad=true; this._modal=false; this._overlay=false; this._keepInScreenBounds=false; this._autoSize=false; this._iconUrl=null; this._minimizeIconUrl=null; this._animation=Telerik.Web.UI.WindowAnimation.None; 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._onModalShowHandler=null; this._onModalCloseHandler=null; this._loaded=false; this._isCloned=false; this._restoreRect=null; this._popupBehavior=null; this._popupVisible=false; this._windowManager; this._browserWindow=window; 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; }; Telerik.Web.UI.RadWindow.prototype={_getLocalization:function(){ return Telerik.Web.UI.RadWindowUtils.Localization; },_registerIframeLoadHandler:function(_9){ if(!this._iframe){ return; } if(_9){ 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(_a){ if(_a){ 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(_b,_c){ if(!_b){ return; } if(true==_c){ this._onClickDelegate=Function.createDelegate(this,this._onClick); $addHandler(_b,"click",this._onClickDelegate); }else{ var _d=$removeHandler(_b,"click",this._onClickDelegate); this._onClickDelegate=null; } },_registerTitlebarHandlers:function(_e){ var _f=this._titleCell; if(_e){ this._onTitlebarDblclickDelegate=Function.createDelegate(this,function(){ if(this.isMinimized()){ this.restore(); }else{ if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Maximize)){ if(this.isMaximized()){ this.restore(); }else{ this.maximize(); } } } }); this._onTitlebarClickDelegate=Function.createDelegate(this,function(){ this.setActive(true); }); $addHandler(_f,"dblclick",this._onTitlebarDblclickDelegate); $addHandler(_f,"click",this._onTitlebarClickDelegate); }else{ if(_f){ if(this._onTitlebarDblclickDelegate){ $removeHandler(_f,"dblclick",this._onTitlebarDblclickDelegate); this._onTitlebarDblclickDelegate=null; } if(this._onTitlebarClickDelegate){ $removeHandler(_f,"click",this._onTitlebarClickDelegate); this._onTitlebarClickDelegate=null; } $clearHandlers(_f); } } },_makeModal:function(_10){ 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(!_10){ return; } if(typeof (Telerik.Web.UI.RadWindowManager)!="undefined"&&Telerik.Web.UI.RadWindowManager.isInstanceOfType(this)){ return; } this._onModalShowHandler=function(_11){ if(!_11._modalExtender){ _11._modalExtender=new Telerik.Web.UI.ModalExtender(_11._popupElement); } _11._modalExtender.show(); _11.center(); }; this.add_show(this._onModalShowHandler); this._onModalCloseHandler=function(_12){ window.setTimeout(function(){ if(_12._modalExtender){ _12._modalExtender.hide(); } },10); }; this.add_close(this._onModalCloseHandler); },_enableMoveResize:function(_13){ if(this._resizeExtender){ this._resizeExtender.dispose(); this._resizeExtender=null; } if(!_13){ return; } if(!this._popupElement){ return; } var _14=this._tableElement.rows; var _15={}; var _16=this._isWindowRightToLeft(); if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize)){ if(_16){ _15={nw:_14[0].cells[2],n:this._topResizer,ne:_14[0].cells[0],w:[_14[1].cells[2],_14[2].cells[2]],e:[_14[1].cells[0],_14[2].cells[0]],sw:_14[3].cells[2],s:_14[3].cells[1],se:[_14[3].cells[0],this._bottomResizer]}; }else{ _15={nw:_14[0].cells[0],n:this._topResizer,ne:_14[0].cells[2],w:[_14[1].cells[0],_14[2].cells[0]],e:[_14[1].cells[2],_14[2].cells[2]],sw:_14[3].cells[0],s:_14[3].cells[1],se:[_14[3].cells[2],this._bottomResizer]}; } } if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Move)){ _15["move"]=this._titleCell; } this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._popupElement,_15,this._tableElement); },onResizeStart:function(){ if(this.isMaximized()){ return false; } this.setActive(true); this._cachedDragZoneBounds=this._getRestrictionZoneBounds(); },onResizing:function(_17){ if(!this._cachedDragZoneBounds){ return true; } return this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,_17); },onResizeEnd:function(){ this._cachedDragWindowBounds=null; var _18=this._getCurrentBounds(); this.moveTo(_18.x,_18.y); if(this._overlay&&$telerik.isFirefox){ this._popupBehavior._onMove(); } this.raiseEvent("resize",new Sys.EventArgs()); },onDragStart:function(){ this.setActive(true); if(this.isPinned()||this.isMaximized()){ return false; } if(this.isMinimized()&&this.get_minimizeZoneID()){ return false; } this._cachedDragZoneBounds=this._getRestrictionZoneBounds(); this._cachedDragWindowBounds=$telerik.getBounds(this._popupElement); this.raiseEvent("dragStart",new Sys.EventArgs()); return true; },onDragEnd:function(_19){ this._cachedDragZoneBounds=null; this._cachedDragWindowBounds=null; if(this._overlay&&$telerik.isFirefox){ this._popupBehavior._onMove(); } this.raiseEvent("dragEnd",new Sys.EventArgs()); var _1a=this._getCurrentBounds(); this.moveTo(_1a.x,_1a.y); this.setActive(true); },onDrag:function(_1b){ if(!this._cachedDragZoneBounds){ return true; } var _1c=this._cachedDragWindowBounds; var _1d=this._cachedDragZoneBounds; _1b.width=_1c.width; _1b.height=_1c.height; var _1e=this._checkRestrictionZoneBounds(_1d,_1b); if(!_1e){ if(_1b.x<=_1d.x){ _1b.x=_1d.x; }else{ if(_1d.x+_1d.width<=_1b.x+_1c.width){ _1b.x=_1d.x+_1d.width-_1c.width; } } if(_1b.y<=_1d.y){ _1b.y=_1d.y; }else{ if(_1d.y+_1d.height<=_1b.y+_1c.height){ _1b.y=_1d.y+_1d.height-_1c.height; } } _1e=true; } return _1e; },initialize:function(){ Telerik.Web.UI.RadWindow.callBaseMethod(this,"initialize"); if(this._visibleOnPageLoad){ setTimeout(Function.createDelegate(this,function(){ this.show(); }),0); } this._registerWindowResizeHandler(true); },dispose:function(){ var _1f=this.get_windowManager(); if(_1f){ if(_1f.get_preserveClientState()){ _1f.saveWindowState(this); } if(this._destroyOnClose){ _1f.removeWindow(this); } } if(this._windowAnimation){ this._windowAnimation.dispose(); } this._enableMoveResize(false); this._makeModal(false); this._registerTitlebarHandlers(false); this._registerWindowResizeHandler(false); this._registerIframeLoadHandler(false); if(this._openerElement){ this._registerOpenerElementHandler(this._openerElement,false); } this.set_behaviors(Telerik.Web.UI.WindowBehaviors.None); var _20=this._iframe; if(_20){ _20.radWindow=null; _20.src="javascript:'';"; _20.name=""; _20.removeAttribute("name"); _20.removeAttribute("NAME"); } if(this._contentElement){ this._contentElement.innerHTML=""; } var _21=this._popupElement; if(_21&&_21.parentNode){ _21.parentNode.removeChild(_21); } Telerik.Web.UI.RadWindow.callBaseMethod(this,"dispose"); },hide:function(){ this._hide(); return true; },clone:function(_22,_23){ if(!_22){ alert("Telerik.Web.UI.RadWindow.clone called without providing a name argument"); return; } var evs=(_23!=false)?this._getEventsParameter():null; var _25=this._getPropertiesParameter(); var _26=document.createElement("SPAN"); _26.setAttribute("id",_22); var wnd=$create(Telerik.Web.UI.RadWindow,_25,evs,null,_26); wnd.set_name(_22); wnd._isCloned=true; return wnd; },set_contentElement:function(_28){ this._createUI(); if(this._iframe){ this._iframe.style.display="none"; } if(_28.parentNode&&_28.parentNode.removeChild){ _28.parentNode.removeChild(_28); } this._contentCell.appendChild(_28); _28.style.display=""; this._contentElement=_28; },get_contentElement:function(){ return this._contentElement; },isCreated:function(){ return this._popupElement!=null; },show:function(){ var _29=this.isCreated(); this._createUI(); if(this._navigateUrl&&(!_29||this._reloadOnShow)){ this.setUrl(this._navigateUrl); } if(!_29&&(this._initialBehaviors!=Telerik.Web.UI.WindowBehaviors.None)){ this._show(); this._afterShow(); if(this.isInitialBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Minimize)){ this.minimize(); } if(this.isInitialBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Maximize)){ this.maximize(); } if(this.isInitialBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Pin)){ this.togglePin(); } return; } if(this._animation==Telerik.Web.UI.WindowAnimation.None){ this._show(); this._afterShow(); }else{ this._playAnimation(); } },_show:function(){ this.raiseEvent("beforeShow",new Sys.EventArgs()); if(this.get_offsetElementID()&&!this._offsetElement){ var _2a=$get(this.get_offsetElementID()); if(_2a){ this._offsetElement=_2a; } } var _2b=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(_2b!=this._popupBehavior.get_parentElement()){ this._popupBehavior.set_parentElement(_2b); } this._popupVisible=true; },_hide:function(){ if(!this._animation||this._animation==0){ this._afterHide(); }else{ $telerik.$(this._popupElement).stop().fadeOut(500); } },_afterHide:function(){ if(!this._popupBehavior){ return; } if(this.isMaximized()){ this.restore(); } this._popupBehavior.hide(true); this._popupVisible=false; this._getWindowController().notifyWindowClosed(this); },_afterShow:function(){ this.setActive(true); this._storeBounds(); this.raiseEvent("show",new Sys.EventArgs()); },_playAnimation:function(){ var _2c=Function.createDelegate(this,function(){ var _2d=this._getCalculatedPopupBounds(); this._setPopupVisible(_2d.x,_2d.y); var _2e=$telerik.getBounds(this._popupElement); $telerik.$(this._popupElement).hide(); return _2e; }); var _2f=this._popupElement; var _30=this._animation; startBounds=this._openerElement?$telerik.getBounds(this._openerElement):null; var _31=_2c(); var _32=""+this._position; onAnimationStart=null; var _33=Function.createDelegate(this,function(){ this._show(); this._afterShow(); }); Telerik.Web.UI.Animations.playJQueryAnimation(_2f,_30,startBounds,_31,_32,onAnimationStart,_33); },_onClick:function(e){ this.show(); return this._cancelEvent(e); },_cancelEvent:function(e){ if(e){ e.returnValue=false; e.cancelBubble=true; e.preventDefault(); e.stopPropagation(); } return false; },_getWindowController:function(){ return Telerik.Web.UI.RadWindowController.getInstance(); },_getReloadOnShowUrl:function(_36){ var str="rwndrnd="+Math.random(); if(_36.indexOf("?")>-1){ str="&"+str; }else{ str="?"+str; } _36+=str; return _36; },_getPropertiesParameter:function(){ if(!this._propertiesParameter){ var _38={}; for(var _39 in Telerik.Web.UI.RadWindow.prototype){ var _3a=this[_39]; if(typeof (_3a)=="function"&&_39.indexOf("get_")==0){ var _3b=_39.substring(4); if(null==this["set_"+_3b]){ continue; } var _3c=_3a.call(this); if(null==_3c){ continue; } _38[_3b]=_3c; if(_3b=="skin"){ break; } } } this._propertiesParameter=_38; } var _3d=this._cloneObject(this._propertiesParameter); return _3d; },_getEventsParameter:function(){ if(!this._eventsParameter){ var _3e={}; var _3f=this.get_events(); var _40=this._eventNames; for(var i=0;i<_40.length;i++){ var _42=_40[i]; var _43=_3f.getHandler(_42); if(_43&&typeof (eval(_43))=="function"){ _3e[_42]=eval(_43); } } this._eventsParameter=_3e; } return this._eventsParameter; },_cloneObject:function(_44){ var _45={}; for(var _46 in _44){ _45[_46]=_44[_46]; } return _45; },getWindowBounds:function(){ return this._getCalculatedPopupBounds(); },toString:function(){ return "[RadWindow id="+this.get_id()+"]"; },center:function(){ var _47=this._getCentralBounds(); this.moveTo(_47.x,_47.y); },moveTo:function(x,y){ var _4a=this._popupElement; if(_4a){ var _4b=$telerik.getBounds(_4a); var _4c=this._getRestrictionZoneBounds(); if(_4c){ var _4d=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(x+_4c.x,y+_4c.y,_4b.width,_4b.height)); if(!_4d){ return false; } } } x=parseInt(x); y=parseInt(y); this._createUI(); this._setPopupVisible(x,y); this._storeBounds(); return true; },setSize:function(_4e,_4f){ this._firstShow=false; this.set_width(_4e); this.set_height(_4f); this._storeBounds(); },autoSize:function(){ var _50=this.get_contentFrame(); var _51=null; try{ _51=_50.contentWindow.document.documentElement; } catch(ex){ return false; } var _52=$telerik.getBounds(_50.parentNode); var _53=this.getWindowBounds(); _50.style.width="1px"; _50.style.height="1px"; var _54=_51.scrollHeight; var _55=_51.scrollWidth; var _56=this._getRestrictionZoneBounds(); var _57=_56?_56:this._getViewportBounds(); var _58=_53.width-_52.width+_55; var _59=_53.height-_52.height+_54; var _5a=Math.min(_58,_57.width); var _5b=Math.min(_59,_57.height); var _5c=this.get_keepInScreenBounds(); if(!_56){ this.set_keepInScreenBounds(true); } var _5d=16; if(_5b<_54){ _5a=Math.min(_5a+_5d,_57.width); } if(_5a<_55){ _5b=Math.min(_5b+_5d,_57.height); } var _5e=this.calcPosition(_53.x,_53.width,_5a,_57.width); var _5f=this.calcPosition(_53.y,_53.height,_5b,_57.height); var _60={x:_5e+_57.scrollLeft,y:_5f+_57.scrollTop,width:_5a,height:_5b}; this.setBounds(_60); _50.style.width="100%"; _50.style.height="100%"; if($telerik.isIE){ _50.style.overflow="hidden"; setTimeout(function(){ _50.style.overflow=""; },0); } this.set_keepInScreenBounds(_5c); return true; },setBounds:function(_61){ if(!_61){ return; } this._checkRestrictionZoneBounds=function(){ return true; }; this.moveTo(_61.x,_61.y); this.setSize(_61.width,_61.height); this._checkRestrictionZoneBounds=Telerik.Web.UI.RadWindow.prototype._checkRestrictionZoneBounds; },calcPosition:function(pos,_63,_64,_65){ var _66=pos+Math.round((_63-_64)/2); if(_66<0||_66+_63>_65){ _66=Math.round(Math.abs((_65-_64)/2)); } return _66; },_maintainMaximizedSize:function(){ if(!this.isMaximized()){ return; } var _67=this._popupElement; if(!_67){ return; } var _68=this._getViewportBounds(); _67.style.top=(_68.scrollTop+_68.y)+"px"; _67.style.left=(_68.scrollLeft+_68.x)+"px"; $telerik.setSize(_67,{width:_68.width,height:_68.height}); var _69=this._getRestrictionZoneBounds(); if(!_69){ this._enablePageScrolling(false); } var _6a=this._tableElement; _68=$telerik.getContentSize(_67); var _6b=$telerik.getBorderBox(_6a); var _6c=$telerik.getPaddingBox(_6a); var _6d=_68.height-_6b.vertical-_6c.vertical; _6a.style.height=_6d+"px"; this._fixIeHeight(_6a,_6d); },_enablePageScrolling:function(_6e){ var _6f=document.body; var doc=document.documentElement; if(_6e){ if(null!=this._documentOverflow){ doc.style.overflow=this._documentOverflow; } if(null!=this._bodyOverflow){ _6f.style.overflow=this._bodyOverflow; } this._documentOverflow=null; this._bodyOverflow=null; }else{ if(null==this._documentOverflow){ this._documentOverflow=doc.style.overflow; } if(null==this._bodyOverflow){ this._bodyOverflow=_6f.style.overflow; } _6f.style.overflow="hidden"; doc.style.overflow="hidden"; } },_getRestrictionZoneBounds:function(){ var _71=null; if(this.get_restrictionZoneID()){ var _72=$get(this.get_restrictionZoneID()); if(_72){ _71=$telerik.getBounds(_72); _71.scrollLeft=0; _71.scrollTop=0; } } return _71; },_storeBounds:function(){ if(!this.isCreated()){ return; } var _73=this._getCurrentBounds(); if(this.isMaximized()){ return false; } if(this.isMinimized()){ if(this._restoreRect){ _73.width=this._restoreRect.width; _73.height=this._restoreRect.height; }else{ _73.width=this.get_width(); _73.height=this.get_height(); } } this._restoreRect=_73; },_restoreBounds:function(){ if(!this._restoreRect){ return; } var _74=this._restoreRect; this.setSize(_74.width,_74.height); this.moveTo(_74.x,_74.y); },_getStoredBounds:function(){ if(this._restoreRect){ return this._restoreRect; } },_deleteStoredBounds:function(){ this._restoreRect=null; },_getCurrentBounds:function(){ var _75=(this._popupElement.style.display=="none")?true:false; this._popupElement.style.display=""; if(this._firstShow!=true){ this._updateWindowSize(this._height); this._firstShow=true; } var _76=$telerik.getBounds(this._popupElement); if(_75){ this._popupElement.style.display="none"; } var _77=this._getRestrictionZoneBounds(); if(_77){ _76.x-=_77.x; _76.y-=_77.y; } return _76; },_getCentralBounds:function(){ var _78=this._getCurrentBounds(); var _79=this._getViewportBounds(); var x=parseInt((_79.width-_78.width)/2); var y=parseInt((_79.height-_78.height)/2); _78.x=x+_79.scrollLeft; _78.y=y+_79.scrollTop; return _78; },_getViewportBounds:function(){ var _7c=this._getRestrictionZoneBounds(); if(_7c){ return _7c; } var _7d=$telerik.getClientBounds(); var _7e=document.documentElement.scrollLeft||document.body.scrollLeft; var _7f=document.documentElement.scrollTop||document.body.scrollTop; _7d.scrollLeft=_7e; _7d.scrollTop=_7f; if(this.isIE){ if(_7d.width==0){ _7d.width=document.body.clientWidth; } if(_7d.height==0){ _7d.height=document.body.clientHeight; } } return _7d; },_getCalculatedPopupBounds:function(){ var _80=this._getStoredBounds(); if(_80){ return _80; } var _81=this._getCurrentBounds(); var _82=this._offsetElement; if(!this._top&&!this._left&&!_82){ _81=this._getCentralBounds(); }else{ if(_82){ _81.y=0; _81.x=0; }else{ var _83=this._getViewportBounds(); _81.x=_83.scrollLeft; _81.y=_83.scrollTop; } var _84=this._left?this._left:0; _81.x+=_84; var top=this._top?this._top:0; _81.y+=top; } return _81; },_checkRestrictionZoneBounds:function(_86,_87){ var _88=_86; if(!_88){ _88=this._getRestrictionZoneBounds(); if(!_88){ return true; } } return Telerik.Web.UI.ResizeExtender.containsBounds(_88,_87); },_reSetWindowPosition:function(){ var _89=this._getCalculatedPopupBounds(); this._setPopupVisible(_89.x,_89.y); },_fixIeHeight:function(_8a,_8b){ if("CSS1Compat"==document.compatMode){ var _8c=(_8a.offsetHeight-parseInt(_8b)); if(_8c>0){ var _8d=(parseInt(_8a.style.height)-_8c); if(_8d>0){ _8a.style.height=_8d+"px"; } } } },_setPopupVisible:function(x,y){ var _90=this._getRestrictionZoneBounds(); if(_90){ x+=_90.x; y+=_90.y; } this._popupBehavior._setCoordinates(x,y); this._popupBehavior.show(); if(!this.get_width()){ this._popupElement.style.width=""; } this._updateTitleWidth(); },_createDefaultTable:function(){ var _91=document.createElement("TABLE"); _91.align="left"; _91.cellSpacing=0; _91.cellPadding=0; _91.insertRow(-1); return _91; },_isWindowRightToLeft:function(){ var _92=this._isRightToLeft; if(_92==null){ var _93=this.get_element(); var _94=_93.parentNode?_93:this._getDefaultParent(); _92=this._isRightToLeft=$telerik.isRightToLeft(_94); } return _92; },_createStatusbarResizer:function(_95){ var _96=_95.rows[0].insertCell(-1); _96.style.width="15px"; var _97=document.createElement("DIV"); _96.appendChild(_97); this._bottomResizer=_97; },_createStatusbarMessageCell:function(_98){ var _99=_98.rows[0].insertCell(-1); _99.style.width="100%"; var _9a=this._getStatusMessageElement(); _99.appendChild(_9a); },_createUI:function(){ if(!this._popupElement){ var _9b=this.get_id(); var _9c="RadWindowWrapper_"+_9b; var _9d=this._isWindowRightToLeft(); var _9e=document.createElement("DIV"); _9e.id=_9c; _9e.className=this._getFullSkinName(); if(_9d){ Sys.UI.DomElement.addCssClass(_9e,"RadWindow_rtl"); } _9e.style.width=this._width; _9e.style.height=this._height; _9e.setAttribute("unselectable","on"); this._popupElement=_9e; var _9f=document.createElement("TABLE"); _9f.cellSpacing=0; _9f.cellPadding=0; this._tableElement=_9f; var _a0=[]; if(_9d){ classNames=["rwCorner rwTopRight","rwTitlebar","rwCorner rwTopLeft","rwCorner rwBodyRight","rwWindowContent","rwCorner rwBodyLeft","rwCorner rwBodyRight","rwStatusbar","rwCorner rwBodyLeft","rwCorner rwFooterRight","rwFooterCenter","rwCorner rwFooterLeft"]; }else{ classNames=["rwCorner rwTopLeft","rwTitlebar","rwCorner rwTopRight","rwCorner rwBodyLeft","rwWindowContent","rwCorner rwBodyRight","rwCorner rwBodyLeft","rwStatusbar","rwCorner rwBodyRight","rwCorner rwFooterLeft","rwFooterCenter","rwCorner rwFooterRight"]; } var _a1=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"]; var _a2=0; for(var i=0;i<4;i++){ var row=_9f.insertRow(-1); row.className=_a1[i]; for(var j=1;j<=3;j++){ var _a6=row.insertCell(-1); _a6.innerHTML=" "; _a6.className=classNames[_a2]; _a2++; } } var _a7=_9f.rows[0].cells[1]; _a7.innerHTML=""; this._titleCell=_a7; var _a8=document.createElement("DIV"); _a8.className="rwTopResize"; _a8.innerHTML=""; this._topResizer=_a8; this._titleCell.appendChild(this._topResizer); var _a9=this._createDefaultTable(); _a9.className="rwTitlebarControls"; this._titlebarElement=_a9; this._titleCell.appendChild(this._titlebarElement); var _aa=this._getTitleIcon(); var _ab=this._titlebarElement.rows[0].insertCell(-1); _ab.appendChild(_aa); var _ac=this._getTitleElement(); var _a7=this._titlebarElement.rows[0].insertCell(-1); _a7.appendChild(_ac); this.set_title(this._title); var _ad=this._titlebarElement.rows[0].insertCell(-1); _ad.noWrap=true; _ad.style.whiteSpace="nowrap"; _ad.appendChild(this._getTitleCommandButtonsHolder()); var _ae=_9f.rows[1].cells[1]; _ae.vAlign="top"; _ae.innerHTML=""; this._contentCell=_ae; var _af=this.get_name(); var _b0=($telerik.isIE)?document.createElement("