// JavaScript Document //.:: Biblioteca criada por Eric Bastos Duboc ::.// /* Funções nesta biblioteca: function simulaLink(tag) //Deixa o texto com as características de link (texto sublinhado e cursor 'hand') function semLink(tag) //Retira do texto as características de link (texto sublinhado e cursor 'hand') function exibe(trID) //Exibe um elemento com determinado ID function oculta(trID) //Oculta um elemento com determinado ID function relogiot(elementID) //Esta função escreve a data, em um determinado elemento, no formato deste exemplo: //Quinta-feira, 6 de Julho de 2006 16:06:52 //Para utilizá-la basta chamá-la no evento onLoad da tag body da seguinte forma: //«body onLoad=relogiot("id_do_objeto");> function MM_reloadPage(init) //Função útil ao navegador Netscape(versão 4) function ocultar(objeto) //Oculta o objeto que possui o ID passado pelo parâmetro "objeto" function exibir(objeto) //Exibe o objeto que possui o ID passado pelo parâmetro "objeto" function poeFoco() //Poe o foco no primeiro elemento do tipo text da pagina */ over = function() { var elem = document.getElementById("nav"); if(elem) { var sfEls = elem.getElementsByTagName("LI"); for (var i = 0 ; i < sfEls.length ; i++) { sfEls[i].onmouseover = function() { this.className += " over"; } sfEls[i].onmouseout = function() { this.className = this.className.replace(new RegExp(" over\\b"), ""); } } } } if (window.attachEvent) { window.attachEvent("onload", over); } //Deixa o texto com as características de link (texto sublinhado e cursor 'hand') function simulaLink(tag) { tag.style.textDecoration = "underline"; tag.style.cursor = "hand"; } //Retira do texto as características de link (texto sublinhado e cursor 'hand') function semLink(tag) { tag.style.textDecoration = "none"; tag.style.cursor = "auto"; } //Exibe um elemento com determinado ID function exibe(trID) { var z = document.getElementById(trID); z.style.display = "block"; } //Oculta um elemento com determinado ID function oculta(trID) { var z = document.getElementById(trID); z.style.display = "none"; } //Esta variável é utilizada na função relogiot //////////////////////////////////////////////////////////////////////////////////////////////////////////////// callerdate = new Date(2024,4,28,15,38,14); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Esta função escreve a data, em um determinado elemento, no formato deste exemplo: //Quinta-feira, 6 de Julho de 2006 16:06:52 //Para utilizá-la basta chamá-la no evento onLoad da tag body da seguinte forma: //«body onLoad=relogiot("id_do_objeto");> function relogiot(elementID) { setTimeout("relogiot(\"" + elementID + "\");",1000); callerdate.setTime(callerdate.getTime()+1000); var hh = String(callerdate.getHours()); var mm = String(callerdate.getMinutes()); var ss = String(callerdate.getSeconds()); var semana = ["Domingo", "Segunda-feira", "Terça-feira", "Quarta-feira", "Quinta-feira", "Sexta-feira", "Sábado"]; var mes = ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"]; var data = new Date(); txt_field = document.getElementById(elementID); if ( txt_field ) { txt_field.innerHTML = /*semana[data.getDay()] +*/ 'Volta Redonda, ' + data.getDate() + ' de ' + mes[data.getMonth()] + ' de ' + data.getFullYear() + ' - ' + ((hh < 10) ? " " : "") + hh + ((mm < 10) ? ":0" : ":") + mm + ((ss < 10) ? ":0" : ":") + ss; } } //Função útil ao navegador Netscape (versão 4) function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) { with (navigator) { if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; } } } else { if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) { location.reload(); } } } //Chama a função MM_reloadPage para identificar o navegador, quando a página for carregada. MM_reloadPage(true); //Oculta o objeto que possui o ID passado pelo parâmetro "objeto" function ocultar(objeto) { var elemento = document.getElementById(objeto); elemento.style.visibility = "hidden"; } //Exibe o objeto que possui o ID passado pelo parâmetro "objeto" function exibir(objeto) { var elemento = document.getElementById(objeto); elemento.style.visibility = "visible"; } //Retorna a string passada por parâmetro sem os espaços em branco do início e do fim. function allTrim(str) { while (str.charAt(0) == " ") str = str.substr(1,str.length -1); while (str.charAt(str.length-1) == " ") str = str.substr(0,str.length-1); return str; } //Poe o foco no primeiro elemento do tipo text da pagina function poeFoco() { if (document.forms[0] != null) { for (i = 0; i < document.forms[0].elements.length; i++) { if (document.forms[0].elements[i].type == 'text') { document.forms[0].elements[i].focus(); return true; } } } }