// JavaScript Document


function AbrePagina(perfil, tamx, tamy, yn) {
	lf = Math.floor(screen.width/2) - Math.floor(tamx/2);
	tp = Math.floor(screen.height/2) - Math.floor(tamy/2);
	window.open(perfil,"","resizable=no,toolbar=no,status=no,menubar=no,scrollbars=" + yn + ",width=" + tamx + ",height=" + tamy + ", left = " + lf + ", top = " + tp)
}



max = 1200; // mude aqui para o máximo de caracteres permitidos
function mostra(string) {
document.form1.contador.value=string.length + 1;
if(document.form1.contador.value == max)
return false; }


  function toggleDiv(divid){
    if(document.getElementById(divid).style.display == 'none'){
      document.getElementById(divid).style.display = 'block';
    }else{
      document.getElementById(divid).style.display = 'none';
    }
  }
  
  

// Início do código de Aumentar e Diminuir a letra   
// Para usar coloque o comando: "javascript:mudaTamanho('tag_ou_id_alvo', -1);" //para diminuir 
// e o comando "javascript:mudaTamanho('tag_ou_id_alvo', +1);" para aumentar   

var tagAlvo = new Array('p'); //pega todas as tags p//   

// Especificando os possíveis tamanhos de fontes, poderia ser: x-small, small... 

var tamanhos = new Array( '9px','10px','11px','12px','13px','14px','15px' ); 
var tamanhoInicial = 2;   function mudaTamanho( idAlvo,acao ){
   if (!document.getElementById) return   
	var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;   
	tamanho += acao;   
	if ( tamanho < 0 ) tamanho = 0;   
	if ( tamanho > 6 ) tamanho = 6;   tamanhoInicial = tamanho;   
	if ( !( selecionados = document.getElementById( idAlvo ) ) ) selecionados = document.getElementsByTagName( idAlvo )[ 0 ];      
	selecionados.style.fontSize = tamanhos[ tamanho ];      
	for ( i = 0; i < tagAlvo.length; i++ ){     
		tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );     
		for ( j = 0; j < tagsAlvo.length; j++ ) tagsAlvo[ j ].style.fontSize = tamanhos[ tamanho ];   } } 
// Fim do código de Aumentar/ Diminuir a letra   

