function limpar_busca(e,d,f){d.value=e;d.onfocus=function(){f1=true;if(this.value==e){this.value=""}};d.onblur=function(){f1=false;if(this.value==""){this.value=e}};f.onsubmit=function(){tp1=d.value.replace(/^\s+|\s+$/g,"");if(tp1==""){if(!f1){d.value=e}return false}if(d.value==e){return false}}}function preparar_dimAumFonte(){body=$$("html body");$("diminuirFonte").onclick=function(){body.each(function(a){a.setStyle({fontSize:".7em"})})};$("aumentarFonte").onclick=function(){body.each(function(a){a.setStyle({fontSize:".8em"})})}}function linkar_vitoriaAZ(){$("lst_vitoriaAZ").onchange=function(){if($("lst_vitoriaAZ").value!=0){location.href=this.value}}}function focar_busca(){$("pular").down(4).onclick=function(){$("txt_busca").focus();return false}}function esconder_item_pular(){se_existir("menuEsquerda",function(){$("pular").down(5).insert({after:'<li><a href="#atalho_menuInterno" accesskey="9">Pular para o menu do conte&uacute;do [<kbd>accesskey 9</kbd>]</a></li>'})})}function preparar_botoes(){preparar_dimAumFonte();$$("#imprimir a").each(function(a){a.onclick=function(){imprimir();return false}})}var currentMenu=null;var lastMenuStarter=null;var mytimer=null;var timerOn=false;if(!document.getElementById){document.getElementById=function(){return null}}function initialiseDummy(c,d){c.onmouseover=function(){containingMenu=this.parentNode.parentNode;for(var a=0;a<containingMenu.childNodes.length;a++){if(containingMenu.childNodes[a].nodeName.toUpperCase()=="LI"){if(containingMenu.childNodes[a].getElementsByTagName("ul").length>0){containingMenu.childNodes[a].getElementsByTagName("UL").item(0).style.visibility="hidden"}}}};c.onfocus=function(){c.onmouseover()}}function initialiseMenu(g,h,f){var e=false;if(g==null||h==null){return}currentMenu=g;h.onmouseover=function(){if(currentMenu){if(this.parentNode.parentNode!=currentMenu){currentMenu.style.visibility="hidden";hideAllMenus(currentMenu,f)}if(this.parentNode.parentNode==f){while(currentMenu.parentNode.parentNode!=f){currentMenu.parentNode.parentNode.style.visibility="hidden";currentMenu=currentMenu.parentNode.parentNode}}currentMenu=null;this.showMenu()}};g.onmouseover=function(){if(currentMenu){currentMenu=null;this.showMenu()}};h.showMenu=function(){if(1==1){if(this.parentNode.parentNode==f){g.style.left=this.offsetLeft+"px";g.style.top=this.offsetTop+this.offsetHeight+"px";if(g.offsetWidth<this.offsetWidth){g.style.width=this.offsetWidth}}else{g.style.left=this.offsetLeft+this.offsetWidth+"px";g.style.top=this.offsetTop+"px"}}g.style.visibility="visible";currentMenu=g};h.onfocus=function(){h.onmouseover()};g.onfocus=function(){};g.showMenu=function(){g.style.visibility="visible";currentMenu=g;stopTime()};g.hideMenu=function(){if(!timerOn){mytimer=setInterval("killMenu('"+this.id+"', '"+f.id+"');",2000);timerOn=true;for(var a=0;a<g.childNodes.length;a++){if(g.childNodes[a].nodeName=="LI"){if(g.childNodes[a].getElementsByTagName("UL").length>0){menuItem=g.childNodes[a].getElementsByTagName("UL").item(0);menuItem.style.visibility="hidden"}}}}};g.onmouseout=function(a){this.hideMenu()};g.onblur=function(){this.hideMenu()};h.onmouseout=function(){for(var a=0;a<g.childNodes.length;a++){if(g.childNodes[a].nodeName=="LI"){if(g.childNodes[a].getElementsByTagName("UL").length>0){menuItem=g.childNodes[a].getElementsByTagName("UL").item(0);menuItem.style.visibility="hidden"}}}g.style.visibility="hidden"}}function killMenu(f,d){var f=document.getElementById(f);var d=document.getElementById(d);f.style.visibility="hidden";for(var e=0;e<f.childNodes.length;e++){if(f.childNodes[e].nodeName=="LI"){if(f.childNodes[e].getElementsByTagName("UL").length>0){menuItem=f.childNodes[e].getElementsByTagName("UL").item(0);menuItem.style.visibility="hidden"}}}while(f.parentNode.parentNode!=d){f.parentNode.parentNode.style.visibility="hidden";f=f.parentNode.parentNode}stopTime()}function stopTime(){if(mytimer){clearInterval(mytimer);mytimer=null;timerOn=false}}window.onload=function(){var d=document.getElementById("menuList");var c=d.offsetLeft;getMenus(d,d)};function getMenus(k,l){var i;var g;var j;for(var h=0;h<k.childNodes.length;h++){if(k.childNodes[h].nodeName.toUpperCase()=="LI"){if(k.childNodes[h].getElementsByTagName("ul").length>0){g=k.childNodes[h].getElementsByTagName("A").item(0);j=k.childNodes[h].getElementsByTagName("UL").item(0);getMenus(j,l);initialiseMenu(j,g,l)}else{initialiseDummy(k.childNodes[h].getElementsByTagName("A").item(0),l)}}}}function hideAllMenus(f,d){for(var e=0;e<f.childNodes.length;e++){if(f.childNodes[e].nodeName.toUpperCase()=="LI"){if(f.childNodes[e].getElementsByTagName("ul").length>0){f.childNodes[e].getElementsByTagName("UL").item(0).style.visibility="hidden";hideAllMenus(f.childNodes[e].getElementsByTagName("UL").item(0),d)}}}};
