/*
	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 {defineResource:function(_4,_5,_6){if(!window["OpenAjax"]){OpenAjax=new function(){var t=true;var f=false;var g=window;var _7;var _8="org.openajax.hub.";var h={};this.hub=h;h.implementer="http://openajax.org";h.implVersion="0.6";h.specVersion="0.6";h.implExtraData={};var _7={};h.libraries=_7;h.registerLibrary=function(_9,_a,_b,_c){_7[_9]={prefix:_9,namespaceURI:_a,version:_b,extraData:_c};this.publish(_8+"registerLibrary",_7[_9]);};h.unregisterLibrary=function(_d){this.publish(_8+"unregisterLibrary",_7[_d]);delete _7[_d];};h._subscriptions={c:{},s:[]};h._cleanup=[];h._subIndex=0;h._pubDepth=0;h.subscribe=function(_e,_f,_10,_11,_12){if(!_10){_10=window;}var _13=_e+"."+this._subIndex;var sub={scope:_10,cb:_f,fcb:_12,data:_11,sid:this._subIndex++,hdl:_13};var _14=_e.split(".");this._subscribe(this._subscriptions,_14,0,sub);return _13;};h.publish=function(_15,_16){var _17=_15.split(".");this._pubDepth++;this._publish(this._subscriptions,_17,0,_15,_16);this._pubDepth--;if((this._cleanup.length>0)&&(this._pubDepth==0)){for(var i=0;i<this._cleanup.length;i++){this.unsubscribe(this._cleanup[i].hdl);}delete (this._cleanup);this._cleanup=[];}};h.unsubscribe=function(sub){var _18=sub.split(".");var sid=_18.pop();this._unsubscribe(this._subscriptions,_18,0,sid);};h._subscribe=function(_19,_1a,_1b,sub){var _1c=_1a[_1b];if(_1b==_1a.length){_19.s.push(sub);}else{if(typeof _19.c=="undefined"){_19.c={};}if(typeof _19.c[_1c]=="undefined"){_19.c[_1c]={c:{},s:[]};this._subscribe(_19.c[_1c],_1a,_1b+1,sub);}else{this._subscribe(_19.c[_1c],_1a,_1b+1,sub);}}};h._publish=function(_1d,_1e,_1f,_20,msg){if(typeof _1d!="undefined"){var _21;if(_1f==_1e.length){_21=_1d;}else{this._publish(_1d.c[_1e[_1f]],_1e,_1f+1,_20,msg);this._publish(_1d.c["*"],_1e,_1f+1,_20,msg);_21=_1d.c["**"];}if(typeof _21!="undefined"){var _22=_21.s;var max=_22.length;for(var i=0;i<max;i++){if(_22[i].cb){var sc=_22[i].scope;var cb=_22[i].cb;var fcb=_22[i].fcb;var d=_22[i].data;if(typeof cb=="string"){cb=sc[cb];}if(typeof fcb=="string"){fcb=sc[fcb];}if((!fcb)||(fcb.call(sc,_20,msg,d))){cb.call(sc,_20,msg,d);}}}}}};h._unsubscribe=function(_23,_24,_25,sid){if(typeof _23!="undefined"){if(_25<_24.length){var _26=_23.c[_24[_25]];this._unsubscribe(_26,_24,_25+1,sid);if(_26.s.length==0){for(var x in _26.c){return;}delete _23.c[_24[_25]];}return;}else{var _27=_23.s;var max=_27.length;for(var i=0;i<max;i++){if(sid==_27[i].sid){if(this._pubDepth>0){_27[i].cb=null;this._cleanup.push(_27[i]);}else{_27.splice(i,1);}return;}}}}};h.reinit=function(){for(var lib in OpenAjax.hub.libraries){delete OpenAjax.hub.libraries[lib];}OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","0.6",{});delete OpenAjax._subscriptions;OpenAjax._subscriptions={c:{},s:[]};delete OpenAjax._cleanup;OpenAjax._cleanup=[];OpenAjax._subIndex=0;OpenAjax._pubDepth=0;};};OpenAjax.hub.registerLibrary("OpenAjax","http://openajax.org/hub","0.6",{});}}};});