//script para abrir popup

function OpenWindow(FileNameToOpen,largura,altura)

{

newWindow = window.open(FileNameToOpen,'newwin', 'width='+largura+', height='+altura+', toolbar=no, scrollbars=yes, location=no, left=100, top=100')

if (newWindow.open)

{

newWindow.focus()

}

}



// Início do código de Aumentar/ 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 ];

  }

}



function ContaCaracteres(){
   intCaracteres = 600 - document.comentario.Coment.value.length;
   if (intCaracteres > 0){
      document.comentario.caracteres.value = intCaracteres;
      return true;
   }
   else {
      document.comentario.caracteres.value = 0;
      document.comentario.Coment.value = document.comentario.Coment.value.substr(0,600)
      return false;
   }
}
