/*
	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.dtl.contrib.dijit"],["require","dojox.dtl.dom"],["require","dojo.parser"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.dtl.contrib.dijit"]){_4._hasResource["dojox.dtl.contrib.dijit"]=true;_4.provide("dojox.dtl.contrib.dijit");_4.require("dojox.dtl.dom");_4.require("dojo.parser");(function(){var dd=_6.dtl;var _7=dd.contrib.dijit;_7.AttachNode=_4.extend(function(_8,_9){this._keys=_8;this._object=_9;},{render:function(_a,_b){if(!this._rendered){this._rendered=true;for(var i=0,_c;_c=this._keys[i];i++){_a.getThis()[_c]=this._object||_b.getParent();}}return _b;},unrender:function(_d,_e){if(this._rendered){this._rendered=false;for(var i=0,_f;_f=this._keys[i];i++){if(_d.getThis()[_f]===(this._object||_e.getParent())){delete _d.getThis()[_f];}}}return _e;},clone:function(_10){return new this.constructor(this._keys,this._object);}});_7.EventNode=_4.extend(function(_11,obj){this._command=_11;var _12,_13=_11.split(/\s*,\s*/);var _14=_4.trim;var _15=[];var fns=[];while(_12=_13.pop()){if(_12){var fn=null;if(_12.indexOf(":")!=-1){var _16=_12.split(":");_12=_14(_16[0]);fn=_14(_16.slice(1).join(":"));}else{_12=_14(_12);}if(!fn){fn=_12;}_15.push(_12);fns.push(fn);}}this._types=_15;this._fns=fns;this._object=obj;this._rendered=[];},{_clear:false,render:function(_17,_18){for(var i=0,_19;_19=this._types[i];i++){if(!this._clear&&!this._object){_18.getParent()[_19]=null;}var fn=this._fns[i];var _1a;if(fn.indexOf(" ")!=-1){if(this._rendered[i]){_4.disconnect(this._rendered[i]);this._rendered[i]=false;}_1a=_4.map(fn.split(" ").slice(1),function(_1b){return new dd._Filter(_1b).resolve(_17);});fn=fn.split(" ",2)[0];}if(!this._rendered[i]){if(!this._object){this._rendered[i]=_18.addEvent(_17,_19,fn,_1a);}else{this._rendered[i]=_4.connect(this._object,_19,_17.getThis(),fn);}}}this._clear=true;return _18;},unrender:function(_1c,_1d){while(this._rendered.length){_4.disconnect(this._rendered.pop());}return _1d;},clone:function(){return new this.constructor(this._command,this._object);}});function _1e(n1){var n2=n1.cloneNode(true);if(_4.isIE){_4.query("script",n2).forEach("item.text = this[index].text;",_4.query("script",n1));}return n2;};_7.DojoTypeNode=_4.extend(function(_1f,_20){this._node=_1f;this._parsed=_20;var _21=_1f.getAttribute("dojoAttachEvent");if(_21){this._events=new _7.EventNode(_4.trim(_21));}var _22=_1f.getAttribute("dojoAttachPoint");if(_22){this._attach=new _7.AttachNode(_4.trim(_22).split(/\s*,\s*/));}if(!_20){this._dijit=_4.parser.instantiate([_1e(_1f)])[0];}else{_1f=_1e(_1f);var old=_7.widgetsInTemplate;_7.widgetsInTemplate=false;this._template=new dd.DomTemplate(_1f);_7.widgetsInTemplate=old;}},{render:function(_23,_24){if(this._parsed){var _25=new dd.DomBuffer();this._template.render(_23,_25);var _26=_1e(_25.getRootNode());var div=document.createElement("div");div.appendChild(_26);var _27=div.innerHTML;div.removeChild(_26);if(_27!=this._rendered){this._rendered=_27;if(this._dijit){this._dijit.destroyRecursive();}this._dijit=_4.parser.instantiate([_26])[0];}}var _28=this._dijit.domNode;if(this._events){this._events._object=this._dijit;this._events.render(_23,_24);}if(this._attach){this._attach._object=this._dijit;this._attach.render(_23,_24);}return _24.concat(_28);},unrender:function(_29,_2a){return _2a.remove(this._dijit.domNode);},clone:function(){return new this.constructor(this._node,this._parsed);}});_4.mixin(_7,{widgetsInTemplate:true,dojoAttachPoint:function(_2b,_2c){return new _7.AttachNode(_2c.contents.slice(16).split(/\s*,\s*/));},dojoAttachEvent:function(_2d,_2e){return new _7.EventNode(_2e.contents.slice(16));},dojoType:function(_2f,_30){var _31=false;if(_30.contents.slice(-7)==" parsed"){_31=true;}var _32=_30.contents.slice(9);var _33=_31?_32.slice(0,-7):_32.toString();if(_7.widgetsInTemplate){var _34=_2f.swallowNode();_34.setAttribute("dojoType",_33);return new _7.DojoTypeNode(_34,_31);}return new dd.AttributeNode("dojoType",_33);},on:function(_35,_36){var _37=_36.contents.split();return new _7.EventNode(_37[0]+":"+_37.slice(1).join(" "));}});dd.register.tags("dojox.dtl.contrib",{"dijit":["attr:dojoType","attr:dojoAttachPoint",["attr:attach","dojoAttachPoint"],"attr:dojoAttachEvent",[/(attr:)?on(click|key(up))/i,"on"]]});})();}}};});