var flashboxLoadingImage="../icon/carregando.gif";var closeButton="../icon/fechar.gif";function getPageScroll(){var a;if(self.pageYOffset){a=self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){a=document.documentElement.scrollTop}else{if(document.body){a=document.body.scrollTop}}}arrayPageScroll=new Array("",a);return arrayPageScroll}function getPageSize(){var c,a;if(window.innerHeight&&window.scrollMaxY){c=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;a=document.body.scrollHeight}else{c=document.body.offsetWidth;a=document.body.offsetHeight}}var b,d;if(self.innerHeight){b=self.innerWidth;d=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){b=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body){b=document.body.clientWidth;d=document.body.clientHeight}}}if(a<d){pageHeight=d}else{pageHeight=a}if(c<b){pageWidth=b}else{pageWidth=c}arrayPageSize=new Array(pageWidth,pageHeight,b,d);return arrayPageSize}function pause(b){var a=new Date();var c=a.getTime()+b;while(true){a=new Date();if(a.getTime()>c){return}}}function getKey(a){if(a==null){keycode=event.keyCode}else{keycode=a.which}key=String.fromCharCode(keycode).toLowerCase();if(key=="x"){hideFlashbox()}}function listenKey(){document.onkeypress=getKey}function showFlashbox(b,u,a,m,c){try{pageTracker._trackEvent("Infografico",b,location.href)}catch(r){}hideFlash();var g=document.getElementById("flashboxOverlay");var n=document.getElementById("flashbox");var h=document.getElementById("flashboxCaption");var q=document.getElementById("flashboxIframe");var k=document.getElementById("flashboxLoadingImage");var l=document.getElementById("flashboxDetails");var d=document.getElementById("topoFlashbox");var t=getPageSize();var p=getPageScroll();if(k){k.style.top=(p[1]+((t[3]-k.height)/2)+"px");k.style.left=(((t[0]-k.width)/2)+"px");k.style.display="block"}g.style.height=(t[1]+"px");g.style.display="block";sitePath="../swf/";if(m!=null&&m!=""){sitePath=m}var f=document.location.toString();var o=f.search("\\?");if(o>1&&f.substring(o+1).search("=")>0){f=f.substring(o)}else{f=""}remXml=f.indexOf(".xml");if(remXml>-1){f=f.substring(0,remXml)+f.substring(remXml+4)}if(c){if(c!=""&&c=="Sim"){d.src=sitePath+"topoFlash.jpg";d.style.display="block"}}q.src=sitePath+b+f;q.width=u;q.height=a;q.marginheight="0";q.marginwidth="0";q.style.display="block";q.style.overflow="hidden";var s=p[1]+((t[3]-a)/2);var j=((t[0]-u)/2);n.style.top=(s<0)?"0px":s+"px";n.style.left=(j<0)?"0px":j+"px";l.style.width=u+"px";h.style.display="none";if(navigator.appVersion.indexOf("MSIE")!=-1){pause(250)}if(k){k.style.display="none"}selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="hidden"}n.style.display="block";t=getPageSize();g.style.height=(t[1]+"px");listenKey()}function hideFlashbox(){showFlash();objOverlay=document.getElementById("flashboxOverlay");objFlashbox=document.getElementById("flashbox");objIframe=document.getElementById("flashboxIframe");objOverlay.style.display="none";objFlashbox.style.display="none";objIframe.style.display="none";objIframe.src="about:blank";selects=document.getElementsByTagName("select");for(i=0;i!=selects.length;i++){selects[i].style.visibility="visible"}document.onkeypress=""}var initiated=false;function initFlashbox(){if(!document.getElementsByTagName){return}var n=document.getElementsByTagName("body").item(0);var m=document.createElement("div");m.setAttribute("id","flashboxOverlay");m.onclick=function(){hideFlashbox();return false};m.style.display="none";m.style.position="absolute";m.style.top="0";m.style.left="0";m.style.zIndex="90";m.style.width="100%";n.insertBefore(m,n.firstChild);var f=getPageSize();var g=getPageScroll();var h=new Image();h.onload=function(){var p=document.createElement("a");p.setAttribute("href","#");p.onclick=function(){hideFlashbox();return false};m.appendChild(p);var o=document.createElement("img");o.src=flashboxLoadingImage;o.setAttribute("id","flashboxLoadingImage");o.style.position="absolute";o.style.zIndex="150";o.style.width="auto";o.style.height="auto";p.appendChild(o);h.onload=function(){};return false};h.src=flashboxLoadingImage;var b=document.createElement("div");b.setAttribute("id","flashbox");b.style.display="none";b.style.position="absolute";b.style.zIndex="100";n.insertBefore(b,m.nextSibling);var c=document.createElement("a");c.setAttribute("href","#");c.setAttribute("title","Fechar");c.onclick=function(){hideFlashbox();return false};b.appendChild(c);var j=document.createElement("img");j.setAttribute("id","topoFlashbox");j.style.display="none";c.appendChild(j);var k=new Image();k.onload=function(){var o=document.createElement("img");o.src=closeButton;o.setAttribute("id","closeButton");o.style.position="absolute";o.style.zIndex="200";c.appendChild(o);return false};var d=document.createElement("iframe");d.setAttribute("id","flashboxIframe");d.style.display="none";c.appendChild(d);var l=document.createElement("div");l.setAttribute("id","flashboxDetails");b.appendChild(l);var e=document.createElement("div");e.setAttribute("id","flashboxCaption");e.style.display="none";l.appendChild(e);var a=document.createElement("div");a.setAttribute("id","flashboxKeyboardMsg");a.innerHTML='<a href="#" onclick="hideFlashbox(); return false;"><img src="../icon/fechar.gif" /></a>';l.appendChild(a);initiated=true}function addEvent(d,c,a){if(d.addEventListener){d.addEventListener(c,a,false);return true}else{if(d.attachEvent){var b=d.attachEvent("on"+c,a);return b}else{return false}}}addEvent(window,"load",initFlashbox);function getParameters(){var c=new Object();var a=document.location.toString();var e=a.search("\\?");if(e>1&&a.substring(e+1).search("=")>0){a=a.substring(e+1);var b=a.split("&");for(i=0;i<b.length;i++){var d=b[i].split("=");c[d[0]]=d[1]}}return c}function showFlashOnLoad(){if(initiated){window.clearInterval(showFlashOnLoadInterval);showFlashbox(parms.url,parms.width,parms.height,parms.site)}}function showFlash(){var b=document.getElementsByTagName("object");for(i=0;i!=b.length;i++){b[i].style.visibility="visible"}var a=document.getElementsByTagName("embeds");for(i=0;i!=a.length;i++){a[i].style.visibility="visible"}}function hideFlash(){var b=document.getElementsByTagName("object");for(i=0;i!=b.length;i++){b[i].style.visibility="hidden"}var a=document.getElementsByTagName("embeds");for(i=0;i!=a.length;i++){a[i].style.visibility="hidden"}}var parms=getParameters();var showFlashOnLoadInterval;if(parms.url&&parms.width&&parms.height&&parms.site){showFlashOnLoadInterval=window.setInterval("showFlashOnLoad()",100)};

