﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.DialogDefinition=function(){
this.Width="600px";
this.Height="400px";
this.Title="";
this.Behaviors=36;
this.Modal=true;
this.VisibleStatusbar=false;
this.VisibleTitlebar=true;
this.ClientCallbackFunction="";
};
Telerik.Web.UI.DialogDefinition.registerClass("Telerik.Web.UI.DialogDefinition",null);
Telerik.Web.UI.DialogDefinitionsDictionary=function(_1){
for(var _2 in _1){
var _3=_1[_2];
var _4=new Telerik.Web.UI.DialogDefinition();
for(var _5 in _3){
_4[_5]=_3[_5];
}
this[_2]=_4;
}
};
Telerik.Web.UI.DialogDefinitionsDictionary.registerClass("Telerik.Web.UI.DialogDefinitionsDictionary",null);
Telerik.Web.UI.DialogOpenEventArgs=function(_6,_7){
Telerik.Web.UI.DialogOpenEventArgs.initializeBase(this);
this._dialogName=_6;
if(_7){
this._parameters=_7;
}else{
this._parameters=null;
}
};
Telerik.Web.UI.DialogOpenEventArgs.prototype={get_dialogName:function(){
return this._dialogName;
},set_parameters:function(_8){
this._parameters=_8;
},get_parameters:function(){
return this._parameters;
}};
Telerik.Web.UI.DialogOpenEventArgs.registerClass("Telerik.Web.UI.DialogOpenEventArgs",Sys.EventArgs);
Telerik.Web.UI.DialogOpener=function(_9){
Telerik.Web.UI.DialogOpener.initializeBase(this,[_9]);
this._additionalQueryString="";
this._dialogDefinitions={};
this._handlerUrl="";
this._useClassicDialogs=false;
this._language="en-US";
this._skin="";
this._dialogParametersProviderTypeName="";
this._dialogUrlLengthLimit=2000;
this._dialogUniqueID="";
this._dialogContainers={};
this._container=null;
this._something="";
};
Telerik.Web.UI.DialogOpener.prototype={initialize:function(){
Telerik.Web.UI.DialogOpener.callBaseMethod(this,"initialize");
this._dialogDefinitions=new Telerik.Web.UI.DialogDefinitionsDictionary(this.get_dialogDefinitions());
},dispose:function(){
Telerik.Web.UI.DialogOpener.callBaseMethod(this,"dispose");
},get_container:function(){
if(this._container==null){
this._container=this._findChildControl("Window");
}
return this._container;
},get_additionalQueryString:function(){
return this._additionalQueryString;
},set_additionalQueryString:function(_a){
this._additionalQueryString=_a;
},get_dialogDefinitions:function(){
return this._dialogDefinitions;
},get_handlerUrl:function(){
return this._handlerUrl;
},set_handlerUrl:function(_b){
this._handlerUrl=_b;
},get_useClassicDialogs:function(){
return this._useClassicDialogs;
},set_useClassicDialogs:function(_c){
this._useClassicDialogs=_c;
},get_language:function(){
return this._language;
},set_language:function(_d){
this._language=_d;
},get_skin:function(){
return this._skin;
},set_skin:function(_e){
this._skin=_e;
},add_open:function(_f){
this.get_events().addHandler("open",_f);
},remove_open:function(_10){
this.get_events().removeHandler("open",_10);
},raise_open:function(_11){
this.raiseEvent("Open",_11);
},openUrl:function(url,_13,_14,_15,_16,_17,_18,_19,_1a,_1b,_1c){
var _1d=this._getDialogContainer("EXTERNAL_URL");
_1d.set_width(_14+"px");
_1d.set_height(_15+"px");
_1d.set_behaviors(_1a||Telerik.Web.UI.WindowBehaviors.Default);
_1d.set_modal(_19||true);
_1d.set_visibleStatusbar(_1b||true);
_1d.set_visibleTitlebar(_1c||true);
var _1e=new Telerik.Web.UI.DialogOpenEventArgs(url,_13);
this.raise_open(_1e);
_1d.ClientParameters=_13;
_1d.set_clientCallBackFunction(_16);
_1d.setUrl(url);
_1d.show();
_1d.center();
window.setTimeout(function(){
_1d.setActive(true);
},100);
_1d._iframe.focus();
},open:function(_1f,_20,_21){
var _22=this._getDialogContainer(_1f);
var _23=this._getDialogDefinition(_1f);
var _24=parseInt(_23["Height"]);
if(!Telerik.Web.Browser.isIE7){
_24+=50;
}
_22.set_height(_24+"px");
_22.set_width(_23["Width"]);
_22.set_behaviors(_23["Behaviors"]);
_22.set_modal(_23["Modal"]);
_22.set_visibleStatusbar(_23["VisibleStatusbar"]);
_22.set_visibleTitlebar(_23["VisibleTitlebar"]);
this._applyParameters(_1f,_22);
var _25=new Telerik.Web.UI.DialogOpenEventArgs(_1f,_20);
this.raise_open(_25);
_22.ClientParameters=_25.get_parameters();
var _26=_23.ClientCallbackFunction;
if(_21){
_26=_21;
}
if(_26){
_22.set_clientCallBackFunction(_26);
}
_22.show();
_22.center();
window.setTimeout(function(){
_22.setActive(true);
},100);
_22._iframe.focus();
},_getDialogContainer:function(_27){
if(typeof (this._dialogContainers[_27])=="undefined"){
this._dialogContainers[_27]=this.get_container().clone(this.get_id()+_27);
}
return this._dialogContainers[_27];
},_applyParameters:function(_28,_29){
var _2a=this._getDialogParameters(_28);
if(_2a){
}else{
return;
}
var _2b="&dp="+encodeURIComponent(this._getDialogParameters(_28));
var _2c=this._getBaseDialogUrl(_28);
var _2d=_2c.length+_2b.length;
var _2e=this._dialogParametersProviderTypeName=="";
var _2f=_2e&&_2d<=this._dialogUrlLengthLimit;
if(_2f){
_29.setUrl(_2c+_2b);
}else{
_29.setUrl(_2c);
_29.DialogParameters=this._getDialogParameters(_28);
}
},_getBaseDialogUrl:function(_30){
var _31=this._handlerUrl.indexOf("?")<0?"?":"&";
return this.get_handlerUrl()+_31+"DialogName="+_30+"&Skin="+this.get_skin()+"&Title="+this._getDialogDefinition(_30)["Title"]+"&doid="+this._dialogUniqueID+"&dpptn="+encodeURIComponent(this._dialogParametersProviderTypeName)+this.get_additionalQueryString();
},_getDialogDefinition:function(_32){
var _33=this.get_dialogDefinitions()[_32];
if(_33){
return _33;
}else{
throw Error.argumentNull("dialogName",String.format("Dialog Parameters for the {0} dialog do not exist",_32));
}
},_getDialogParameters:function(_34){
return this._getDialogDefinition(_34)["SerializedParameters"];
}};
$telerikCommon.makeCompatible(Telerik.Web.UI.DialogOpener);
Telerik.Web.UI.DialogOpener.registerClass("Telerik.Web.UI.DialogOpener",Telerik.Web.UI.RadWebControl);


if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();