var meuVoto=-1; var fotos; var ft_2; var mes; var ano; var data; var fdv=new Array(); function mostra(tipo,oque){ document.getElementById('prepara').style.visibility='hidden'; document.getElementById(tipo).innerHTML=oque; } function prepara_fotos(){ ft_2=fotos.split("*"); np1=parseInt((ft_2.length-1)/9); np2=(ft_2.length-1)/9; if (np1==np2){ numero_de_paginas=np1; } else{ numero_de_paginas=np1+1; } kvc=eval("document.forms['mudafotos'].mf"); kvc.length=numero_de_paginas; for (x=0;x"; document.getElementById('fvp_').innerHTML=nimagem; document.getElementById('fotoint').style.visibility='visible'; } function fecha_fiv(){ document.getElementById('fotoint').style.visibility='hidden'; document.forms['mudafotos'].style.visibility='visible'; } function busca(tipo){ document.getElementById('centro').innerHTML="








"; document.getElementById('espera').style.visibility='visible'; switch (tipo){ case ('noticias'): caminho="js/"+tipo+".js?inicio="+pp+"&nitens="+pv+"&tipo="+tipo+"&t="+agora(); break; case ('artigos'): caminho="js/"+tipo+".js?inicio="+pp+"&nitens="+pv+"&tipo="+tipo+"&t="+agora(); break; case ('corpo'): caminho="js/textos.js?tipo='corpo'&corpo="+corpo+"&t="+agora(); break case ('fotos'): caminho="js/fotos.js?t="+agora(); break default: caminho="js/"+tipo+".js?t="+agora(); break; } pega(caminho); } function contador_(){ caminho="js/contador.js?t="+agora(); pega2(caminho); } function buscaInt(id){ document.getElementById('centro').innerHTML="
"; document.getElementById('espera').style.visibility='visible'; caminho="js/buscaI.js?t="+agora()+"&id="+id; pega(caminho); } function buscaInt2(id){ document.getElementById('centro').innerHTML="
"; document.getElementById('espera').style.visibility='visible'; caminho="js/buscaI2.js?t="+agora()+"&id="+id; pega(caminho); } function nav(tipo){ document.getElementById('centro').innerHTML="
"; document.getElementById('espera').style.visibility='visible'; document.forms['pagina'].tipo.value=tipo; document.forms['pagina'].submit(); } function pega(caminho){ //document.getElementById('news').src=caminho; var head = document.getElementsByTagName('head').item(0); var old = document.getElementById('news'); if (old) head.removeChild(old); script = document.createElement('script'); script.src = caminho ; script.type = 'text/javascript'; script.defer = false; script.id = 'news'; void(head.appendChild(script)); } function pega2(caminho){ //document.getElementById('news').src=caminho; var head = document.getElementsByTagName('head').item(0); var old = document.getElementById('news2'); if (old) head.removeChild(old); script = document.createElement('script'); script.src = caminho ; script.type = 'text/javascript'; script.defer = false; script.id = 'news2'; void(head.appendChild(script)); } function mostra(texto){ document.getElementById('espera').style.visibility='hidden'; document.getElementById('centro').innerHTML=texto; } function agora(){ data=new Date(); ag=data.getTime(); return ag; } function monta_paginador(npg){ npi=parseInt(npg/12); resto=npg-npi; linha=""; pdv=0; for (xnp=0;xnp►"+(xnp+1)+"   "; pdv=xnp; } if (resto>0){ linha+="►"+(pdv+2)+"  "; } document.getElementById('paginador').innerHTML=linha ; } function mpf(inicio){ caminho="js/pegaIds.js?inicio="+inicio+"&tipo="+galeria; pega(caminho); fotonova=""; document.getElementById('pagina_fotos').innerHTML=fotonova; } function mf(f){ document.getElementById('foto').style.backgroundColor='#FEFDFB'; caminho="js/mostrafotos.js?idf="+fotosDV[(f-1)]+"&galeria="+galeria; document.getElementById('foto').style.visibility='visible'; document.getElementById('fotoI').innerHTML=""; pega(caminho); } function votar(){ if(meuVoto>=0){ caminho="js/votar.js?t="+agora(); caminho+="&voto="+meuVoto; caminho+="&enquete="+document.forms['formEnq'].enquete.value; document.getElementById('centro').innerHTML=""; document.getElementById('espera').style.visibility='visible'; pega(caminho); } else{ alert("Escolha uma opção."); } } function buscador(){ termoP=document.forms['pesquisa'].termo.value; caminho="js/buscador.js?t="+agora()+"&termoP="+termoP ; pega(caminho); } var pp=0; //primeiro regitro var tp=0; //total de registros var pv=15; // registros por página var pdv=0; // item da vez var tipo='noticias'; var corpo='trajetoria'; function cria_paginador(){ kp=" Páginas: "; total=parseInt(tp/pv); resto=tp-total; if (resto>0){ total+=1; } for (x=0;x"+(x+1)+"\n"; } //alert(kp); document.getElementById('paginador').innerHTML=kp; pag2="pgg"+pdv; document.getElementById(pag2).style.fontWeight='bold'; document.getElementById(pag2).style.backgroundColor='#f60'; document.getElementById(pag2).style.color='#fff'; }