/*
	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","dojox.widget.PlaceholderMenuItem"],["require","dijit.Menu"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.widget.PlaceholderMenuItem"]){_4._hasResource["dojox.widget.PlaceholderMenuItem"]=true;_4.provide("dojox.widget.PlaceholderMenuItem");_4.experimental("dojox.widget.PlaceholderMenuItem");_4.require("dijit.Menu");_4.declare("dojox.widget.PlaceholderMenuItem",_5.MenuItem,{_replaced:false,_replacedWith:null,_isPlaceholder:true,postCreate:function(){this.domNode.style.display="none";this._replacedWith=[];if(!this.label){this.label=this.containerNode.innerHTML;}this.inherited(arguments);},replace:function(_7){if(this._replaced){return false;}var _8=this.getIndexInParent();if(_8<0){return false;}var p=this.getParent();_4.forEach(_7,function(_9){p.addChild(_9,_8++);});this._replacedWith=_7;this._replaced=true;return true;},unReplace:function(_a){if(!this._replaced){return [];}var p=this.getParent();if(!p){return [];}var r=this._replacedWith;_4.forEach(this._replacedWith,function(_b){p.removeChild(_b);if(_a){_b.destroyRecursive();}});this._replacedWith=[];this._replaced=false;return r;}});_4.extend(_5.Menu,{getPlaceholders:function(_c){var r=[];var _d=this.getChildren();_4.forEach(_d,function(_e){if(_e._isPlaceholder&&(!_c||_e.label==_c)){r.push(_e);}else{if(_e._started&&_e.popup&&_e.popup.getPlaceholders){r=r.concat(_e.popup.getPlaceholders(_c));}else{if(!_e._started&&_e.dropDownContainer){var _f=_4.query("[widgetId]",_e.dropDownContainer)[0];var _10=_5.byNode(_f);if(_10.getPlaceholders){r=r.concat(_10.getPlaceholders(_c));}}}}},this);return r;}});}}};});