/*
	Copyright (c) 2004-2009, 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[(typeof (djConfig)!="undefined"&&djConfig.scopeMap&&djConfig.scopeMap[0][1])||"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=new function(){var _7=[],_8=1000,_9=1;this.prepare=function(_a){var s=_a.style;s.visibility="hidden";s.position="absolute";s.top="-9999px";if(s.display=="none"){s.display="";}_4.body().appendChild(_a);};this.open=function(_c){var _d=_c.popup,_e=_c.orient||{"BL":"TL","TL":"BL"},_f=_c.around,id=(_c.around&&_c.around.id)?(_c.around.id+"_dropdown"):("popup_"+_9++);var _11=_4.create("div",{id:id,"class":"dijitPopup",style:{zIndex:_8+_7.length,visibility:"hidden"}},_4.body());_5.setWaiRole(_11,"presentation");_11.style.left=_11.style.top="0px";if(_c.parent){_11.dijitPopupParent=_c.parent.id;}var s=_d.domNode.style;s.display="";s.visibility="";s.position="";s.top="0px";_11.appendChild(_d.domNode);var _13=new _5.BackgroundIframe(_11);var _14=_f?_5.placeOnScreenAroundElement(_11,_f,_e,_d.orient?_4.hitch(_d,"orient"):null):_5.placeOnScreen(_11,_c,_e=="R"?["TR","BR","TL","BL"]:["TL","BL","TR","BR"],_c.padding);_11.style.visibility="visible";var _15=[];var _16=function(){for(var pi=_7.length-1;pi>0&&_7[pi].parent===_7[pi-1].widget;pi--){}return _7[pi];};_15.push(_4.connect(_11,"onkeypress",this,function(evt){if(evt.charOrCode==_4.keys.ESCAPE&&_c.onCancel){_4.stopEvent(evt);_c.onCancel();}else{if(evt.charOrCode===_4.keys.TAB){_4.stopEvent(evt);var _19=_16();if(_19&&_19.onCancel){_19.onCancel();}}}}));if(_d.onCancel){_15.push(_4.connect(_d,"onCancel",null,_c.onCancel));}_15.push(_4.connect(_d,_d.onExecute?"onExecute":"onChange",null,function(){var _1a=_16();if(_1a&&_1a.onExecute){_1a.onExecute();}}));_7.push({wrapper:_11,iframe:_13,widget:_d,parent:_c.parent,onExecute:_c.onExecute,onCancel:_c.onCancel,onClose:_c.onClose,handlers:_15});if(_d.onOpen){_d.onOpen(_14);}return _14;};this.close=function(_1b){while(_4.some(_7,function(_1c){return _1c.widget==_1b;})){var top=_7.pop(),_1e=top.wrapper,_1f=top.iframe,_20=top.widget,_21=top.onClose;if(_20.onClose){_20.onClose();}_4.forEach(top.handlers,_4.disconnect);if(!_20||!_20.domNode){return;}this.prepare(_20.domNode);_1f.destroy();_4.destroy(_1e);if(_21){_21();}}};}();_5._frames=new function(){var _22=[];this.pop=function(){var _23;if(_22.length){_23=_22.pop();_23.style.display="";}else{if(_4.isIE){var _24=_4.config["dojoBlankHtmlUrl"]||(_4.moduleUrl("dojo","resources/blank.html")+"")||"javascript:\"\"";var _25="<iframe src='"+_24+"'"+" style='position: absolute; left: 0px; top: 0px;"+"z-index: -1; filter:Alpha(Opacity=\"0\");'>";_23=_4.doc.createElement(_25);}else{_23=_4.create("iframe");_23.src="javascript:\"\"";_23.className="dijitBackgroundIframe";}_23.tabIndex=-1;_4.body().appendChild(_23);}return _23;};this.push=function(_26){_26.style.display="none";if(_4.isIE){_26.style.removeExpression("width");_26.style.removeExpression("height");}_22.push(_26);};}();_5.BackgroundIframe=function(_27){if(!_27.id){throw new Error("no id");}if(_4.isIE<7||(_4.isFF<3&&_4.hasClass(_4.body(),"dijit_a11y"))){var _28=_5._frames.pop();_27.appendChild(_28);if(_4.isIE){_28.style.setExpression("width",_4._scopeName+".doc.getElementById('"+_27.id+"').offsetWidth");_28.style.setExpression("height",_4._scopeName+".doc.getElementById('"+_27.id+"').offsetHeight");}this.iframe=_28;}};_4.extend(_5.BackgroundIframe,{destroy:function(){if(this.iframe){_5._frames.push(this.iframe);delete this.iframe;}}});}}};});