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){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(l,n,b,m,d,e,j){var a,g=this.getWindowByName(n);
if(!g){if(!n){n=this.get_id()+this._getUniqueId();
}g=this._createWindow(n,b);
var c=this.get_element().className;
if(c){g.set_cssClass(c.replace(/^ /,""));
}}else{if(b&&this.get_navigateUrl()){g._dockMode=false;
}}if(l&&!g.get_reloadOnShow()&&g._iframe&&g._iframe.src!=l){g.setUrl(l);
}else{if(l){g._navigateUrl=l;
}}if(m||d){g.setSize(m,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 k=parseInt(j,10);
if(!isNaN(k)){g.set_top(k);
if(h){a=g.getWindowBounds();
g.moveTo(a.x,k);
}}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(j,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(k,j){if(a){a(j);
}});
g.center();
g.show();
return g;
},radprompt:function(j,a,g,e,b,f,c){var h=this._getStandardPopup("prompt",j,c);
if(typeof(f)!="undefined"){h.set_title(f);
}h.setSize(g?g:280,e?e:200);
h.set_clientCallBackFunction(function(l,k){if(a){a(k);
}});
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"==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 c=this.get_windows();
for(i=0;
i1){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