Type.registerNamespace("Telerik.Web.UI.Dialogs");
function initDialog(){
var _1=$find("initializer");
if(_1){
_1.distributeClientParameters();
}
}
function setInnerHtml(id,_3){
var _4=document.getElementById(id);
if(_4){
_4.innerHTML=_3;
}
}
Telerik.Web.UI.Dialogs.DialogInitializer=function(_5){
Telerik.Web.UI.Dialogs.DialogInitializer.initializeBase(this,[_5]);
this._parameterConsumers=[];
};
Telerik.Web.UI.Dialogs.DialogInitializer.prototype={initialize:function(){
Telerik.Web.UI.Dialogs.DialogInitializer.callBaseMethod(this,"initialize");
this._appLoadHandlerDelegate=Function.createDelegate(this,this._appLoadHandler);
Sys.Application.add_load(this._appLoadHandlerDelegate);
},get_parameterConsumers:function(){
return this._parameterConsumers;
},set_parameterConsumers:function(_6){
this._parameterConsumers=_6;
},get_clientParameters:function(){
return Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference().ClientParameters;
},autoSizeWindow:function(){
try{
var _7=Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference();
if(_7){
var _8=document.body.offsetHeight;
var _9=$telerik.getBounds(_7.get_contentFrame().parentNode);
var _a=_8-_9.height;
if(_a&&_a<100&&_a>-100){
var _8=_7.getWindowBounds().height;
_8+=_a;
_7.set_height(_8);
}
}
}
catch(e){
}
},distributeClientParameters:function(){
this.autoSizeWindow();
for(var i=0;i<this._parameterConsumers.length;i++){
var _c=$find(this._parameterConsumers[i]);
if(_c){
_c.clientInit(this.get_clientParameters());
}
}
},_appLoadHandler:function(){
this.distributeClientParameters();
Sys.Application.remove_load(this._appLoadHandlerDelegate);
this._appLoadHandlerDelegate=null;
}};
Telerik.Web.UI.Dialogs.DialogInitializer.registerClass("Telerik.Web.UI.Dialogs.DialogInitializer",Telerik.Web.UI.RadWebControl);

