﻿Type.registerNamespace("Telerik.Web.UI");
Telerik.Web.UI.RadXmlHttpPanel=function(b){Telerik.Web.UI.RadXmlHttpPanel.initializeBase(this,[b]);
this._uniqueId="";
this._isCallbackPanel=false;
this._loadingPanelID=""
};
Telerik.Web.UI.RadXmlHttpPanel.prototype={initialize:function(){Telerik.Web.UI.RadXmlHttpPanel.callBaseMethod(this,"initialize");
this._loaded=true;
if(!this._isCallbackPanel){this.set_value(this.get_value())
}},get_webMethodName:function(){return this._webMethodName
},set_webMethodName:function(b){this._webMethodName=b
},get_webMethodPath:function(){return this._webMethodPath
},set_webMethodPath:function(b){this._webMethodPath=b
},get_value:function(){return this._value
},set_value:function(b){this._value=b;
if(!this._loaded){return
}window.setTimeout(Function.createDelegate(this,function(){this._showLoadingPanel();
if(this._isCallbackPanel){this._execCallback()
}else{var a=this._getWebServiceLoader();
a.loadData({context:this._getWebServiceArgument()})
}}),10)
},reload:function(){this.set_value(this.get_value())
},set_html:function(d){this._hideLoadingPanel();
var e={};
e._content=d;
e.get_content=function(){return this._content
};
e.set_content=function(a){this._content=a
};
this.raiseEvent("responseEnd",e);
d=e.get_content();
if(null==d){d=""
}var f=this.get_element();
f.innerHTML=d
},_hideLoadingPanel:function(){var b=this._getLoadingPanel();
if(b&&b.hide){b.hide(this.get_element().id)
}},_showLoadingPanel:function(){var b=this._getLoadingPanel();
if(b&&b.show){b.show(this.get_element().id)
}},_getLoadingPanel:function(){return $find(this.get_loadingPanelID())
},_getWebServiceArgument:function(){var b={Value:this._value};
return b
},_getCallbackArgument:function(){var b=String.format("{{ Value : '{0}'}}",this.get_value());
return b
},_onCallbackResponse:function(d,c){this.set_html(d)
},_onCallbackError:function(d,c){this._hideLoadingPanel();
alert("XmlHttpPanel Callback Loading error:\n Exception="+d)
},_execCallback:function(){var e=Function.createDelegate(this,this._onCallbackResponse);
var f=Function.createDelegate(this,this._onCallbackError);
var d=this._getCallbackArgument();
WebForm_DoCallback(this._uniqueId,d,e,"SOME_CONTEXT",f,true)
},_getWebServiceLoader:function(){if(!this._webServiceLoader){var b=new Telerik.Web.UI.WebServiceSettings({path:this.get_webMethodPath(),method:this.get_webMethodName()});
this._webServiceLoader=new Telerik.Web.UI.WebServiceLoader(b);
this._webServiceLoader.add_loadingError(function(a,d){alert(d.get_message())
});
this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onWebServiceResponse))
}return this._webServiceLoader
},_onWebServiceResponse:function(d,e){var f=e.get_data();
this.set_html(f)
},add_responseEnd:function(b){this.get_events().addHandler("responseEnd",b)
},remove_responseEnd:function(b){this.get_events().removeHandler("responseEnd",b)
},get_loadingPanelID:function(){return this._loadingPanelID
},set_loadingPanelID:function(b){if(this._loadingPanelID!=b){this._loadingPanelID=b
}}};
Telerik.Web.UI.RadXmlHttpPanel.registerClass("Telerik.Web.UI.RadXmlHttpPanel",Telerik.Web.UI.RadWebControl);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();