/*
	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.mobile.app._base"],["require","dijit._base"],["require","dijit._WidgetBase"],["require","dojox.mobile"],["require","dojox.mobile.parser"],["require","dojox.mobile.app._event"],["require","dojox.mobile.app._Widget"],["require","dojox.mobile.app.StageController"],["require","dojox.mobile.app.SceneController"],["require","dojox.mobile.app.SceneAssistant"],["require","dojox.mobile.app.AlertDialog"],["require","dojox.mobile.app.List"],["require","dojox.mobile.app.ListSelector"],["require","dojox.mobile.app.TextBox"],["require","dojox.mobile.app.ImageView"],["require","dojox.mobile.app.ImageThumbView"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.mobile.app._base"]){_4._hasResource["dojox.mobile.app._base"]=true;_4.provide("dojox.mobile.app._base");_4.experimental("dojox.mobile.app._base");_4.require("dijit._base");_4.require("dijit._WidgetBase");_4.require("dojox.mobile");_4.require("dojox.mobile.parser");_4.require("dojox.mobile.app._event");_4.require("dojox.mobile.app._Widget");_4.require("dojox.mobile.app.StageController");_4.require("dojox.mobile.app.SceneController");_4.require("dojox.mobile.app.SceneAssistant");_4.require("dojox.mobile.app.AlertDialog");_4.require("dojox.mobile.app.List");_4.require("dojox.mobile.app.ListSelector");_4.require("dojox.mobile.app.TextBox");_4.require("dojox.mobile.app.ImageView");_4.require("dojox.mobile.app.ImageThumbView");(function(){var _7;var _8;var _9=["dojox.mobile","dojox.mobile.parser"];var _a={};var _b;var _c;var _d=[];function _e(_f,_10){var _11;var url;do{_11=_f.pop();if(_11.source){url=_11.source;}else{if(_11.module){url=_4.baseUrl+_4._getModuleSymbols(_11.module).join("/")+".js";}else{alert("Error: invalid JavaScript resource "+_4.toJson(_11));return;}}}while(_f.length>0&&_a[url]);if(_f.length<1&&_a[url]){_10();return;}_4.xhrGet({url:url,sync:false}).addCallbacks(function(_12){_4["eval"](_12);_a[url]=true;if(_f.length>0){_e(_f,_10);}else{_10();}},function(){alert("Failed to load resource "+url);});};var _13=function(){_7=new _6.mobile.app.StageController(_c);var _14={id:"com.test.app",version:"1.0.0",initialScene:"main"};if(_4.global["appInfo"]){_4.mixin(_14,_4.global["appInfo"]);}_8=_6.mobile.app.info=_14;if(_8.title){var _15=_4.query("head title")[0]||_4.create("title",{},_4.query("head")[0]);document.title=_8.title;}_7.pushScene(_8.initialScene);};var _16=function(){var _17=false;if(_4.global.BackButton){BackButton.override();_4.connect(document,"backKeyDown",function(e){_4.publish("/dojox/mobile/app/goback");});_17=true;}else{if(_4.global.Mojo){}}if(_17){_4.addClass(_4.body(),"mblNativeBack");}};_4.mixin(_6.mobile.app,{init:function(_18){_c=_18||_4.body();_6.mobile.app.STAGE_CONTROLLER_ACTIVE=true;_4.subscribe("/dojox/mobile/app/goback",function(){_7.popScene();});_4.subscribe("/dojox/mobile/app/alert",function(_19){_6.mobile.app.getActiveSceneController().showAlertDialog(_19);});_4.subscribe("/dojox/mobile/app/pushScene",function(_1a,_1b){_7.pushScene(_1a,_1b||{});});_4.xhrGet({url:"view-resources.json",load:function(_1c){var _1d=[];if(_1c){_d=_1c=_4.fromJson(_1c);for(var i=0;i<_1c.length;i++){if(!_1c[i].scene){_1d.push(_1c[i]);}}}if(_1d.length>0){_e(_1d,_13);}else{_13();}},error:_13});_16();},getActiveSceneController:function(){return _7.getActiveSceneController();},getStageController:function(){return _7;},loadResources:function(_1e,_1f){_e(_1e,_1f);},loadResourcesForScene:function(_20,_21){var _22=[];for(var i=0;i<_d.length;i++){if(_d[i].scene==_20){_22.push(_d[i]);}}if(_22.length>0){_e(_22,_21);}else{_21();}},resolveTemplate:function(_23){return "app/views/"+_23+"/"+_23+"-scene.html";},resolveAssistant:function(_24){return "app/assistants/"+_24+"-assistant.js";}});})();}}};});