 ASPxClientCheckBox=_aspxCreateClass(ASPxClientEdit,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.stateInput=null;this.valueChecked=true;this.valueUnchecked=false;this.CheckedChanged=new ASPxClientEvent();},Initialize:function(){ASPxClientEdit.prototype.Initialize.call(this);this.previousChecked=this.GetInputElement().checked;},FindInputElement:function(){var element=this.GetMainElement();if(_aspxIsExistsElement(element)&&element.tagName.toUpperCase()!="INPUT")element=this.GetChild("_I");return element;},GetStateInput:function(){if(!_aspxIsExistsElement(this.stateInput))this.stateInput=this.GetChild("_S");return this.stateInput;},RaiseValueChangedEvent:function(){var processOnServer=ASPxClientEdit.prototype.RaiseValueChangedEvent.call(this);processOnServer=this.RaiseCheckedChanged(processOnServer);return processOnServer;},OnClick:function(){var value=this.previousChecked?this.valueUnchecked:this.valueChecked;this.SetValue(value);this.OnValueChanged();},GetValue:function(){var value;switch(this.GetStateInput().value){case "N":return null;case "C":value=this.valueChecked;break;case "U":value=this.valueUnchecked;break;}if(value===""&&this.convertEmptyStringToNull)value=null;return value;},SetValue:function(value){var stateInput=this.GetStateInput();if(value==null)stateInput.value="N";else stateInput.value=value==this.valueChecked?"C":"U";this.GetInputElement().checked=this.previousChecked=value==this.valueChecked;},RaiseCheckedChanged:function(processOnServer){if(!this.CheckedChanged.IsEmpty()){var args=new ASPxClientProcessingModeEventArgs(processOnServer);this.CheckedChanged.FireEvent(this,args);processOnServer=args.processOnServer;}return processOnServer;},GetChecked:function(){return this.GetValue()==this.valueChecked;},SetChecked:function(isChecked){this.SetValue(isChecked?this.valueChecked:this.valueUnchecked);},ChangeEnabledAttributes:function(enabled){this.ChangeInputEnabledAttributes(this.GetInputElement(),_aspxChangeAttributesMethod(enabled));this.GetInputElement().disabled=!enabled;},ChangeEnabledStateItems:function(enabled){aspxGetStateController().SetElementEnabled(this.GetMainElement(),enabled);},ChangeInputEnabledAttributes:function(element,method){method(element,"onclick");}});ASPxClientRadioButton=_aspxCreateClass(ASPxClientCheckBox,{constructor:function(name){this.constructor.prototype.constructor.call(this,name);this.isASPxClientRadioButton=true;},OnClick:function(){if(!this.previousChecked){var members=this.GetGroupMembers();for(var i=0;i<members.length;i++){var radioButton=members[i];if(radioButton!=this&&radioButton.GetValue()){radioButton.SetValue(false);radioButton.RaiseValueChangedEvent();}}
ASPxClientCheckBox.prototype.OnClick.call(this);}},OnReadonlyClick:function(){if(!this.previousChecked){var members=this.GetGroupMembers();for(var i=0;i<members.length;i++){var radioButton=members[i];radioButton.SetValue(radioButton.GetValue());}}},GetGroupName:function(){var inputElement=this.GetInputElement();if(!_aspxIsExistsElement(inputElement))return null;var name=inputElement.name;if(!name.length)name="";return name;},GetGroupMembers:function(){var result=[];var groupName=this.GetGroupName();if(groupName.length>0){var collection=aspxGetControlCollection();var control;for(var i in collection.elements){control=collection.elements[i];if(ASPxIdent.IsASPxClientRadioButton(control)){var controlGroupName=control.GetGroupName();if(controlGroupName!=null&&controlGroupName==groupName)result.push(control);}}}else{result.push(this);}return result;},GetChecked:function(){return this.GetValue()==true;},SetChecked:function(isChecked){this.SetValue(isChecked);}});ASPxIdent.IsASPxClientRadioButton=function(obj){return _aspxIsExists(obj.isASPxClientRadioButton)&&obj.isASPxClientRadioButton;};function aspxChkOnClick(name){var edit=aspxGetControlCollection().Get(name);if(_aspxIsExists(edit))edit.OnClick();}
function aspxERBOnReadonlyClick(name){var rb=aspxGetControlCollection().Get(name);if(_aspxIsExists(rb))rb.OnReadonlyClick();}