Type.registerNamespace("Telerik.Web.UI"); Type.registerNamespace("Telerik.Web.UI.WindowManager"); $telerik.toWindowManager=function(a){return a; }; $telerik.findWindowManager=$find; function GetRadWindowManager(){return Telerik.Web.UI.WindowManager.Manager; }window.radalert=function(g,f,c,e,a,b){var d=GetRadWindowManager(); return d.radalert(g,f,c,e,a,b); }; window.radconfirm=function(h,a,g,d,b,f,c){var e=GetRadWindowManager(); return e.radconfirm(h,a,g,d,b,f,c); }; window.radprompt=function(h,a,g,d,b,f,c){var e=GetRadWindowManager(); return e.radprompt(h,a,g,d,b,f,c); }; window.radopen=function(f,c,g,a,b,e){var d=GetRadWindowManager(); return d.open(f,c,null,g,a,b,e); }; window.radopenWithContainer=function(b,d){var c=GetRadWindowManager(); var a=$get(b); if(!a){c.radalert("Content element with such ClientID not found!
Make sure you have provided a correct ClientID!"); return; }return c.open(null,d,a); }; Telerik.Web.UI.RadWindowManager=function(a){Telerik.Web.UI.RadWindowManager.initializeBase(this,[a]); 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={get_zIndex:function(){return Telerik.Web.UI.RadWindowUtils._zIndex; },set_zIndex:function(a){if(isNaN(a)){return; }Telerik.Web.UI.RadWindowUtils._zIndex=a; },initialize:function(b){try{var c=this.get_element().style.zIndex; if(c){this.set_zIndex(c); }}catch(a){}this._initialize(); this._registerAsPageManager(); if(this.get_preserveClientState()){this.restoreState(); }},dispose:function(){var a=this.get_preserveClientState(); if(a){this.saveState(); }this._disposeWindows(); this._windows=null; Telerik.Web.UI.RadWindowManager.callBaseMethod(this,"dispose"); },open:function(k,m,b,l,d,e,i){var a,g=this.getWindowByName(m); if(!g){if(!m){m=this.get_id()+this._getUniqueId(); }g=this._createWindow(m,b); var c=this.get_element().className; if(c){g.set_cssClass(c.replace(/^ /,"")); }}else{if(b&&this.get_navigateUrl()){g._dockMode=false; }}if(k&&!g.get_reloadOnShow()&&g._iframe&&g._iframe.src!=k){g.setUrl(k); }else{if(k){g._navigateUrl=k; }}if(l||d){g.setSize(l,d); }var h=g.get_popupElement(); var f=parseInt(e,10); if(!isNaN(f)){g.set_left(f); if(h){a=g.getWindowBounds(); g.moveTo(f,a.y); }}var j=parseInt(i,10); if(!isNaN(j)){g.set_top(j); if(h){a=g.getWindowBounds(); g.moveTo(a.x,j); }}g.show(); return g; },radalert:function(g,e,c,d,a,b){var f=this._getStandardPopup("alert",g,null,b); if(typeof(d)!="undefined"){f.set_title(d); }f.setSize(e?e:280,c?c:200); f.set_clientCallBackFunction(function(i,h){if(a){a(h); }}); f.center(); f.show(); return f; },radconfirm:function(h,a,f,d,b,e,c){var g=this._getStandardPopup("confirm",h,null,c); if(typeof(e)!="undefined"){g.set_title(e); }g.setSize(f?f:280,d?d:200); g.set_clientCallBackFunction(function(j,i){if(a){a(i); }}); g.center(); g.show(); return g; },radprompt:function(i,a,g,e,b,f,c){var h=this._getStandardPopup("prompt",i,c); if(typeof(f)!="undefined"){h.set_title(f); }h.setSize(g?g:280,e?e:200); h.set_clientCallBackFunction(function(k,j){if(a){a(j); }}); h.center(); h.show(); if(c&&$telerik.isIE){var d=h.get_popupElement().getElementsByTagName("INPUT")[0]; if(d){d.value=c; }}return h; },getActiveWindow:function(){return Telerik.Web.UI.RadWindowController.get_activeWindow(); },getWindowById:function(b){var c=this.get_windows(); for(var a=0; a1){if("true"==f[0]&&!h.isVisible()){h.show(); }window.setTimeout(function(){if(parseInt(f[1],10)>0){h.set_width(f[1]); }if(parseInt(f[2],10)>0){h.set_height(f[2]); }if("true"==f[0]){h.moveTo(parseInt(f[3],10),parseInt(f[4],10)); }if("true"==f[5]){h.minimize(); }},1); }}var d=this.get_windows(); for(a=0; a1){b=a[0]; c=a[1].substr(a[1].indexOf("#")+1); }else{c=e; }}var g=new Date(); g.setFullYear(g.getFullYear()+10); document.cookie="RadWindowCookie="+(b+d+"-"+f+"#"+c)+";path=/;expires="+g.toUTCString()+";"; },_getRadWindowCookie:function(d){var a=this._getOnlyCookie(); if(!a){return; }var e=null; d="["+d+"]"; var c=a.indexOf(d); if(c>=0){var b=c+d.length+1; e=a.substring(b,a.indexOf("#",b)); }return e; },cascade:function(){var d=0; var c=0; var b=this._getWindowsSortedByZindex(); for(var a=0; a6){break; }}g=a; d=Math.ceil(e/g); }var h=$telerik.getClientBounds(); var m=Math.floor(h.width/d); var l=Math.floor(h.height/g); var b=document.documentElement.scrollLeft||document.body.scrollLeft; var o=document.documentElement.scrollTop||document.body.scrollTop; var n=0; for(a=0; ad){o+=l; b=document.documentElement.scrollLeft||document.body.scrollLeft; }j.restore(); j.moveTo(b,o); j.setSize(m,l); b+=m; }}},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 a=this._windows.concat([]); var b=function(c,d){var e=c.get_zindex(); var f=d.get_zindex(); if(e==f){return 0; }return(e