﻿Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.ConfirmButtonBehavior = function(element) {
AjaxControlToolkit.ConfirmButtonBehavior.initializeBase(this, [element]);this._ConfirmTextValue = null;this._clickHandler = null;}
AjaxControlToolkit.ConfirmButtonBehavior.prototype = {
initialize : function() {
AjaxControlToolkit.ConfirmButtonBehavior.callBaseMethod(this, 'initialize');this._clickHandler = Function.createDelegate(this, this._onClick);$addHandler(this.get_element(), "click", this._clickHandler);},
dispose : function() {
if (this._clickHandler) {
$removeHandler(this.get_element(), "click", this._clickHandler);this._clickHandler = null;}
AjaxControlToolkit.ConfirmButtonBehavior.callBaseMethod(this, 'dispose');},
_onClick : function(e) {
if (this.get_element() && !this.get_element().disabled) {
if (!window.confirm(this._ConfirmTextValue)) {
e.preventDefault();return false;} 
}
},
get_ConfirmText : function() {
return this._ConfirmTextValue;},
set_ConfirmText : function(value) {
if (this._ConfirmTextValue != value) {
this._ConfirmTextValue = value;this.raisePropertyChanged('ConfirmText');}
}
}
AjaxControlToolkit.ConfirmButtonBehavior.registerClass('AjaxControlToolkit.ConfirmButtonBehavior', AjaxControlToolkit.BehaviorBase);
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();