/*
	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
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

window[esri._dojoScopeName||"dojo"]._xdResourceLoaded(function(_1,_2,_3){return {depends:[["provide","dijit._base.manager"],["provide","dojo.Stateful"],["provide","dijit._WidgetBase"],["provide","dojox.mobile._base"],["provide","dojox.mobile"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit._base.manager"]){_4._hasResource["dijit._base.manager"]=true;_4.provide("dijit._base.manager");_4.declare("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0;},add:function(_7){if(this._hash[_7.id]){throw new Error("Tried to register widget with id=="+_7.id+" but that id is already registered");}this._hash[_7.id]=_7;this.length++;},remove:function(id){if(this._hash[id]){delete this._hash[id];this.length--;}},forEach:function(_8,_9){_9=_9||_4.global;var i=0,id;for(id in this._hash){_8.call(_9,this._hash[id],i++,this._hash);}return this;},filter:function(_a,_b){_b=_b||_4.global;var _c=new _5.WidgetSet(),i=0,id;for(id in this._hash){var w=this._hash[id];if(_a.call(_b,w,i++,this._hash)){_c.add(w);}}return _c;},byId:function(id){return this._hash[id];},byClass:function(_d){var _e=new _5.WidgetSet(),id,_f;for(id in this._hash){_f=this._hash[id];if(_f.declaredClass==_d){_e.add(_f);}}return _e;},toArray:function(){var ar=[];for(var id in this._hash){ar.push(this._hash[id]);}return ar;},map:function(_10,_11){return _4.map(this.toArray(),_10,_11);},every:function(_12,_13){_13=_13||_4.global;var x=0,i;for(i in this._hash){if(!_12.call(_13,this._hash[i],x++,this._hash)){return false;}}return true;},some:function(_14,_15){_15=_15||_4.global;var x=0,i;for(i in this._hash){if(_14.call(_15,this._hash[i],x++,this._hash)){return true;}}return false;}});(function(){_5.registry=new _5.WidgetSet();var _16=_5.registry._hash,_17=_4.attr,_18=_4.hasAttr,_19=_4.style;_5.byId=function(id){return typeof id=="string"?_16[id]:id;};var _1a={};_5.getUniqueId=function(_1b){var id;do{id=_1b+"_"+(_1b in _1a?++_1a[_1b]:_1a[_1b]=0);}while(_16[id]);return _5._scopeName=="dijit"?id:_5._scopeName+"_"+id;};_5.findWidgets=function(_1c){var _1d=[];function _1e(_1f){for(var _20=_1f.firstChild;_20;_20=_20.nextSibling){if(_20.nodeType==1){var _21=_20.getAttribute("widgetId");if(_21){var _22=_16[_21];if(_22){_1d.push(_22);}}else{_1e(_20);}}}};_1e(_1c);return _1d;};_5._destroyAll=function(){_5._curFocus=null;_5._prevFocus=null;_5._activeStack=[];_4.forEach(_5.findWidgets(_4.body()),function(_23){if(!_23._destroyed){if(_23.destroyRecursive){_23.destroyRecursive();}else{if(_23.destroy){_23.destroy();}}}});};if(_4.isIE){_4.addOnWindowUnload(function(){_5._destroyAll();});}_5.byNode=function(_24){return _16[_24.getAttribute("widgetId")];};_5.getEnclosingWidget=function(_25){while(_25){var id=_25.getAttribute&&_25.getAttribute("widgetId");if(id){return _16[id];}_25=_25.parentNode;}return null;};var _26=(_5._isElementShown=function(_27){var s=_19(_27);return (s.visibility!="hidden")&&(s.visibility!="collapsed")&&(s.display!="none")&&(_17(_27,"type")!="hidden");});_5.hasDefaultTabStop=function(_28){switch(_28.nodeName.toLowerCase()){case "a":return _18(_28,"href");case "area":case "button":case "input":case "object":case "select":case "textarea":return true;case "iframe":var _29;try{var _2a=_28.contentDocument;if("designMode" in _2a&&_2a.designMode=="on"){return true;}_29=_2a.body;}catch(e1){try{_29=_28.contentWindow.document.body;}catch(e2){return false;}}return _29.contentEditable=="true"||(_29.firstChild&&_29.firstChild.contentEditable=="true");default:return _28.contentEditable=="true";}};var _2b=(_5.isTabNavigable=function(_2c){if(_17(_2c,"disabled")){return false;}else{if(_18(_2c,"tabIndex")){return _17(_2c,"tabIndex")>=0;}else{return _5.hasDefaultTabStop(_2c);}}});_5._getTabNavigable=function(_2d){var _2e,_2f,_30,_31,_32,_33,_34={};function _35(_36){return _36&&_36.tagName.toLowerCase()=="input"&&_36.type&&_36.type.toLowerCase()=="radio"&&_36.name&&_36.name.toLowerCase();};var _37=function(_38){_4.query("> *",_38).forEach(function(_39){if((_4.isIE&&_39.scopeName!=="HTML")||!_26(_39)){return;}if(_2b(_39)){var _3a=_17(_39,"tabIndex");if(!_18(_39,"tabIndex")||_3a==0){if(!_2e){_2e=_39;}_2f=_39;}else{if(_3a>0){if(!_30||_3a<_31){_31=_3a;_30=_39;}if(!_32||_3a>=_33){_33=_3a;_32=_39;}}}var rn=_35(_39);if(_4.attr(_39,"checked")&&rn){_34[rn]=_39;}}if(_39.nodeName.toUpperCase()!="SELECT"){_37(_39);}});};if(_26(_2d)){_37(_2d);}function rs(_3b){return _34[_35(_3b)]||_3b;};return {first:rs(_2e),last:rs(_2f),lowest:rs(_30),highest:rs(_32)};};_5.getFirstInTabbingOrder=function(_3c){var _3d=_5._getTabNavigable(_4.byId(_3c));return _3d.lowest?_3d.lowest:_3d.first;};_5.getLastInTabbingOrder=function(_3e){var _3f=_5._getTabNavigable(_4.byId(_3e));return _3f.last?_3f.last:_3f.highest;};_5.defaultDuration=_4.config["defaultDuration"]||200;})();}if(!_4._hasResource["dojo.Stateful"]){_4._hasResource["dojo.Stateful"]=true;_4.provide("dojo.Stateful");_4.declare("dojo.Stateful",null,{postscript:function(_40){if(_40){_4.mixin(this,_40);}},get:function(_41){return this[_41];},set:function(_42,_43){if(typeof _42==="object"){for(var x in _42){this.set(x,_42[x]);}return this;}var _44=this[_42];this[_42]=_43;if(this._watchCallbacks){this._watchCallbacks(_42,_44,_43);}return this;},watch:function(_45,_46){var _47=this._watchCallbacks;if(!_47){var _48=this;_47=this._watchCallbacks=function(_49,_4a,_4b,_4c){var _4d=function(_4e){if(_4e){_4e=_4e.slice();for(var i=0,l=_4e.length;i<l;i++){try{_4e[i].call(_48,_49,_4a,_4b);}catch(e){console.error(e);}}}};_4d(_47["_"+_49]);if(!_4c){_4d(_47["*"]);}};}if(!_46&&typeof _45==="function"){_46=_45;_45="*";}else{_45="_"+_45;}var _4f=_47[_45];if(typeof _4f!=="object"){_4f=_47[_45]=[];}_4f.push(_46);return {unwatch:function(){_4f.splice(_4.indexOf(_4f,_46),1);}};}});}if(!_4._hasResource["dijit._WidgetBase"]){_4._hasResource["dijit._WidgetBase"]=true;_4.provide("dijit._WidgetBase");(function(){_4.declare("dijit._WidgetBase",_4.Stateful,{id:"",lang:"",dir:"","class":"",style:"",title:"",tooltip:"",baseClass:"",srcNodeRef:null,domNode:null,containerNode:null,attributeMap:{id:"",dir:"",lang:"","class":"",style:"",title:""},_blankGif:(_4.config.blankGif||_4.moduleUrl("dojo","resources/blank.gif")).toString(),postscript:function(_50,_51){this.create(_50,_51);},create:function(_52,_53){this.srcNodeRef=_4.byId(_53);this._connects=[];this._subscribes=[];if(this.srcNodeRef&&(typeof this.srcNodeRef.id=="string")){this.id=this.srcNodeRef.id;}if(_52){this.params=_52;_4._mixin(this,_52);}this.postMixInProperties();if(!this.id){this.id=_5.getUniqueId(this.declaredClass.replace(/\./g,"_"));}_5.registry.add(this);this.buildRendering();if(this.domNode){this._applyAttributes();var _54=this.srcNodeRef;if(_54&&_54.parentNode&&this.domNode!==_54){_54.parentNode.replaceChild(this.domNode,_54);}}if(this.domNode){this.domNode.setAttribute("widgetId",this.id);}this.postCreate();if(this.srcNodeRef&&!this.srcNodeRef.parentNode){delete this.srcNodeRef;}this._created=true;},_applyAttributes:function(){var _55=function(_56,_57){if((_57.params&&_56 in _57.params)||_57[_56]){_57.set(_56,_57[_56]);}};for(var _58 in this.attributeMap){_55(_58,this);}_4.forEach(this._getSetterAttributes(),function(a){if(!(a in this.attributeMap)){_55(a,this);}},this);},_getSetterAttributes:function(){var _59=this.constructor;if(!_59._setterAttrs){var r=(_59._setterAttrs=[]),_5a,_5b=_59.prototype;for(var _5c in _5b){if(_4.isFunction(_5b[_5c])&&(_5a=_5c.match(/^_set([a-zA-Z]*)Attr$/))&&_5a[1]){r.push(_5a[1].charAt(0).toLowerCase()+_5a[1].substr(1));}}}return _59._setterAttrs;},postMixInProperties:function(){},buildRendering:function(){if(!this.domNode){this.domNode=this.srcNodeRef||_4.create("div");}if(this.baseClass){var _5d=this.baseClass.split(" ");if(!this.isLeftToRight()){_5d=_5d.concat(_4.map(_5d,function(_5e){return _5e+"Rtl";}));}_4.addClass(this.domNode,_5d);}},postCreate:function(){},startup:function(){this._started=true;},destroyRecursive:function(_5f){this._beingDestroyed=true;this.destroyDescendants(_5f);this.destroy(_5f);},destroy:function(_60){this._beingDestroyed=true;this.uninitialize();var d=_4,dfe=d.forEach,dun=d.unsubscribe;dfe(this._connects,function(_61){dfe(_61,d.disconnect);});dfe(this._subscribes,function(_62){dun(_62);});dfe(this._supportingWidgets||[],function(w){if(w.destroyRecursive){w.destroyRecursive();}else{if(w.destroy){w.destroy();}}});this.destroyRendering(_60);_5.registry.remove(this.id);this._destroyed=true;},destroyRendering:function(_63){if(this.bgIframe){this.bgIframe.destroy(_63);delete this.bgIframe;}if(this.domNode){if(_63){_4.removeAttr(this.domNode,"widgetId");}else{_4.destroy(this.domNode);}delete this.domNode;}if(this.srcNodeRef){if(!_63){_4.destroy(this.srcNodeRef);}delete this.srcNodeRef;}},destroyDescendants:function(_64){_4.forEach(this.getChildren(),function(_65){if(_65.destroyRecursive){_65.destroyRecursive(_64);}});},uninitialize:function(){return false;},_setClassAttr:function(_66){var _67=this[this.attributeMap["class"]||"domNode"];_4.replaceClass(_67,_66,this["class"]);this._set("class",_66);},_setStyleAttr:function(_68){var _69=this[this.attributeMap.style||"domNode"];if(_4.isObject(_68)){_4.style(_69,_68);}else{if(_69.style.cssText){_69.style.cssText+="; "+_68;}else{_69.style.cssText=_68;}}this._set("style",_68);},_attrToDom:function(_6a,_6b){var _6c=this.attributeMap[_6a];_4.forEach(_4.isArray(_6c)?_6c:[_6c],function(_6d){var _6e=this[_6d.node||_6d||"domNode"];var _6f=_6d.type||"attribute";switch(_6f){case "attribute":if(_4.isFunction(_6b)){_6b=_4.hitch(this,_6b);}var _70=_6d.attribute?_6d.attribute:(/^on[A-Z][a-zA-Z]*$/.test(_6a)?_6a.toLowerCase():_6a);_4.attr(_6e,_70,_6b);break;case "innerText":_6e.innerHTML="";_6e.appendChild(_4.doc.createTextNode(_6b));break;case "innerHTML":_6e.innerHTML=_6b;break;case "class":_4.replaceClass(_6e,_6b,this[_6a]);break;}},this);},get:function(_71){var _72=this._getAttrNames(_71);return this[_72.g]?this[_72.g]():this[_71];},set:function(_73,_74){if(typeof _73==="object"){for(var x in _73){this.set(x,_73[x]);}return this;}var _75=this._getAttrNames(_73);if(this[_75.s]){var _76=this[_75.s].apply(this,Array.prototype.slice.call(arguments,1));}else{if(_73 in this.attributeMap){this._attrToDom(_73,_74);}this._set(_73,_74);}return _76||this;},_attrPairNames:{},_getAttrNames:function(_77){var apn=this._attrPairNames;if(apn[_77]){return apn[_77];}var uc=_77.charAt(0).toUpperCase()+_77.substr(1);return (apn[_77]={n:_77+"Node",s:"_set"+uc+"Attr",g:"_get"+uc+"Attr"});},_set:function(_78,_79){var _7a=this[_78];this[_78]=_79;if(this._watchCallbacks&&this._created&&_79!==_7a){this._watchCallbacks(_78,_7a,_79);}},toString:function(){return "[Widget "+this.declaredClass+", "+(this.id||"NO ID")+"]";},getDescendants:function(){return this.containerNode?_4.query("[widgetId]",this.containerNode).map(_5.byNode):[];},getChildren:function(){return this.containerNode?_5.findWidgets(this.containerNode):[];},connect:function(obj,_7b,_7c){var _7d=[_4._connect(obj,_7b,this,_7c)];this._connects.push(_7d);return _7d;},disconnect:function(_7e){for(var i=0;i<this._connects.length;i++){if(this._connects[i]==_7e){_4.forEach(_7e,_4.disconnect);this._connects.splice(i,1);return;}}},subscribe:function(_7f,_80){var _81=_4.subscribe(_7f,this,_80);this._subscribes.push(_81);return _81;},unsubscribe:function(_82){for(var i=0;i<this._subscribes.length;i++){if(this._subscribes[i]==_82){_4.unsubscribe(_82);this._subscribes.splice(i,1);return;}}},isLeftToRight:function(){return this.dir?(this.dir=="ltr"):_4._isBodyLtr();},placeAt:function(_83,_84){if(_83.declaredClass&&_83.addChild){_83.addChild(this,_84);}else{_4.place(this.domNode,_83,_84);}return this;}});})();}if(!_4._hasResource["dojox.mobile._base"]){_4._hasResource["dojox.mobile._base"]=true;_4.provide("dojox.mobile._base");_4.isBB=(navigator.userAgent.indexOf("BlackBerry")!=-1)&&!_4.isWebKit;_4.declare("dojox.mobile.View",_5._WidgetBase,{selected:false,keepScrollPos:true,_started:false,constructor:function(_85,_86){if(_86){_4.byId(_86).style.visibility="hidden";}},buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("DIV");this.domNode.className="mblView";this.connect(this.domNode,"webkitAnimationEnd","onAnimationEnd");this.connect(this.domNode,"webkitAnimationStart","onAnimationStart");var id=location.href.match(/#(\w+)([^\w=]|$)/)?RegExp.$1:null;this._visible=this.selected&&!id||this.id==id;if(this.selected){_6.mobile._defaultView=this;}},startup:function(){if(this._started){return;}var _87=this;setTimeout(function(){if(!_87._visible){_87.domNode.style.display="none";}else{_6.mobile.currentView=_87;_87.onStartView();}_87.domNode.style.visibility="visible";},_4.isIE?100:0);this._started=true;},onStartView:function(){},onBeforeTransitionIn:function(_88,dir,_89,_8a,_8b){},onAfterTransitionIn:function(_8c,dir,_8d,_8e,_8f){},onBeforeTransitionOut:function(_90,dir,_91,_92,_93){},onAfterTransitionOut:function(_94,dir,_95,_96,_97){},_saveState:function(_98,dir,_99,_9a,_9b){this._context=_9a;this._method=_9b;if(_99=="none"||!_4.isWebKit){_99=null;}this._moveTo=_98;this._dir=dir;this._transition=_99;this._arguments=[];var i;for(i=0;i<arguments.length;i++){this._arguments.push(arguments[i]);}this._args=[];if(_9a||_9b){for(i=5;i<arguments.length;i++){this._args.push(arguments[i]);}}},performTransition:function(_9c,dir,_9d,_9e,_9f){if(_4.hash){if(typeof (_9c)=="string"&&_9c.charAt(0)=="#"&&!_6.mobile._params){_6.mobile._params=[];for(var i=0;i<arguments.length;i++){_6.mobile._params.push(arguments[i]);}_4.hash(_9c);return;}}this._saveState.apply(this,arguments);var _a0;if(_9c){if(typeof (_9c)=="string"){_9c.match(/^#?([^&]+)/);_a0=RegExp.$1;}else{_a0=_9c;}}else{if(!this._dummyNode){this._dummyNode=_4.doc.createElement("DIV");_4.body().appendChild(this._dummyNode);}_a0=this._dummyNode;}var _a1=this.domNode;_a0=this.toNode=_4.byId(_a0);if(!_a0){alert("dojox.mobile.View#performTransition: destination view not found: "+_a0);}_a0.style.visibility="hidden";_a0.style.display="";this.onBeforeTransitionOut.apply(this,arguments);var _a2=_5.byNode(_a0);if(_a2){if(this.keepScrollPos&&!_5.getEnclosingWidget(this.domNode.parentNode)){var _a3=_4.body().scrollTop||_4.doc.documentElement.scrollTop||_4.global.pageYOffset||0;if(dir==1){_a0.style.top="0px";if(_a3>1){_a1.style.top=-_a3+"px";if(_4.config["mblHideAddressBar"]!==false){setTimeout(function(){_4.global.scrollTo(0,1);},0);}}}else{if(_a3>1||_a0.offsetTop!==0){var _a4=-_a0.offsetTop;_a0.style.top="0px";_a1.style.top=_a4-_a3+"px";if(_4.config["mblHideAddressBar"]!==false&&_a4>0){setTimeout(function(){_4.global.scrollTo(0,_a4+1);},0);}}}}else{_a0.style.top="0px";}_a2.onBeforeTransitionIn.apply(_a2,arguments);}_a0.style.display="none";_a0.style.visibility="visible";this._doTransition(_a1,_a0,_9d,dir);},_doTransition:function(_a5,_a6,_a7,dir){var rev=(dir==-1)?" reverse":"";_a6.style.display="";if(!_a7||_a7=="none"){this.domNode.style.display="none";this.invokeCallback();}else{_4.addClass(_a5,_a7+" out"+rev);_4.addClass(_a6,_a7+" in"+rev);}},onAnimationStart:function(e){},onAnimationEnd:function(e){var _a8=false;if(_4.hasClass(this.domNode,"out")){_a8=true;this.domNode.style.display="none";_4.forEach([this._transition,"in","out","reverse"],function(s){_4.removeClass(this.domNode,s);},this);}if(e.animationName.indexOf("shrink")===0){var li=e.target;li.style.display="none";_4.removeClass(li,"mblCloseContent");}if(_a8){this.invokeCallback();}this.domNode&&(this.domNode.className="mblView");},invokeCallback:function(){this.onAfterTransitionOut.apply(this,this._arguments);var _a9=_5.byNode(this.toNode);if(_a9){_a9.onAfterTransitionIn.apply(_a9,this._arguments);}_6.mobile.currentView=_a9;var c=this._context,m=this._method;if(!c&&!m){return;}if(!m){m=c;c=null;}c=c||_4.global;if(typeof (m)=="string"){c[m].apply(c,this._args);}else{m.apply(c,this._args);}},getShowingView:function(){var _aa=this.domNode.parentNode.childNodes;for(var i=0;i<_aa.length;i++){if(_4.hasClass(_aa[i],"mblView")&&_4.style(_aa[i],"display")!="none"){return _5.byNode(_aa[i]);}}},show:function(){var fs=this.getShowingView().domNode.style;var ts=this.domNode.style;fs.display="none";ts.display="";_6.mobile.currentView=this;},addChild:function(_ab){this.containerNode.appendChild(_ab.domNode);}});_4.declare("dojox.mobile.Heading",_5._WidgetBase,{back:"",href:"",moveTo:"",transition:"slide",label:"",iconBase:"",buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("H1");this.domNode.className="mblHeading";this._view=_5.getEnclosingWidget(this.domNode.parentNode);if(this.label){this.domNode.appendChild(document.createTextNode(this.label));}else{this.label="";_4.forEach(this.domNode.childNodes,function(n){if(n.nodeType==3){this.label+=n.nodeValue;}},this);this.label=_4.trim(this.label);}if(this.back){var btn=_4.create("DIV",{className:"mblArrowButton"},this.domNode,"first");var _ac=_4.create("DIV",{className:"mblArrowButtonHead"},btn);var _ad=_4.create("DIV",{className:"mblArrowButtonBody mblArrowButtonText"},btn);this._body=_ad;this._head=_ac;this._btn=btn;_ad.innerHTML=this.back;this.connect(_ad,"onclick","onClick");var _ae=_4.create("DIV",{className:"mblArrowButtonNeck"},btn);btn.style.width=_ad.offsetWidth+_ac.offsetWidth+"px";this.setLabel(this.label);}},startup:function(){if(this._btn){this._btn.style.width=this._body.offsetWidth+this._head.offsetWidth+"px";}},onClick:function(e){var h1=this.domNode;_4.addClass(h1,"mblArrowButtonSelected");setTimeout(function(){_4.removeClass(h1,"mblArrowButtonSelected");},1000);this.goTo(this.moveTo,this.href);},setLabel:function(_af){if(_af!=this.label){this.label=_af;this.domNode.firstChild.nodeValue=_af;}},goTo:function(_b0,_b1){if(!this._view){this._view=_5.byNode(this.domNode.parentNode);}if(!this._view){return;}if(_b1){this._view.performTransition(null,-1,this.transition,this,function(){location.href=_b1;});}else{if(_6.mobile.app&&_6.mobile.app.STAGE_CONTROLLER_ACTIVE){_4.publish("/dojox/mobile/app/goback");}else{this._view.performTransition(_b0,-1,this.transition);}}}});_4.declare("dojox.mobile.RoundRect",_5._WidgetBase,{shadow:false,buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("DIV");this.domNode.className=this.shadow?"mblRoundRect mblShadow":"mblRoundRect";}});_4.declare("dojox.mobile.RoundRectCategory",_5._WidgetBase,{label:"",buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("H2");this.domNode.className="mblRoundRectCategory";if(this.label){this.domNode.innerHTML=this.label;}else{this.label=this.domNode.innerHTML;}}});_4.declare("dojox.mobile.EdgeToEdgeCategory",_6.mobile.RoundRectCategory,{buildRendering:function(){this.inherited(arguments);this.domNode.className="mblEdgeToEdgeCategory";}});_4.declare("dojox.mobile.RoundRectList",_5._WidgetBase,{transition:"slide",iconBase:"",iconPos:"",buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("UL");this.domNode.className="mblRoundRectList";},addChild:function(_b2){this.containerNode.appendChild(_b2.domNode);_b2.inheritParams();_b2.setIcon();}});_4.declare("dojox.mobile.EdgeToEdgeList",_6.mobile.RoundRectList,{stateful:false,buildRendering:function(){this.inherited(arguments);this.domNode.className="mblEdgeToEdgeList";}});_4.declare("dojox.mobile.AbstractItem",_5._WidgetBase,{icon:"",iconPos:"",href:"",hrefTarget:"",moveTo:"",scene:"",clickable:false,url:"",urlTarget:"",transition:"",transitionDir:1,callback:null,sync:true,label:"",toggle:false,_duration:800,inheritParams:function(){var _b3=this.getParentWidget();if(_b3){if(!this.transition){this.transition=_b3.transition;}if(!this.icon){this.icon=_b3.iconBase;}if(!this.iconPos){this.iconPos=_b3.iconPos;}}},findCurrentView:function(_b4){var w;if(_b4){w=_5.byId(_b4);if(w){return w.getShowingView();}}var n=this.domNode.parentNode;while(true){w=_5.getEnclosingWidget(n);if(!w){return null;}if(w.performTransition){break;}n=w.domNode.parentNode;}return w;},transitionTo:function(_b5,_b6,url,_b7){var w=this.findCurrentView(_b5);if(!w||_b5&&w===_5.byId(_b5)){return;}if(_b6){if(this.hrefTarget){_6.mobile.openWindow(this.href,this.hrefTarget);}else{w.performTransition(null,this.transitionDir,this.transition,this,function(){location.href=_b6;});}return;}else{if(_b7){_4.publish("/dojox/mobile/app/pushScene",[_b7]);return;}}if(url){var id;if(_6.mobile._viewMap&&_6.mobile._viewMap[url]){id=_6.mobile._viewMap[url];}else{var _b8=this._text;if(!_b8){if(this.sync){_b8=_4.trim(_4._getText(url));}else{_4["require"]("dojo._base.xhr");var _b9=_6.mobile.ProgressIndicator.getInstance();_4.body().appendChild(_b9.domNode);_b9.start();var xhr=_4.xhrGet({url:url,handleAs:"text"});xhr.addCallback(_4.hitch(this,function(_ba,_bb){_b9.stop();if(_ba){this._text=_ba;this.transitionTo(_b5,_b6,url,_b7);}}));xhr.addErrback(function(_bc){_b9.stop();alert("Failed to load "+url+"\n"+(_bc.description||_bc));});return;}}this._text=null;id=this._parse(_b8);if(!_6.mobile._viewMap){_6.mobile._viewMap=[];}_6.mobile._viewMap[url]=id;}_b5=id;w=this.findCurrentView(_b5)||w;}w.performTransition(_b5,this.transitionDir,this.transition,this.callback&&this,this.callback);},_parse:function(_bd){var _be=_4.create("DIV");var _bf;var id=this.urlTarget;var _c0=_5.byId(id)&&_5.byId(id).containerNode||_4.byId(id)||_6.mobile.currentView&&_6.mobile.currentView.domNode.parentNode||_4.body();if(_bd.charAt(0)=="<"){_be.innerHTML=_bd;_bf=_be.firstChild;if(!_bf&&_bf.nodeType!=1){alert("dojox.mobile.AbstractItem#transitionTo: invalid view content");return;}_bf.setAttribute("_started","true");_bf.style.visibility="hidden";_c0.appendChild(_be);(_6.mobile.parser||_4.parser).parse(_be);_c0.appendChild(_c0.removeChild(_be).firstChild);}else{if(_bd.charAt(0)=="{"){_c0.appendChild(_be);this._ws=[];_bf=this._instantiate(eval("("+_bd+")"),_be);for(var i=0;i<this._ws.length;i++){var w=this._ws[i];w.startup&&!w._started&&(!w.getParent||!w.getParent())&&w.startup();}this._ws=null;}}_bf.style.display="none";_bf.style.visibility="visible";var id=_bf.id;return _4.hash?"#"+id:id;},_instantiate:function(obj,_c1,_c2){var _c3;for(var key in obj){if(key.charAt(0)=="@"){continue;}var cls=_4.getObject(key);if(!cls){continue;}var _c4={};var _c5=cls.prototype;var _c6=_4.isArray(obj[key])?obj[key]:[obj[key]];for(var i=0;i<_c6.length;i++){for(var _c7 in _c6[i]){if(_c7.charAt(0)=="@"){var val=_c6[i][_c7];_c7=_c7.substring(1);if(typeof _c5[_c7]=="string"){_c4[_c7]=val;}else{if(typeof _c5[_c7]=="number"){_c4[_c7]=val-0;}else{if(typeof _c5[_c7]=="boolean"){_c4[_c7]=(val!="false");}else{if(typeof _c5[_c7]=="object"){_c4[_c7]=eval("("+val+")");}}}}}}_c3=new cls(_c4,_c1);if(!_c1){this._ws.push(_c3);}if(_c2&&_c2.addChild){_c2.addChild(_c3);}this._instantiate(_c6[i],null,_c3);}}return _c3&&_c3.domNode;},createDomButton:function(_c8,_c9){var s=_c8.className;if(s.match(/mblDomButton\w+_(\d+)/)){var _ca=RegExp.$1-0;for(var i=0,p=(_c9||_c8);i<_ca;i++){p=_4.create("DIV",null,p);}}},select:function(_cb){},defaultClickAction:function(){if(this.toggle){this.select(this.selected);}else{if(!this.selected){this.select();if(!this.selectOne){var _cc=this;setTimeout(function(){_cc.select(true);},this._duration);}if(this.moveTo||this.href||this.url||this.scene){this.transitionTo(this.moveTo,this.href,this.url,this.scene);}}}},getParentWidget:function(){var ref=this.srcNodeRef||this.domNode;return ref&&ref.parentNode?_5.getEnclosingWidget(ref.parentNode):null;}});_4.declare("dojox.mobile.ListItem",_6.mobile.AbstractItem,{rightText:"",btnClass:"",anchorLabel:false,noArrow:false,selected:false,buildRendering:function(){this.inheritParams();var a=this.anchorNode=_4.create("A");a.className="mblListItemAnchor";var box=_4.create("DIV");box.className="mblListItemTextBox";if(this.anchorLabel){box.style.cursor="pointer";}var r=this.srcNodeRef;if(r){for(var i=0,len=r.childNodes.length;i<len;i++){box.appendChild(r.removeChild(r.firstChild));}}if(this.label){box.appendChild(_4.doc.createTextNode(this.label));}a.appendChild(box);if(this.rightText){this._setRightTextAttr(this.rightText);}if(this.moveTo||this.href||this.url||this.clickable){var _cd=this.getParentWidget();if(!this.noArrow&&!(_cd&&_cd.stateful)){var _ce=_4.create("DIV");_ce.className="mblArrow";a.appendChild(_ce);}this.connect(a,"onclick","onClick");}else{if(this.btnClass){var div=this.btnNode=_4.create("DIV");div.className=this.btnClass+" mblRightButton";div.appendChild(_4.create("DIV"));div.appendChild(_4.create("P"));var _cf=_4.create("DIV");_cf.className="mblRightButtonContainer";_cf.appendChild(div);a.appendChild(_cf);_4.addClass(a,"mblListItemAnchorHasRightButton");setTimeout(function(){_cf.style.width=div.offsetWidth+"px";_cf.style.height=div.offsetHeight+"px";if(_4.isIE){a.parentNode.style.height=a.parentNode.offsetHeight+"px";}},0);}}if(this.anchorLabel){box.style.display="inline";}var li=this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("LI");li.className="mblListItem"+(this.selected?" mblItemSelected":"");li.appendChild(a);this.setIcon();},setIcon:function(){if(this.iconNode){return;}var a=this.anchorNode;if(this.icon&&this.icon!="none"){var img=this.iconNode=_4.create("IMG");img.className="mblListItemIcon";img.src=this.icon;this.domNode.insertBefore(img,a);_6.mobile.setupIcon(this.iconNode,this.iconPos);_4.removeClass(a,"mblListItemAnchorNoIcon");}else{_4.addClass(a,"mblListItemAnchorNoIcon");}},onClick:function(e){var a=e.currentTarget;var li=a.parentNode;if(_4.hasClass(li,"mblItemSelected")){return;}if(this.anchorLabel){for(var p=e.target;p.tagName!="LI";p=p.parentNode){if(p.className=="mblListItemTextBox"){_4.addClass(p,"mblListItemTextBoxSelected");setTimeout(function(){_4.removeClass(p,"mblListItemTextBoxSelected");},1000);this.onAnchorLabelClicked(e);return;}}}if(this.getParentWidget().stateful){for(var i=0,c=li.parentNode.childNodes;i<c.length;i++){_4.removeClass(c[i],"mblItemSelected");}}else{setTimeout(function(){_4.removeClass(li,"mblItemSelected");},1000);}_4.addClass(li,"mblItemSelected");this.transitionTo(this.moveTo,this.href,this.url,this.scene);},onAnchorLabelClicked:function(e){},_setRightTextAttr:function(_d0){this.rightText=_d0;if(!this._rightTextNode){this._rightTextNode=_4.create("DIV",{className:"mblRightText"},this.anchorNode);}this._rightTextNode.innerHTML=_d0;}});_4.declare("dojox.mobile.Switch",_5._WidgetBase,{value:"on",leftLabel:"ON",rightLabel:"OFF",_width:53,buildRendering:function(){this.domNode=this.srcNodeRef||_4.doc.createElement("DIV");this.domNode.className="mblSwitch";this.domNode.innerHTML="<div class=\"mblSwitchInner\">"+"<div class=\"mblSwitchBg mblSwitchBgLeft\">"+"<div class=\"mblSwitchText mblSwitchTextLeft\">"+this.leftLabel+"</div>"+"</div>"+"<div class=\"mblSwitchBg mblSwitchBgRight\">"+"<div class=\"mblSwitchText mblSwitchTextRight\">"+this.rightLabel+"</div>"+"</div>"+"<div class=\"mblSwitchKnob\"></div>"+"</div>";var n=this.inner=this.domNode.firstChild;this.left=n.childNodes[0];this.right=n.childNodes[1];this.knob=n.childNodes[2];_4.addClass(this.domNode,(this.value=="on")?"mblSwitchOn":"mblSwitchOff");this[this.value=="off"?"left":"right"].style.display="none";},postCreate:function(){this.connect(this.knob,"onclick","onClick");this.connect(this.knob,"touchstart","onTouchStart");this.connect(this.knob,"mousedown","onTouchStart");},_changeState:function(_d1){this.inner.style.left="";_4.addClass(this.domNode,"mblSwitchAnimation");_4.removeClass(this.domNode,(_d1=="on")?"mblSwitchOff":"mblSwitchOn");_4.addClass(this.domNode,(_d1=="on")?"mblSwitchOn":"mblSwitchOff");var _d2=this;setTimeout(function(){_d2[_d1=="off"?"left":"right"].style.display="none";_4.removeClass(_d2.domNode,"mblSwitchAnimation");},300);},onClick:function(e){if(this._moved){return;}this.value=(this.value=="on")?"off":"on";this._changeState(this.value);this.onStateChanged(this.value);},onTouchStart:function(e){this._moved=false;this.innerStartX=this.inner.offsetLeft;if(e.targetTouches){this.touchStartX=e.targetTouches[0].clientX;this._conn1=_4.connect(this.inner,"touchmove",this,"onTouchMove");this._conn2=_4.connect(this.inner,"touchend",this,"onTouchEnd");}this.left.style.display="block";this.right.style.display="block";_4.stopEvent(e);},onTouchMove:function(e){e.preventDefault();var dx;if(e.targetTouches){if(e.targetTouches.length!=1){return false;}dx=e.targetTouches[0].clientX-this.touchStartX;}else{dx=e.clientX-this.touchStartX;}var pos=this.innerStartX+dx;var d=10;if(pos<=-(this._width-d)){pos=-this._width;}if(pos>=-d){pos=0;}this.inner.style.left=pos+"px";this._moved=true;},onTouchEnd:function(e){_4.disconnect(this._conn1);_4.disconnect(this._conn2);if(this.innerStartX==this.inner.offsetLeft){if(_4.isWebKit){var ev=_4.doc.createEvent("MouseEvents");ev.initEvent("click",true,true);this.knob.dispatchEvent(ev);}return;}var _d3=(this.inner.offsetLeft<-(this._width/2))?"off":"on";this._changeState(_d3);if(_d3!=this.value){this.value=_d3;this.onStateChanged(this.value);}},onStateChanged:function(_d4){}});_4.declare("dojox.mobile.Button",_5._WidgetBase,{btnClass:"mblBlueButton",duration:1000,label:null,buildRendering:function(){this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("BUTTON");this.domNode.className="mblButton "+this.btnClass;if(this.label){this.domNode.innerHTML=this.label;}this.connect(this.domNode,"onclick","onClick");},onClick:function(e){var _d5=this.domNode;var c="mblButtonSelected "+this.btnClass+"Selected";_4.addClass(_d5,c);setTimeout(function(){_4.removeClass(_d5,c);},this.duration);}});_4.declare("dojox.mobile.ToolBarButton",_6.mobile.AbstractItem,{selected:false,_defaultColor:"mblColorDefault",_selColor:"mblColorDefaultSel",buildRendering:function(){this.inheritParams();this.domNode=this.containerNode=this.srcNodeRef||_4.doc.createElement("div");_4.addClass(this.domNode,"mblToolbarButton mblArrowButtonText");var _d6;if(this.selected){_d6=this._selColor;}else{if(this.domNode.className.indexOf("mblColor")==-1){_d6=this._defaultColor;}}_4.addClass(this.domNode,_d6);if(this.label){this.domNode.innerHTML=this.label;}else{this.label=this.domNode.innerHTML;}if(this.icon&&this.icon!="none"){var img;if(this.iconPos){var _d7=_4.create("DIV",null,this.domNode);img=_4.create("IMG",null,_d7);img.style.position="absolute";var arr=this.iconPos.split(/[ ,]/);_4.style(_d7,{position:"relative",width:arr[2]+"px",height:arr[3]+"px"});}else{img=_4.create("IMG",null,this.domNode);}img.src=this.icon;_6.mobile.setupIcon(img,this.iconPos);this.iconNode=img;}this.createDomButton(this.domNode);this.connect(this.domNode,"onclick","onClick");},select:function(_d8){_4.toggleClass(this.domNode,this._selColor,!_d8);this.selected=!_d8;},onClick:function(e){this.defaultClickAction();}});_4.declare("dojox.mobile.ProgressIndicator",null,{interval:100,colors:["#C0C0C0","#C0C0C0","#C0C0C0","#C0C0C0","#C0C0C0","#C0C0C0","#B8B9B8","#AEAFAE","#A4A5A4","#9A9A9A","#8E8E8E","#838383"],_bars:[],constructor:function(){this.domNode=_4.create("DIV");this.domNode.className="mblProgContainer";for(var i=0;i<12;i++){var div=_4.create("DIV");div.className="mblProg mblProg"+i;this.domNode.appendChild(div);this._bars.push(div);}},start:function(){var _d9=0;var _da=this;this.timer=setInterval(function(){_d9--;_d9=_d9<0?11:_d9;var c=_da.colors;for(var i=0;i<12;i++){var idx=(_d9+i)%12;_da._bars[i].style.backgroundColor=c[idx];}},this.interval);},stop:function(){if(this.timer){clearInterval(this.timer);}this.timer=null;if(this.domNode.parentNode){this.domNode.parentNode.removeChild(this.domNode);}}});_6.mobile.ProgressIndicator._instance=null;_6.mobile.ProgressIndicator.getInstance=function(){if(!_6.mobile.ProgressIndicator._instance){_6.mobile.ProgressIndicator._instance=new _6.mobile.ProgressIndicator();}return _6.mobile.ProgressIndicator._instance;};_6.mobile.addClass=function(){var _db=document.getElementsByTagName("link");for(var i=0,len=_db.length;i<len;i++){if(_db[i].href.match(/dojox\/mobile\/themes\/(\w+)\//)){_6.mobile.theme=RegExp.$1;_4.addClass(_4.body(),_6.mobile.theme);break;}}};_6.mobile.setupIcon=function(_dc,_dd){if(_dc&&_dd){var arr=_4.map(_dd.split(/[ ,]/),function(_de){return _de-0;});var t=arr[0];var r=arr[1]+arr[2];var b=arr[0]+arr[3];var l=arr[1];_dc.style.clip="rect("+t+"px "+r+"px "+b+"px "+l+"px)";_dc.style.top=_4.style(_dc,"top")-t+"px";_dc.style.left=_4.style(_dc.parentNode,"paddingLeft")-l+"px";}};_6.mobile.hideAddressBar=function(){_4.body().style.minHeight="1000px";setTimeout(function(){scrollTo(0,1);},100);setTimeout(function(){scrollTo(0,1);},400);setTimeout(function(){scrollTo(0,1);_4.body().style.minHeight=(_4.global.innerHeight||_4.doc.documentElement.clientHeight)+"px";},1000);};_6.mobile.openWindow=function(url,_df){_4.global.open(url,_df||"_blank");};_4._loaders.unshift(function(){var _e0=_4.body().getElementsByTagName("*");var i,len,s;len=_e0.length;for(i=0;i<len;i++){s=_e0[i].getAttribute("dojoType");if(s){if(_e0[i].parentNode.getAttribute("lazy")=="true"){_e0[i].setAttribute("__dojoType",s);_e0[i].removeAttribute("dojoType");}}}});_4.addOnLoad(function(){_6.mobile.addClass();if(_4.config["mblApplyPageStyles"]!==false){_4.addClass(_4.doc.documentElement,"mobile");}if(_4.config["mblHideAddressBar"]!==false){_6.mobile.hideAddressBar();if(_4.config["mblAlwaysHideAddressBar"]==true){if(_4.global.onorientationchange!==undefined){_4.connect(_4.global,"onorientationchange",_6.mobile.hideAddressBar);}else{_4.connect(_4.global,"onresize",_6.mobile.hideAddressBar);}}}var _e1=_4.body().getElementsByTagName("*");var i,len=_e1.length,s;for(i=0;i<len;i++){s=_e1[i].getAttribute("__dojoType");if(s){_e1[i].setAttribute("dojoType",s);_e1[i].removeAttribute("__dojoType");}}if(_4.hash){var _e2=function(_e3){var arr;arr=_5.findWidgets(_e3);var _e4=arr;for(var i=0;i<_e4.length;i++){arr=arr.concat(_e2(_e4[i].containerNode));}return arr;};_4.subscribe("/dojo/hashchange",null,function(_e5){var _e6=_6.mobile.currentView;if(!_e6){return;}var _e7=_6.mobile._params;if(!_e7){var _e8=_e5?_e5:_6.mobile._defaultView.id;var _e9=_e2(_e6.domNode);var dir=1,_ea="slide";for(i=0;i<_e9.length;i++){var w=_e9[i];if("#"+_e8==w.moveTo){_ea=w.transition;dir=(w instanceof _6.mobile.Heading)?-1:1;break;}}_e7=[_e8,dir,_ea];}_e6.performTransition.apply(_e6,_e7);_6.mobile._params=null;});}_4.body().style.visibility="visible";});_5.getEnclosingWidget=function(_eb){while(_eb&&_eb.tagName!=="BODY"){if(_eb.getAttribute&&_eb.getAttribute("widgetId")){return _5.registry.byId(_eb.getAttribute("widgetId"));}_eb=_eb._parentNode||_eb.parentNode;}return null;};}if(!_4._hasResource["dojox.mobile"]){_4._hasResource["dojox.mobile"]=true;_4.provide("dojox.mobile");_4.experimental("dojox.mobile");}}};});
