function XmlHttpObject(K,X,Y,L){var c=null;var H=null;var R=null;var J=null;var d=false;var Y=null;var L=null;var u=[];var a="TEXT";this.setRequestMethod=function(n){Y=n;};this.setRequestURL=function(n){L=n;};this.setResponseType=function(n){a=n;};this.setRequestFinished=function(n){d=n;};this.setRequestMethod(Y);this.setRequestURL(L);this.getRequestObject=function(){return c;};this.getCompleteHandler=function(){return R;};this.getErrorHandler=function(){return J;};this.isRequestFinished=function(){return d;};this.getRequestMethod=function(){return Y;};this.getRequestURL=function(){return L;};this.getParamList=function(){return u;};this.getResponseType=function(){return a;};if(navigator.userAgent.indexOf("MSIE")!=-1){var B="Msxml2.XMLHTTP";if(navigator.appVersion.indexOf("MSIE 5.5")>=0){B="Microsoft.XMLHTTP";}try{c=new ActiveXObject(B);}catch(q){return false;}}else{if(window.XMLHttpRequest){c=new XMLHttpRequest();}}if(c!=null){if(window.coreHandler==null){window.alert("O handler padrão de requisições não foi encontrado. Por favor, inclua o arquivo core.js.");return false;}if(navigator.userAgent.indexOf("MSIE")!=-1){try{c.onreadystatechange=window.coreHandler;H=window.coreHandler;}catch(q){return false;}}else{if(window.XMLHttpRequest){c.onload=window.coreHandler;c.onerror=window.coreHandler;H=window.coreHandler;}}}if(typeof K=="function"){R=K;}if(typeof X=="function"){J=X;}this.startRequest=function(s,x,y){if(s!=null){this.setRequestMethod(s);}if(s!=null){this.setRequestURL(x);}if(s==null){throw new ConfigError(null,"O método HTTP da requisição não foi informado.");}if(x==null){throw new ConfigError(null,"O URL da requisição não foi informado.");}var G=false;if(y!=null&&y.length!=null){var F="";for(var n=0;n<y.length;n++){if(y[n] instanceof RequestParam){var P=y[n].getName();if(P=="__nocache"){G=true;continue;}F+=(F.length>0?"&":"")+y[n].toString();u[u.length]=y[n];}}y=F;if(this.getRequestMethod().toUpperCase()=="GET"&&y.length>0){this.setRequestURL(this.getRequestURL()+"?"+y);}}else{y=null;}this.getRequestObject().open(s,x);if(G){this.getRequestObject().setRequestHeader("Cache-Control","no-store, no-cache, must-revalidate");this.getRequestObject().setRequestHeader("Cache-Control","post-check=0, pre-check=0");this.getRequestObject().setRequestHeader("Pragma","no-cache");}if(this.getRequestMethod().toUpperCase()=="POST"&&y.length>0){this.getRequestObject().setRequestHeader("Content-type","application/x-www-form-urlencoded; encoding=UTF-8");}this.getRequestObject().send(this.getRequestMethod().toUpperCase()=="POST"&&y!=null&&y.length>0?y:null);};return this;}