/*
	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.xhrPlugins"],["require","dojo.AdapterRegistry"],["require","dojo._base.xhr"]],defineResource:function(_4,_5,_6){if(!_4._hasResource["dojox.io.xhrPlugins"]){_4._hasResource["dojox.io.xhrPlugins"]=true;_4.provide("dojox.io.xhrPlugins");_4.require("dojo.AdapterRegistry");_4.require("dojo._base.xhr");(function(){var _7;var _8;function _9(){return _8=_6.io.xhrPlugins.plainXhr=_8||_4._defaultXhr||_4.xhr;};_6.io.xhrPlugins.register=function(){var _a=_9();if(!_7){_7=new _4.AdapterRegistry();_4[_4._defaultXhr?"_defaultXhr":"xhr"]=function(_b,_c,_d){return _7.match.apply(_7,arguments);};_7.register("xhr",function(_e,_f){if(!_f.url.match(/^\w*:\/\//)){return true;}var _10=window.location.href.match(/^.*?\/\/.*?\//)[0];return _f.url.substring(0,_10.length)==_10;},_a);}return _7.register.apply(_7,arguments);};_6.io.xhrPlugins.addProxy=function(_11){var _12=_9();_6.io.xhrPlugins.register("proxy",function(_13,_14){return true;},function(_15,_16,_17){_16.url=_11+encodeURIComponent(_16.url);return _12.call(_4,_15,_16,_17);});};var _18;_6.io.xhrPlugins.addCrossSiteXhr=function(url,_19){var _1a=_9();if(_18===undefined&&window.XMLHttpRequest){try{var xhr=new XMLHttpRequest();xhr.open("GET","http://testing-cross-domain-capability.com",true);_18=true;_4.config.noRequestedWithHeaders=true;}catch(e){_18=false;}}_6.io.xhrPlugins.register("cs-xhr",function(_1b,_1c){return (_18||(window.XDomainRequest&&_1c.sync!==true&&(_1b=="GET"||_1b=="POST"||_19)))&&(_1c.url.substring(0,url.length)==url);},_18?_1a:function(){var _1d=_4._xhrObj;_4._xhrObj=function(){var xdr=new XDomainRequest();xdr.readyState=1;xdr.setRequestHeader=function(){};xdr.getResponseHeader=function(_1e){return _1e=="Content-Type"?xdr.contentType:null;};function _1f(_20,_21){return function(){xdr.readyState=_21;xdr.status=_20;};};xdr.onload=_1f(200,4);xdr.onprogress=_1f(200,3);xdr.onerror=_1f(404,4);return xdr;};var dfd=(_19?_19(_9()):_9()).apply(_4,arguments);_4._xhrObj=_1d;return dfd;});};_6.io.xhrPlugins.fullHttpAdapter=function(_22,_23){return function(_24,_25,_26){var _27={};var _28={};if(_24!="GET"){_28["http-method"]=_24;if(_25.putData&&_23){_27["http-content"]=_25.putData;delete _25.putData;_26=false;}if(_25.postData&&_23){_27["http-content"]=_25.postData;delete _25.postData;_26=false;}_24="POST";}for(var i in _25.headers){var _29=i.match(/^X-/)?i.substring(2).replace(/-/g,"_").toLowerCase():("http-"+i);_28[_29]=_25.headers[i];}_25.query=_4.objectToQuery(_28);_4._ioAddQueryToUrl(_25);_25.content=_4.mixin(_25.content||{},_27);return _22.call(_4,_24,_25,_26);};};})();}}};});