/*
	Copyright (c) 2004-2007, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/book/dojo-book-0-9/introduction/licensing
*/


dojo._xdResourceLoaded({depends:[["provide","dijit.form.CheckBox"],["require","dijit.form.Button"]],defineResource:function(_1){if(!_1._hasResource["dijit.form.CheckBox"]){_1._hasResource["dijit.form.CheckBox"]=true;_1.provide("dijit.form.CheckBox");_1.require("dijit.form.Button");_1.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:"<fieldset class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \ttype=\"${type}\" name=\"${name}\"\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"inputNode,focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></fieldset>\n",baseClass:"dijitCheckBox",type:"checkbox",value:"on",postCreate:function(){_1.setSelectable(this.inputNode,false);this.setChecked(this.checked);this.inherited(arguments);},setChecked:function(_2){if(_1.isIE){if(_2){this.inputNode.setAttribute("checked","checked");}else{this.inputNode.removeAttribute("checked");}}else{this.inputNode.checked=_2;}this.inherited(arguments);},setValue:function(_3){if(_3==null){_3="";}this.inputNode.value=_3;dijit.form.CheckBox.superclass.setValue.call(this,_3);}});_1.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_groups:{},postCreate:function(){(this._groups[this.name]=this._groups[this.name]||[]).push(this);this.inherited(arguments);},uninitialize:function(){_1.forEach(this._groups[this.name],function(_4,i,_6){if(_4===this){_6.splice(i,1);return;}},this);},setChecked:function(_7){if(_7){_1.forEach(this._groups[this.name],function(_8){if(_8!=this&&_8.checked){_8.setChecked(false);}},this);}this.inherited(arguments);},_clicked:function(e){if(!this.checked){this.setChecked(true);}}});}}});