/*
	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","dojo._base.connect"],["require","dojo._base.lang"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojo._base.connect"]){_4._hasResource["dojo._base.connect"]=true;_4.provide("dojo._base.connect");_4.require("dojo._base.lang");_4._listener={getDispatcher:function(){return function(){var ap=Array.prototype,c=arguments.callee,ls=c._listeners,t=c.target,r=t&&t.apply(this,arguments),i,_7=[].concat(ls);for(i in _7){if(!(i in ap)){_7[i].apply(this,arguments);}}return r;};},add:function(_8,_9,_a){_8=_8||_4.global;var f=_8[_9];if(!f||!f._listeners){var d=_4._listener.getDispatcher();d.target=f;d._listeners=[];f=_8[_9]=d;}return f._listeners.push(_a);},remove:function(_b,_c,_d){var f=(_b||_4.global)[_c];if(f&&f._listeners&&_d--){delete f._listeners[_d];}}};_4.connect=function(_e,_f,_10,_11,_12){var a=arguments,_13=[],i=0;_13.push(_4.isString(a[0])?null:a[i++],a[i++]);var a1=a[i+1];_13.push(_4.isString(a1)||_4.isFunction(a1)?a[i++]:null,a[i++]);for(var l=a.length;i<l;i++){_13.push(a[i]);}return _4._connect.apply(this,_13);};_4._connect=function(obj,_14,_15,_16){var l=_4._listener,h=l.add(obj,_14,_4.hitch(_15,_16));return [obj,_14,h,l];};_4.disconnect=function(_17){if(_17&&_17[0]!==undefined){_4._disconnect.apply(this,_17);delete _17[0];}};_4._disconnect=function(obj,_18,_19,_1a){_1a.remove(obj,_18,_19);};_4._topics={};_4.subscribe=function(_1b,_1c,_1d){return [_1b,_4._listener.add(_4._topics,_1b,_4.hitch(_1c,_1d))];};_4.unsubscribe=function(_1e){if(_1e){_4._listener.remove(_4._topics,_1e[0],_1e[1]);}};_4.publish=function(_1f,_20){var f=_4._topics[_1f];if(f){f.apply(this,_20||[]);}};_4.connectPublisher=function(_21,obj,_22){var pf=function(){_4.publish(_21,arguments);};return _22?_4.connect(obj,_22,pf):_4.connect(obj,pf);};}}};});