(function(){var b="ExtendedMutuallyExclusiveCheckBox";function a(){var a="checked";Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior=function(b){var a=this;Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.initializeBase(a,[b]);a._key="";a._clickHandler=Function.createDelegate(a,a._onclick)};Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.prototype={initialize:function(){Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.callBaseMethod(this,"initialize");$addHandler(this.get_element(),"click",this._clickHandler)},dispose:function(){var a=this;if(a._key){var b=Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys,c=b[a._key];Array.remove(c,a);a._key=null}if(a._clickHandler){$removeHandler(a.get_element(),"click",a._clickHandler);a._clickHandler=null}Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.callBaseMethod(a,"dispose")},get_Key:function(){return this._key},set_Key:function(c){var a=this,d=Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys;if(c!=a._key){if(a._key){var b=d[a._key];Array.remove(b,a._key)}a._key=c;if(c){var b=d[a._key];if(b==null)b=d[a._key]=[];Array.add(b,a)}}},_onclick:function(){var a=this,b=a.get_element(),c=Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys;if(a._key&&b.checked){var d=c[a._key],e=a;Array.forEach(d,function(a){if(a!=e){a.get_element().checked=false;$common.tryFireEvent(a.get_element(),"change")}})}a.raiseChecked(new Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs(b,a._key))},add_checked:function(b){this.get_events().addHandler(a,b)},remove_checked:function(b){this.get_events().removeHandler(a,b)},raiseChecked:function(c){var b=this.get_events().getHandler(a);b&&b(this,c)}};Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.registerClass("Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior",Sys.Extended.UI.BehaviorBase);Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior.Keys={};Sys.registerComponent(Sys.Extended.UI.MutuallyExclusiveCheckBoxBehavior,{name:"mutuallyExclusiveCheckBox",parameters:["Key"]});Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs=function(a,b){Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs.initializeBase(this);this._key=b;this._checkbox=a};Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs.prototype={get_checkbox:function(){return this._checkbox},get_key:function(){return this._key}};Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs.registerClass("Sys.Extended.UI.MutuallyExclusiveCheckBoxEventArgs",Sys.EventArgs)}if(window.Sys&&Sys.loader)Sys.loader.registerScript(b,["ExtendedBase","ExtendedCommon"],a);else a()})();