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