var logo="http://www.byteon.com.br/carregando_byteon.gif";
var linkLogo="";
var arquivoFlash="";
var larguraFlash=0;
var alturaFlash=0;
var texto="";
var corTexto="#0e8a06";
var corFundo="#FFFFFF"; 
var tempo=3;
var textoFechar="";
//================= NAO MEXER ABAIXO
function pegaMedidas(rolagem){var larguraPag, alturaPag;if (self.innerHeight){larguraPag=self.innerWidth;alturaPag=self.innerHeight;} else if(document.documentElement && document.documentElement.clientHeight){larguraPag=document.documentElement.clientWidth;alturaPag=document.documentElement.clientHeight;} else if (document.body) {larguraPag=document.body.clientWidth;alturaPag=document.body.clientHeight;}if(rolagem){var rolagemH, rolagemV;if (window.innerHeight && window.scrollMaxY) {rolagemH=document.body.scrollWidth;rolagemV=window.innerHeight + window.scrollMaxY;} else if (document.body.scrollHeight > document.body.offsetHeight){ rolagemH=document.body.scrollWidth;rolagemV=document.body.scrollHeight;} else if(document.body.offsetWidth) {rolagemH=document.body.offsetWidth;rolagemV=document.body.offsetHeight;}if(rolagemV > alturaPag) {alturaPag=rolagemV;if(/Internet Explorer/.test(navigator.appName)) alturaPag+=30;}if(rolagemH > larguraPag) larguraPag=rolagemH;}valores=new Array(larguraPag,alturaPag); return valores;}medidas=pegaMedidas(true); larguraPag=medidas[0];alturaPag=medidas[1];var objBody=document.getElementsByTagName("body").item(0);objBody.style.margin="0px";objBody.style.padding="0px";objBody.style.overflowX="hidden";objBody.style.overflowY="hidden";var objFundo=document.createElement("div");objFundo.setAttribute('id','carrega_fundo');objFundo.style.position="absolute"; objFundo.style.top="0px";objFundo.style.left="0px";objFundo.style.margin="0px";objFundo.style.padding="0px";objFundo.style.width=larguraPag+"px";objFundo.style.height=alturaPag+"px";objFundo.style.background=corFundo;objFundo.style.zIndex=999;objBody.appendChild(objFundo);if(arquivoFlash==""){if(linkLogo!=""){var objLinkLogo=document.createElement("a");objLinkLogo.setAttribute('id','link_logo'); objLinkLogo.setAttribute('href', linkLogo);objFundo.appendChild(objLinkLogo);}var objImagemLoad=document.createElement("img");objImagemLoad.setAttribute('id','img_loading');objImagemLoad.src=logo;objImagemLoad.style.position='absolute';objImagemLoad.style.left='50%';objImagemLoad.style.top='50%';objImagemLoad.style.border='none';objImagemLoad.style.display="none";
objImagemLoad.onload=function(){this.style.display="";var mT=this.offsetHeight+5;var mL=Math.ceil(this.offsetWidth/2);if(mT<10) mt=10; if(mL<10) mL=10;this.style.marginLeft=-mL+"px";this.style.marginTop=-mT+"px";}
if(linkLogo!=""){objLinkLogo.appendChild(objImagemLoad);} else {objFundo.appendChild(objImagemLoad);}} else {var me=Math.ceil(larguraFlash/2);var mt=alturaFlash;document.getElementById("carrega_fundo").innerHTML="<object id='flash_carrega' style='position:absolute;top:50%;left:50%; margin-left:-"+me+"px; margin-top:-"+mt+"px' rel='escondido' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+larguraFlash+"' height='"+alturaFlash+"'><param name='movie' value='"+arquivoFlash+"'><param name='quality' value='best'><embed src='"+arquivoFlash+"' style='position:absolute;top:50%;left:50%; margin-left:-"+me+"px; margin-top:-"+mt+"px' quality='best' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+larguraFlash+"' height='"+alturaFlash+"'></embed></object>";}var objTexto=document.createElement("div");objTexto.setAttribute('id','carrega_texto'); objTexto.style.position="absolute"; objTexto.style.left='50%';objTexto.style.top='50%';objTexto.style.color=corTexto;objTexto.style.fontSize='14px';objTexto.style.fontWeight='bold';objTexto.style.marginTop='10px';objTexto.innerHTML=texto;objFundo.appendChild(objTexto);var larguraT=document.getElementById("carrega_texto").offsetWidth;document.getElementById("carrega_texto").style.marginLeft=-(larguraT/2)+"px";var objLink=document.createElement("a");objLink.setAttribute('id','fechar_carregando');objLink.setAttribute('href','javascript:void(0)');objLink.onclick=fecha;objLink.style.position="absolute"; objLink.style.left='50%';objLink.style.top='50%';objLink.style.color=corTexto;objLink.style.fontSize='10px';objLink.style.margin='95px 0';objLink.innerHTML=textoFechar;objFundo.appendChild(objLink);var larguraL=document.getElementById("fechar_carregando").offsetWidth;document.getElementById("fechar_carregando").style.marginLeft=-(larguraL/2)+"px";function carregando(){objBody.style.overflowX="hidden";objBody.style.overflowY="hidden";document.getElementById("carrega_fundo").style.display="";}function fecha(){tempo=0;some();}function some(){if(tempo==0){document.getElementById("carrega_fundo").style.display="none";	objBody.style.overflowX="";objBody.style.overflowY="";var todosFla=document.getElementsByTagName("object");var totalFla=todosFla.length;for (var i=0; i<totalFla; i++){ var cada_Fla=todosFla[i];if(cada_Fla.getAttribute("rel")!="escondido"){cada_Fla.style.display="";}}} else {tempo=Math.ceil(tempo*1000);setTimeout("some()",tempo);tempo=0;}}function adicionarEvento(objeto, TipoEvento, funcao){if(objeto.addEventListener){ objeto.addEventListener(TipoEvento, funcao, false);return true;} else if (objeto.attachEvent){ var r=objeto.attachEvent('on'+TipoEvento, funcao);return r;} else {return false;}}adicionarEvento(window,"load", some);