/*
	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.io.windowName"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.io.windowName"]){_4._hasResource["dojox.io.windowName"]=true;_4.provide("dojox.io.windowName");_6.io.windowName={send:function(_7,_8){_8.url+=(_8.url.match(/\?/)?"&":"?")+"windowname="+(_8.authElement?"auth":true);var _9=_8.authElement;var _a=function(_b){try{var _c=_d.ioArgs.frame.contentWindow.document;_c.write(" ");_c.close();}catch(e){}(_9||_4.body()).removeChild(_d.ioArgs.outerFrame);return _b;};var _d=_4._ioSetArgs(_8,_a,_a,_a);if(_8.timeout){setTimeout(function(){if(_d.fired==-1){_d.callback(new Error("Timeout"));}},_8.timeout);}var _e=_6.io.windowName;if(_4.body()){_e._send(_d,_7,_9,_8.onAuthLoad);}else{_4.addOnLoad(function(){_e._send(_d,_7,_9,_8.onAuthLoad);});}return _d;},_send:function(_f,_10,_11,_12){var _13=_f.ioArgs;var _14=_6.io.windowName._frameNum++;var _15=(_4.config.dojoBlankHtmlUrl||_4.config.dojoCallbackUrl||_4.moduleUrl("dojo","resources/blank.html"))+"#"+_14;var _16=new _4._Url(window.location,_15);var doc=_4.doc;var _17=_11||_4.body();function _18(_19){_19.style.width="100%";_19.style.height="100%";_19.style.border="0px";};if(_4.isMoz&&![].reduce){var _1a=doc.createElement("iframe");_18(_1a);if(!_11){_1a.style.display="none";}_17.appendChild(_1a);var _1b=_1a.contentWindow;doc=_1b.document;doc.write("<html><body margin='0px'><iframe style='width:100%;height:100%;border:0px' name='protectedFrame'></iframe></body></html>");doc.close();var _1c=_1b[0];_1b.__defineGetter__(0,function(){});_1b.__defineGetter__("protectedFrame",function(){});doc=_1c.document;doc.write("<html><body margin='0px'></body></html>");doc.close();_17=doc.body;}var _1d;if(_4.isIE){var div=doc.createElement("div");div.innerHTML="<iframe name=\""+_16+"\" onload=\"dojox.io.windowName["+_14+"]()\">";_1d=div.firstChild;}else{_1d=doc.createElement("iframe");}_13.frame=_1d;_18(_1d);_13.outerFrame=_1a=_1a||_1d;if(!_11){_1a.style.display="none";}var _1e=0;function _1f(){var _20=_1d.contentWindow.name;if(typeof _20=="string"){if(_20!=_16){_1e=2;_f.ioArgs.hash=_1d.contentWindow.location.hash;_f.callback(_20);}}};_6.io.windowName[_14]=_1d.onload=function(){try{if(!_4.isMoz&&_1d.contentWindow.location=="about:blank"){return;}}catch(e){}if(!_1e){_1e=1;if(_11){if(_12){_12();}}else{_1d.contentWindow.location=_15;}}try{if(_1e<2){_1f();}}catch(e){}};_1d.name=_16;if(_10.match(/GET/i)){_4._ioAddQueryToUrl(_13);_1d.src=_13.url;_17.appendChild(_1d);if(_1d.contentWindow){_1d.contentWindow.location.replace(_13.url);}}else{if(_10.match(/POST/i)){_17.appendChild(_1d);var _21=_4.doc.createElement("form");_4.body().appendChild(_21);var _22=_4.queryToObject(_13.query);for(var i in _22){var _23=_22[i];_23=_23 instanceof Array?_23:[_23];for(var j=0;j<_23.length;j++){var _24=doc.createElement("input");_24.type="hidden";_24.name=i;_24.value=_23[j];_21.appendChild(_24);}}_21.method="POST";_21.action=_13.url;_21.target=_16;_21.submit();_21.parentNode.removeChild(_21);}else{throw new Error("Method "+_10+" not supported with the windowName transport");}}if(_1d.contentWindow){_1d.contentWindow.name=_16;}},_frameNum:0};}}};});