Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.WindowManager"); function GetRadWindowManager(){ return Telerik.Web.UI.WindowManager.Manager; } window.radalert=function(_1,_2,_3,_4){ var _5=GetRadWindowManager(); var _6=_5._getStandardPopup("alert",_1); if(typeof (_4)!="undefined"){ _6.set_title(_4); } _6.setSize(_2?_2:280,_3?_3:200); _6.show(); _6.center(); return _6; }; window.radconfirm=function(_7,_8,_9,_a,_b,_c){ var _d=GetRadWindowManager(); var _e=_d._getStandardPopup("confirm",_7); if(typeof (_c)!="undefined"){ _e.set_title(_c); } _e.setSize(_9?_9:280,_a?_a:200); _e.callBack=function(_f){ if(_8){ _8(_f); } _e.close(); _e.callBack=null; }; _e.show(); _e.center(); return _e; }; window.radprompt=function(_10,_11,_12,_13,_14,_15){ var _16=GetRadWindowManager(); var _17=""; var _18=_16._getStandardPopup("prompt",_10,_17); if(typeof (_15)!="undefined"){ _18.set_title(_15); } _18.setSize(_12?_12:280,_13?_13:200); _18.callBack=function(_19){ if(_11){ _11(_19); } _18.close(); _18.callBack=null; }; _18.show(); _18.center(); return _18; }; window.radopen=function(url,_1b){ var _1c=GetRadWindowManager(); return _1c.open(url,_1b); }; Telerik.Web.UI.RadWindowManager=function(_1d){ Telerik.Web.UI.RadWindowManager.initializeBase(this,[_1d]); this._windowIDs=[]; this._windows=[]; this._preserveClientState=false; this.Open=this.open; this.GetWindowByName=this.getWindowByName; this.GetWindowById=this.getWindowById; this.GetActiveWindow=this.getActiveWindow; this.GetWindowObjects=this.get_windows; this.GetWindows=this.get_windows; this.Cascade=this.cascade; this.Tile=this.tile; this.RestoreAll=this.restoreAll; this.MaximizeAll=this.maximizeAll; this.MinimizeAll=this.minimizeAll; this.ShowAll=this.showAll; this.CloseAll=this.closeAll; this.CloseActiveWindow=this.closeActiveWindow; this.MinimizeActiveWindow=this.minimizeActiveWindow; this.RestoreActiveWindow=this.restoreActiveWindow; }; Telerik.Web.UI.RadWindowManager.prototype={initialize:function(_1e){ this._initialize(); this._registerAsPageManager(); if(this.get_preserveClientState()){ this.restoreState(); } },dispose:function(){ var _1f=this.get_preserveClientState(); if(_1f){ this.saveState(); } this._disposeWindows(); this._windows=null; Telerik.Web.UI.RadWindowManager.callBaseMethod(this,"dispose"); },open:function(url,_21){ var _22=this.getWindowByName(_21); if(!_22){ if(!_21){ _21=this.get_id()+this._getUniqueId(); } _22=this._createWindow(_21); } if(url){ _22.setUrl(url); } _22.show(); return _22; },getActiveWindow:function(){ return Telerik.Web.UI.RadWindowController.get_activeWindow(); },getWindowById:function(id){ var _24=this.get_windows(); for(var i=0;i<_24.length;i++){ var _26=_24[i]; if(id==_26.get_id()){ return _26; } } return null; },getWindowByName:function(_27){ var _28=this.get_windows(); for(var i=0;i<_28.length;i++){ var _2a=_28[i]; if(_27==_2a.get_name()){ return _2a; } } return null; },removeWindow:function(_2b){ if(!_2b){ return; } var w=this.getWindowByName(_2b.get_name()); var _2d=this.get_windows(); if(w){ Array.remove(_2d,w); } },_getUniqueId:function(){ return ""+(new Date()-100); },_initialize:function(){ var _2e=this._windowIDs; for(var i=0;i<_2e.length;i++){ var _30=_2e[i]; var _31=$find(_30); if(!_31){ continue; } _31.set_windowManager(this); this._windows[this._windows.length]=_31; } },_disposeWindows:function(){ for(var i=0;i1){ if("true"==_4c[0]&&!_4b.IsVisible()){ _4b.Show(); } window.setTimeout(function(){ if(parseInt(_4c[1])>0){ _4b.set_width(_4c[1]); } if(parseInt(_4c[2])>0){ _4b.set_height(_4c[2]); } _4b.moveTo(parseInt(_4c[3]),parseInt(_4c[4])); if("true"==_4c[5]){ _4b.minimize(); } },1); } } var _4d=this.get_windows(); for(i=0;i<_4d.length;i++){ var _4e=_4d[i]; var _4f=this._getRadWindowCookie(_4e.get_id()); if(_4f){ restoreWindow(_4e); } } },_getOnlyCookie:function(){ var _50="RadWindowCookie"; var _51=document.cookie.split("; "); for(var i=0;i<_51.length;i++){ var _53=_51[i].split("="); if(_50==_53[0]){ return _53[1]; } } return null; },_setRadWindowCookie:function(_54,_55){ _54="["+_54+"]"; var _56=this._getOnlyCookie(); var _57=""; var _58=""; if(_56){ var _59=_56.split(_54); if(_59&&_59.length>1){ _57=_59[0]; _58=_59[1].substr(_59[1].indexOf("#")+1); }else{ _58=_56; } } var _5a=new Date(); _5a.setFullYear(_5a.getFullYear()+10); document.cookie="RadWindowCookie"+"="+(_57+_54+"-"+_55+"#"+_58)+";path=/;expires="+_5a.toUTCString()+";"; },_getRadWindowCookie:function(_5b){ var _5c=this._getOnlyCookie(); if(!_5c){ return; } var _5d=null; _5b="["+_5b+"]"; var _5e=_5c.indexOf(_5b); if(_5e>=0){ var _5f=_5e+_5b.length+1; _5d=_5c.substring(_5f,_5c.indexOf("#",_5f)); } return _5d; },cascade:function(){ var _60=40; var _61=40; var _62=this._getWindowsSortedByZindex(); for(var i=0;i<_62.length;i++){ var _64=_62[i]; if(!_64.isClosed()&&_64.isVisible()){ var _65=_64.restore(); _64.moveTo(_60,_61); _64.setActive(true); _60+=25; _61+=25; } } },tile:function(){ var _66=this._getWindowsSortedByZindex(); var _67=0; for(var i=0;i<_66.length;i++){ var _69=_66[i]; if(!_69.isClosed()&&_69.isVisible()){ _67++; } } var _6a=5; var _6b=0; var _6c=1; if(_67<=_6a){ _6b=_67; }else{ var i=2; while((_67*i)<(_6a*(i+1))){ i++; if(i>6){ break; } } _6c=i; _6b=Math.ceil(_67/_6c); } var _6d=TelerikCommonScripts.getClientBounds(); var _6e=Math.floor(_6d.width/_6b); var _6f=Math.floor(_6d.height/_6c); var _70=document.documentElement.scrollLeft||document.body.scrollLeft; var top=document.documentElement.scrollTop||document.body.scrollTop; var _72=0; for(var i=0;i<_66.length;i++){ var _69=_66[i]; if(!_69.isClosed()&&_69.isVisible()){ _72++; if((_72-1)%(_6b)==0&&_72>_6b){ top+=_6f; _70=document.documentElement.scrollLeft||document.body.scrollLeft; } _69.restore(); _69.moveTo(_70,top); _69.setSize(_6e,_6f); _70+=_6e; } } },closeActiveWindow:function(){ this._executeActiveWindow("close"); },minimizeActiveWindow:function(){ this._executeActiveWindow("minimize"); },restoreActiveWindow:function(){ this._executeActiveWindow("restore"); },closeAll:function(){ this._executeAll("close"); },showAll:function(){ this._executeAll("show"); },minimizeAll:function(){ this._executeAll("minimize"); },maximizeAll:function(){ this._executeAll("maximize"); },restoreAll:function(){ this._executeAll("restore"); },_getWindowsSortedByZindex:function(){ var _73=this._windows.concat([]); var _74=function(_75,_76){ var z1=_75.get_zindex(); var z2=_76.get_zindex(); if(z1==z2){ return 0; } return (z1