Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadWindowControllerClass=function(){
this._activeWindow=null;
this._registerGlobalBodyEventHandlers();
};
Telerik.Web.UI.RadWindowControllerClass.prototype={getInstance:function(){
return this;
},_registerGlobalBodyEventHandlers:function(){
var _1=Function.createDelegate(null,function(e){
if(e.keyCode==27){
Telerik.Web.UI.RadWindowController.hideCurrentWindowUnconditionally();
}
});
$addHandler(document.body,"keydown",_1);
Sys.Application.add_unload(function(){
$removeHandler(document.body,"keydown",_1);
});
},hideCurrentWindowUnconditionally:function(){
if(this._activeWindow!=null){
this._activeWindow.hide();
}
this._activeWindow=null;
},inactivateCurrentWindow:function(){
if(this._activeWindow!=null){
this._activeWindow.setActive(false);
}
this._activeWindow=null;
},notifyWindowClosed:function(_3){
if(this._activeWindow==_3){
this._activeWindow=null;
}
},set_ActiveWindow:function(_4){
if(_4!=this._activeWindow){
this.inactivateCurrentWindow();
}
this._activeWindow=_4;
if(!this._activeWindow.isActive()){
this._activeWindow.setActive(true);
}
},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();
}

