/*
	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","dijit._base.popup"],["require","dijit._base.focus"],["require","dijit._base.place"],["require","dijit._base.window"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dijit._base.popup"]){_4._hasResource["dijit._base.popup"]=true;_4.provide("dijit._base.popup");_4.require("dijit._base.focus");_4.require("dijit._base.place");_4.require("dijit._base.window");_5.popup={_stack:[],_beginZIndex:1000,_idGen:1,_createWrapper:function(_7){var _8=_7.declaredClass?_7._popupWrapper:(_7.parentNode&&_4.hasClass(_7.parentNode,"dijitPopup")),_9=_7.domNode||_7;if(!_8){_8=_4.create("div",{"class":"dijitPopup",style:{display:"none"},role:"presentation"},_4.body());_8.appendChild(_9);var s=_9.style;s.display="";s.visibility="";s.position="";s.top="0px";if(_7.declaredClass){_7._popupWrapper=_8;_4.connect(_7,"destroy",function(){_4.destroy(_8);delete _7._popupWrapper;});}}return _8;},moveOffScreen:function(_a){var _b=this._createWrapper(_a);_4.style(_b,{visibility:"hidden",top:"-9999px",display:""});},hide:function(_c){var _d=this._createWrapper(_c);_4.style(_d,"display","none");},getTopPopup:function(){var _e=this._stack;for(var pi=_e.length-1;pi>0&&_e[pi].parent===_e[pi-1].widget;pi--){}return _e[pi];},open:function(_f){var _10=this._stack,_11=_f.popup,_12=_f.orient||((_f.parent?_f.parent.isLeftToRight():_4._isBodyLtr())?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),_13=_f.around,id=(_f.around&&_f.around.id)?(_f.around.id+"_dropdown"):("popup_"+this._idGen++);while(_10.length&&(!_f.parent||!_4.isDescendant(_f.parent.domNode,_10[_10.length-1].widget.domNode))){_5.popup.close(_10[_10.length-1].widget);}var _14=this._createWrapper(_11);_4.attr(_14,{id:id,style:{zIndex:this._beginZIndex+_10.length},"class":"dijitPopup "+(_11.baseClass||_11["class"]||"").split(" ")[0]+"Popup",dijitPopupParent:_f.parent?_f.parent.id:""});if(_4.isIE||_4.isMoz){if(!_11.bgIframe){_11.bgIframe=new _5.BackgroundIframe(_14);}}var _15=_13?_5.placeOnScreenAroundElement(_14,_13,_12,_11.orient?_4.hitch(_11,"orient"):null):_5.placeOnScreen(_14,_f,_12=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_f.padding);_14.style.display="";_14.style.visibility="visible";_11.domNode.style.visibility="visible";var _16=[];_16.push(_4.connect(_14,"onkeypress",this,function(evt){if(evt.charOrCode==_4.keys.ESCAPE&&_f.onCancel){_4.stopEvent(evt);_f.onCancel();}else{if(evt.charOrCode===_4.keys.TAB){_4.stopEvent(evt);var _17=this.getTopPopup();if(_17&&_17.onCancel){_17.onCancel();}}}}));if(_11.onCancel){_16.push(_4.connect(_11,"onCancel",_f.onCancel));}_16.push(_4.connect(_11,_11.onExecute?"onExecute":"onChange",this,function(){var _18=this.getTopPopup();if(_18&&_18.onExecute){_18.onExecute();}}));_10.push({widget:_11,parent:_f.parent,onExecute:_f.onExecute,onCancel:_f.onCancel,onClose:_f.onClose,handlers:_16});if(_11.onOpen){_11.onOpen(_15);}return _15;},close:function(_19){var _1a=this._stack;while((_19&&_4.some(_1a,function(_1b){return _1b.widget==_19;}))||(!_19&&_1a.length)){var top=_1a.pop(),_1c=top.widget,_1d=top.onClose;if(_1c.onClose){_1c.onClose();}_4.forEach(top.handlers,_4.disconnect);if(_1c&&_1c.domNode){this.hide(_1c);}if(_1d){_1d();}}}};_5._frames=new function(){var _1e=[];this.pop=function(){var _1f;if(_1e.length){_1f=_1e.pop();_1f.style.display="";}else{if(_4.isIE<9){var _20=_4.config["dojoBlankHtmlUrl"]||(_4.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _21="<iframe src='"+_20+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_1f=_4.doc.createElement(_21);}else{_1f=_4.create("iframe");_1f.src="javascript:\"\"";_1f.className="dijitBackgroundIframe";_4.style(_1f,"opacity",0.1);}_1f.tabIndex=-1;_5.setWaiRole(_1f,"presentation");}return _1f;};this.push=function(_22){_22.style.display="none";_1e.push(_22);};}();_5.BackgroundIframe=function(_23){if(!_23.id){throw new Error("no id");}if(_4.isIE||_4.isMoz){var _24=(this.iframe=_5._frames.pop());_23.appendChild(_24);if(_4.isIE<7||_4.isQuirks){this.resize(_23);this._conn=_4.connect(_23,"onresize",this,function(){this.resize(_23);});}else{_4.style(_24,{width:"100%",height:"100%"});}}};_4.extend(_5.BackgroundIframe,{resize:function(_25){if(this.iframe){_4.style(this.iframe,{width:_25.offsetWidth+"px",height:_25.offsetHeight+"px"});}},destroy:function(){if(this._conn){_4.disconnect(this._conn);this._conn=null;}if(this.iframe){_5._frames.push(this.iframe);delete this.iframe;}}});}}};});