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);if(_aspxIsExists(this.RaiseCheckedChanged))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;}});ASPxClientRadioButton=_aspxCreateClass(ASPxClientCheckBox,{OnClick:function(){if(!this.previousChecked){var members=this.GetGroupMembers();for(var i in members)members[i].SetValue(false);ASPxClientCheckBox.prototype.OnClick.call(this);}},OnReadonlyClick:function(){if(!this.previousChecked){var members=this.GetGroupMembers();for(var i in members)members[i].SetValue(members[i].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(ASPxClientRadioButton.prototype.isPrototypeOf(control)){var controlGroupName=control.GetGroupName();if(controlGroupName!=null&&controlGroupName==groupName)result.push(control);}}}else{result.push(this);}return result;}});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();}