/*
	Copyright (c) 2004-2011, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/


window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dijit.form._FormMixin"],["require","dojo.window"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit.form._FormMixin"]){_4._hasResource["dijit.form._FormMixin"]=true;_4.provide("dijit.form._FormMixin");_4.require("dojo.window");_4.declare("dijit.form._FormMixin",null,{state:"",reset:function(){_4.forEach(this.getDescendants(),function(_7){if(_7.reset){_7.reset();}});},validate:function(){var _8=false;return _4.every(_4.map(this.getDescendants(),function(_9){_9._hasBeenBlurred=true;var _a=_9.disabled||!_9.validate||_9.validate();if(!_a&&!_8){_4.window.scrollIntoView(_9.containerNode||_9.domNode);_9.focus();_8=true;}return _a;}),function(_b){return _b;});},setValues:function(_c){_4.deprecated(this.declaredClass+"::setValues() is deprecated. Use set('value', val) instead.","","2.0");return this.set("value",_c);},_setValueAttr:function(_d){var _e={};_4.forEach(this.getDescendants(),function(_f){if(!_f.name){return;}var _10=_e[_f.name]||(_e[_f.name]=[]);_10.push(_f);});for(var _11 in _e){if(!_e.hasOwnProperty(_11)){continue;}var _12=_e[_11],_13=_4.getObject(_11,false,_d);if(_13===undefined){continue;}if(!_4.isArray(_13)){_13=[_13];}if(typeof _12[0].checked=="boolean"){_4.forEach(_12,function(w,i){w.set("value",_4.indexOf(_13,w.value)!=-1);});}else{if(_12[0].multiple){_12[0].set("value",_13);}else{_4.forEach(_12,function(w,i){w.set("value",_13[i]);});}}}},getValues:function(){_4.deprecated(this.declaredClass+"::getValues() is deprecated. Use get('value') instead.","","2.0");return this.get("value");},_getValueAttr:function(){var obj={};_4.forEach(this.getDescendants(),function(_14){var _15=_14.name;if(!_15||_14.disabled){return;}var _16=_14.get("value");if(typeof _14.checked=="boolean"){if(/Radio/.test(_14.declaredClass)){if(_16!==false){_4.setObject(_15,_16,obj);}else{_16=_4.getObject(_15,false,obj);if(_16===undefined){_4.setObject(_15,null,obj);}}}else{var ary=_4.getObject(_15,false,obj);if(!ary){ary=[];_4.setObject(_15,ary,obj);}if(_16!==false){ary.push(_16);}}}else{var _17=_4.getObject(_15,false,obj);if(typeof _17!="undefined"){if(_4.isArray(_17)){_17.push(_16);}else{_4.setObject(_15,[_17,_16],obj);}}else{_4.setObject(_15,_16,obj);}}});return obj;},isValid:function(){return this.state=="";},onValidStateChange:function(_18){},_getState:function(){var _19=_4.map(this._descendants,function(w){return w.get("state")||"";});return _4.indexOf(_19,"Error")>=0?"Error":_4.indexOf(_19,"Incomplete")>=0?"Incomplete":"";},disconnectChildren:function(){_4.forEach(this._childConnections||[],_4.hitch(this,"disconnect"));_4.forEach(this._childWatches||[],function(w){w.unwatch();});},connectChildren:function(_1a){var _1b=this;this.disconnectChildren();this._descendants=this.getDescendants();var set=_1a?function(_1c,val){_1b[_1c]=val;}:_4.hitch(this,"_set");set("value",this.get("value"));set("state",this._getState());var _1d=(this._childConnections=[]),_1e=(this._childWatches=[]);_4.forEach(_4.filter(this._descendants,function(_1f){return _1f.validate;}),function(_20){_4.forEach(["state","disabled"],function(_21){_1e.push(_20.watch(_21,function(_22,_23,_24){_1b.set("state",_1b._getState());}));});});var _25=function(){if(_1b._onChangeDelayTimer){clearTimeout(_1b._onChangeDelayTimer);}_1b._onChangeDelayTimer=setTimeout(function(){delete _1b._onChangeDelayTimer;_1b._set("value",_1b.get("value"));},10);};_4.forEach(_4.filter(this._descendants,function(_26){return _26.onChange;}),function(_27){_1d.push(_1b.connect(_27,"onChange",_25));_1e.push(_27.watch("disabled",_25));});},startup:function(){this.inherited(arguments);this.connectChildren(true);this.watch("state",function(_28,_29,_2a){this.onValidStateChange(_2a=="");});},destroy:function(){this.disconnectChildren();this.inherited(arguments);}});}}};});