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 a=Function.createDelegate(null,function(b){if(b.keyCode==27){Telerik.Web.UI.RadWindowController.hideCurrentWindowIfNonModal(); }}); $addHandler(document.documentElement,"keydown",a); Sys.Application.add_unload(function(){$removeHandler(document.documentElement,"keydown",a); }); },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(a){if(a==this._activeWindow){return; }this.inactivateCurrentWindow(); this._activeWindow=a; Array.remove(this._historyStack,a); Array.add(this._historyStack,a); },notifyWindowClosed:function(a){if(this._activeWindow==a){this._activeWindow=null; }Array.remove(this._historyStack,a); this._activatePreviousWindow(); },_activatePreviousWindow:function(){var c=this._historyStack; var b=c.length-1; for(; b>=0; b--){var a=c[b]; if(!a){return; }if(a.isCreated()&&!a.isClosed()&&!a.isMinimized()){a.setActive(true); break; }else{Array.removeAt(c,b); }}},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(a){Telerik.Web.UI.RadWindow.initializeBase(this,[a]); 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.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._opacity=100; 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._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; }; Telerik.Web.UI.RadWindow.prototype={_getLocalization:function(){return Telerik.Web.UI.RadWindowUtils.Localization; },get_stylezindex:function(){return this._stylezindex; },set_stylezindex:function(a){this._stylezindex=a; },_registerIframeLoadHandler:function(a){if(!this._iframe){return; }if(a){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 a=$removeHandler(b,"click",this._onClickDelegate); this._onClickDelegate=null; }},_registerTitlebarHandlers:function(b){var a=this._titleCell; if(b){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(a,"dblclick",this._onTitlebarDblclickDelegate); $addHandler(a,"click",this._onTitlebarClickDelegate); }else{if(a){if(this._onTitlebarDblclickDelegate){$removeHandler(a,"dblclick",this._onTitlebarDblclickDelegate); this._onTitlebarDblclickDelegate=null; }if(this._onTitlebarClickDelegate){$removeHandler(a,"click",this._onTitlebarClickDelegate); this._onTitlebarClickDelegate=null; }$clearHandlers(a); }}},_makeModal:function(a){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(!a){return; }if(typeof(Telerik.Web.UI.RadWindowManager)!="undefined"&&Telerik.Web.UI.RadWindowManager.isInstanceOfType(this)){return; }this._onModalShowHandler=function(b){if(!b._modalExtender){b._modalExtender=new Telerik.Web.UI.ModalExtender(b._popupElement); }b._modalExtender.show(); b.center(); }; this.add_show(this._onModalShowHandler); this._onModalCloseHandler=function(b){window.setTimeout(function(){if(b._modalExtender){b._modalExtender.hide(); }},10); }; this.add_close(this._onModalCloseHandler); },_enableMoveResize:function(c){if(this._resizeExtender){this._resizeExtender.dispose(); this._resizeExtender=null; }if(!c){return; }if(!this._popupElement){return; }var d=this._tableElement.rows; var a={}; var b=this._isWindowRightToLeft(); if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Resize)){if(b){a={nw:d[0].cells[2],n:this._topResizer,ne:d[0].cells[0],w:[d[1].cells[2],d[2].cells[2]],e:[d[1].cells[0],d[2].cells[0]],sw:d[3].cells[2],s:d[3].cells[1],se:[d[3].cells[0],this._bottomResizer]}; }else{a={nw:d[0].cells[0],n:this._topResizer,ne:d[0].cells[2],w:[d[1].cells[0],d[2].cells[0]],e:[d[1].cells[2],d[2].cells[2]],sw:d[3].cells[0],s:d[3].cells[1],se:[d[3].cells[2],this._bottomResizer]}; }}if(this.isBehaviorEnabled(Telerik.Web.UI.WindowBehaviors.Move)){a.move=this._titleCell; }this._resizeExtender=new Telerik.Web.UI.ResizeExtender(this,this._popupElement,a,this._tableElement); },onResizeStart:function(){if(this.isMaximized()){return false; }this.setActive(true); this._cachedDragZoneBounds=this._getRestrictionZoneBounds(); },onResizing:function(a){if(!this._cachedDragZoneBounds||this._checkRestrictionZoneBounds(this._cachedDragZoneBounds,a)){if(this._dockMode){this.setWidthDockMode(a.width); this.setHeightDockMode(a.height); var b=this.get_contentElement(); var c=this._contentCell; setTimeout(function(){b.style.width=c.offsetWidth+"px"; b.style.height=c.offsetHeight+"px"; },0); }this._updateTitleWidth(); return true; }return false; },onResizeEnd:function(){this._cachedDragWindowBounds=null; var a=this._getCurrentBounds(); this.moveTo(a.x,a.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(b){this._cachedDragZoneBounds=null; this._cachedDragWindowBounds=null; if(this._overlay&&$telerik.isFirefox){this._popupBehavior._onMove(); }this.raiseEvent("dragEnd",new Sys.EventArgs()); var a=this._getCurrentBounds(); this.moveTo(a.x,a.y); this.setActive(true); if(this.isMinimized()){this._getTitleElement().style.width=""; }},onDrag:function(b){if(!this._cachedDragZoneBounds){return true; }var c=this._cachedDragWindowBounds; var d=this._cachedDragZoneBounds; b.width=c.width; b.height=c.height; var a=this._checkRestrictionZoneBounds(d,b); if(!a){if(b.x<=d.x){b.x=d.x; }else{if(d.x+d.width<=b.x+c.width){b.x=d.x+d.width-c.width; }}if(b.y<=d.y){b.y=d.y; }else{if(d.y+d.height<=b.y+c.height){b.y=d.y+d.height-c.height; }}a=true; }return a; },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 b=this.get_windowManager(); if(b){if(b.get_preserveClientState()){b.saveWindowState(this); }if(this._destroyOnClose){b.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 a=this._iframe; if(a){a.radWindow=null; a.src="javascript:'';"; a.name=""; a.removeAttribute("name"); a.removeAttribute("NAME"); }if(this._contentElement){this._contentElement.innerHTML=""; }var c=this._popupElement; if(c&&c.parentNode){c.parentNode.removeChild(c); }Telerik.Web.UI.RadWindow.callBaseMethod(this,"dispose"); },hide:function(){this._hide(); return true; },clone:function(b){var a=document.createElement("SPAN"); if(b){a.setAttribute("id",b); }return $telerik.cloneControl(this,Telerik.Web.UI.RadWindow,a); },set_contentElement:function(a){if(!this._isPredefined){this._dockMode=true; }this._createUI(); if(this._iframe){this._iframe.style.display="none"; }if(a.parentNode&&a.parentNode.removeChild){a.parentNode.removeChild(a); }this._contentCell.appendChild(a); a.style.display=""; this._contentElement=a; },get_contentElement:function(){return this._contentElement; },isCreated:function(){return this._popupElement!=null; },show:function(){var a=this.isCreated(); this._createUI(); if(this._navigateUrl&&(!a||this._reloadOnShow)){this.setUrl(this._navigateUrl); }if(!a&&(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.isModal()){this.center(); }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 b=$get(this.get_offsetElementID()); if(b){this._offsetElement=b; }}var a=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(a!=this._popupBehavior.get_parentElement()){this._popupBehavior.set_parentElement(a); }this._popupVisible=true; },_hide:function(){if(!this._animation||this._animation==0){this._afterHide(); }else{var b=Function.createDelegate(this,this._afterHide); var a=this.isMaximized(); $telerik.$(this._popupElement).stop().fadeOut(500,function(){b(a); }); }},_afterHide:function(a){if(!this._popupBehavior){return; }if(a==null){a=this.isMaximized(); }if(a){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()); if(this._autoSize&&this._dockMode){this.autoSize(!this._animation==Telerik.Web.UI.WindowAnimation.None); }},_playAnimation:function(){var h=Function.createDelegate(this,function(){var i=this._getCalculatedPopupBounds(); this._setPopupVisible(i.x,i.y); var k=$telerik.getBounds(this._popupElement); var l=this.get_offsetElementID(); if(l){var m=$get(l); if(m){var j=$telerik.getBounds(m); k.x=j.x; k.y=j.y; }}$telerik.$(this._popupElement).hide(); return k; }); var f=this._popupElement; var e=this._animation; var d=this._openerElement?$telerik.getBounds(this._openerElement):null; var c=h(); var b=""+this._position; var g=null; var a=Function.createDelegate(this,function(){this._popupElement.style.filter=""; this.get_popupElement().style.opacity=""; this._show(); this._afterShow(); }); Telerik.Web.UI.Animations.playJQueryAnimation(f,e,d,c,b,g,a); },_onClick:function(a){this.show(); return this._cancelEvent(a); },_cancelEvent:function(a){if(a){a.returnValue=false; a.cancelBubble=true; a.preventDefault(); a.stopPropagation(); }return false; },_getWindowController:function(){return Telerik.Web.UI.RadWindowController.getInstance(); },_getReloadOnShowUrl:function(b){var a="rwndrnd="+Math.random(); if(b.indexOf("?")>-1){a="&"+a; }else{a="?"+a; }b+=a; return b; },getWindowBounds:function(){return this._getCalculatedPopupBounds(); },toString:function(){return"[RadWindow id="+this.get_id()+"]"; },center:function(){var a=this._getCentralBounds(); this.moveTo(a.x,a.y); },moveTo:function(a,b){var d=this._popupElement; if(d){var c=$telerik.getBounds(d); var e=this._getRestrictionZoneBounds(); if(e){var f=this._checkRestrictionZoneBounds(null,new Sys.UI.Bounds(a+e.x,b+e.y,c.width,c.height)); if(!f){return false; }}}a=parseInt(a); b=parseInt(b); this._createUI(); this._setPopupVisible(a,b); this._storeBounds(); return true; },setSize:function(b,a){this._firstShow=false; this.set_width(b); this.set_height(a); this._storeBounds(); },autoSize:function(x){if(this.isClosed()){return; }var c=this.get_contentFrame(); var e=this._tableElement; var b=$telerik.getBounds(this._tableElement); var l=$telerik.getBounds(this._contentCell); var p=null; var k; var v; var i=this.get_contentElement(); if(this._dockMode&&i){i.style.height="1px"; k=i.scrollHeight; v=i.scrollWidth; }else{try{p=c.contentWindow.document.documentElement; }catch(d){return false; }var m=c.contentWindow.document.body; var i=p; if($telerik.isIE||$telerik.isFirefox){i=c; }i.style.width="1px"; k=p.scrollHeight; v=p.scrollWidth; e.style.width="1px"; var g=this._contentCell.scrollWidth; if(v0){this._contentElement.style.width=widthToSet+"px"; }},setHeightDockMode:function(a){if(!this._dockMode||!this.get_contentElement()){return; }var b=a; b-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[3].cells[1],"height")); if(this._visibleTitlebar){b-=parseInt($telerik.getCurrentStyle(this._titlebarElement,"height")); b-=parseInt($telerik.getCurrentStyle(this._topResizer,"height")); }else{b-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[0].cells[1],"height")); }if(this._visibleStatusbar){b-=parseInt($telerik.getCurrentStyle(this._tableElement.rows[2].cells[1],"height")); }if(b>0){this._contentElement.style.height=b+"px"; }},calcPosition:function(d,c,a,b){var e=d+Math.round((c-a)/2); if(e<0||e+c>b){e=Math.round(Math.abs((b-a)/2)); }return e; },_maintainMaximizedSize:function(){if(!this.isMaximized()){return; }var g=this._popupElement; if(!g){return; }var a=this._getViewportBounds(); g.style.top=(a.scrollTop+a.y)+"px"; g.style.left=(a.scrollLeft+a.x)+"px"; $telerik.setSize(g,{width:a.width,height:a.height}); var b=this._getRestrictionZoneBounds(); if(!b){this._enablePageScrolling(false); }var c=this._tableElement; a=$telerik.getContentSize(g); var d=$telerik.getBorderBox(c); var e=$telerik.getPaddingBox(c); var f=a.height-d.vertical-e.vertical; c.style.height=f+"px"; this._fixIeHeight(c,f); if(this._dockMode){this.setWidthDockMode(a.width); this.setHeightDockMode(a.height); }},_enablePageScrolling:function(c){var a=document.body; var b=document.documentElement; if(c){if(null!=this._documentOverflow){b.style.overflow=this._documentOverflow; }if(null!=this._bodyOverflow){a.style.overflow=this._bodyOverflow; }this._documentOverflow=null; this._bodyOverflow=null; }else{if(null==this._documentOverflow){this._documentOverflow=b.style.overflow; }if(null==this._bodyOverflow){this._bodyOverflow=a.style.overflow; }a.style.overflow="hidden"; b.style.overflow="hidden"; }},_getRestrictionZoneBounds:function(){var b=null; if(this.get_restrictionZoneID()){var a=$get(this.get_restrictionZoneID()); if(a){b=$telerik.getBounds(a); b.scrollLeft=0; b.scrollTop=0; }}return b; },_storeBounds:function(){if(!this.isCreated()){return; }var a=this._getCurrentBounds(); if(this.isMaximized()){return false; }if(this.isMinimized()){if(this._restoreRect){a.width=this._restoreRect.width; a.height=this._restoreRect.height; }else{a.width=this.get_width(); a.height=this.get_height(); }}this._restoreRect=a; },_restoreBounds:function(){if(!this._restoreRect){return; }var a=this._restoreRect; this.setSize(a.width,a.height); this.moveTo(a.x,a.y); if(this._dockMode){this.setWidthDockMode(a.width); this.setHeightDockMode(a.height); }},_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 a=$telerik.getBounds(this._popupElement); if(c){this._popupElement.style.display="none"; }var b=this._getRestrictionZoneBounds(); if(b){a.x-=b.x; a.y-=b.y; }return a; },_getCentralBounds:function(){var a=this._getCurrentBounds(); var c=this._getViewportBounds(); var d=parseInt((c.width-a.width)/2); var b=parseInt((c.height-a.height)/2); a.x=d+c.scrollLeft; a.y=b+c.scrollTop; return a; },_getViewportBounds:function(){var d=this._getRestrictionZoneBounds(); if(d){return d; }var a=$telerik.getClientBounds(); var b=$telerik.getCorrectScrollLeft(document.documentElement)||$telerik.getCorrectScrollLeft(document.body); var c=document.documentElement.scrollTop||document.body.scrollTop; a.scrollLeft=b; a.scrollTop=c; if(this.isIE){if(a.width==0){a.width=document.body.clientWidth; }if(a.height==0){a.height=document.body.clientHeight; }}return a; },_getCalculatedPopupBounds:function(){var c=this._getStoredBounds(); if(c){return c; }var d=this._getCurrentBounds(); var e=this._offsetElement; if(!this._top&&!this._left&&!e){d=this._getCentralBounds(); }else{if(e){d.y=0; d.x=0; }else{var b=this._getViewportBounds(); d.x=b.scrollLeft; d.y=b.scrollTop; }var f=this._left?this._left:0; d.x+=f; var a=this._top?this._top:0; d.y+=a; }return d; },_checkRestrictionZoneBounds:function(c,a){var b=c; if(!b){b=this._getRestrictionZoneBounds(); if(!b){return true; }}return Telerik.Web.UI.ResizeExtender.containsBounds(b,a); },_reSetWindowPosition:function(){var a=this._getCalculatedPopupBounds(); this._setPopupVisible(a.x,a.y); },_fixIeHeight:function(a,b){if("CSS1Compat"==document.compatMode){var d=(a.offsetHeight-parseInt(b)); if(d>0){var c=(parseInt(a.style.height)-d); if(c>0){a.style.height=c+"px"; }}}},_setPopupVisible:function(a,b){var c=this._getRestrictionZoneBounds(); if(c){a+=c.x; b+=c.y; }this._popupBehavior._setCoordinates(a,b); this._popupBehavior.show(); if(!this.get_width()){this._popupElement.style.width=""; }this._updateTitleWidth(); },_createDefaultTable:function(){var a=document.createElement("TABLE"); a.align="left"; a.cellSpacing=0; a.cellPadding=0; a.insertRow(-1); return a; },_isWindowRightToLeft:function(){var b=this._isRightToLeft; if(b==null){var a=this.get_element(); var c=a.parentNode?a:this._getDefaultParent(); b=this._isRightToLeft=$telerik.isRightToLeft(c); }return b; },_createStatusbarResizer:function(a){var b=a.rows[0].insertCell(-1); b.style.width="15px"; var c=document.createElement("DIV"); b.appendChild(c); this._bottomResizer=c; },_createStatusbarMessageCell:function(a){var b=a.rows[0].insertCell(-1); b.style.width="100%"; var c=this._getStatusMessageElement(); b.appendChild(c); },_createUI:function(){if(!this._popupElement){var c=this.get_id(); var b="RadWindowWrapper_"+c; var o=this._isWindowRightToLeft(); var e=document.createElement("DIV"); e.id=b; e.className=this._getFullSkinName(); if(o){Sys.UI.DomElement.addCssClass(e,"RadWindow_rtl"); }e.style.width=this._width; e.style.height=this._height; e.setAttribute("unselectable","on"); this._popupElement=e; var d=document.createElement("TABLE"); d.cellSpacing=0; d.cellPadding=0; this._tableElement=d; var v=[]; if(o){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 n=["rwTitleRow","rwContentRow","rwStatusbarRow","rwFooterRow"]; var m=0; for(var k=0; k<4; k++){var u=d.insertRow(-1); u.className=n[k]; for(var l=1; l<=3; l++){var g=u.insertCell(-1); g.innerHTML=" "; g.className=classNames[m]; m++; }}var t=d.rows[0].cells[1]; t.innerHTML=""; this._titleCell=t; var s=document.createElement("DIV"); s.className="rwTopResize"; s.innerHTML=""; this._topResizer=s; this._titleCell.appendChild(this._topResizer); var h=this._createDefaultTable(); h.className="rwTitlebarControls"; this._titlebarElement=h; this._titleCell.appendChild(this._titlebarElement); var p=this._getTitleIcon(); var y=this._titlebarElement.rows[0].insertCell(-1); y.appendChild(p); var z=this._getTitleElement(); var t=this._titlebarElement.rows[0].insertCell(-1); t.appendChild(z); this.set_title(this._title); var f=this._titlebarElement.rows[0].insertCell(-1); f.noWrap=true; f.style.whiteSpace="nowrap"; f.appendChild(this._getTitleCommandButtonsHolder()); var q=d.rows[1].cells[1]; q.vAlign="top"; q.innerHTML=""; this._contentCell=q; var w=this.get_name(); var a=this._createDefaultTable(); a.style.width="100%"; this._statusCell=d.rows[2].cells[1]; this._statusCell.innerHTML=""; this._statusCell.appendChild(a); if(o){this._createStatusbarResizer(a); this._createStatusbarMessageCell(a); }else{this._createStatusbarMessageCell(a); this._createStatusbarResizer(a); }this._popupElement.appendChild(this._tableElement); this._popupElement.style.display="none"; this._popupElement.style.position="absolute"; this._addWindowToDocument(); this.set_behaviors(this._behaviors); this._registerTitlebarHandlers(true); this.set_visibleTitlebar(this._visibleTitlebar); this.set_visibleStatusbar(this._visibleStatusbar); if(this._dockMode){var x=$get(this.get_id()+"_C"); if(x&&x.innerHTML){x.style.overflow="auto"; x.style.border="0px"; this.set_contentElement(x); this.setWidthDockMode(this.get_width()); this.setHeightDockMode(this.get_height()); }}else{var r=($telerik.isIE)?document.createElement("