
var tagAlvo = new Array('FONT','P','SPAN');  
var tamanhos = new Array('9px','10px','11px','12px','13px','15px','16px','17px','18px','19px','20px','21px','22px' );
var tamanhoInicial = 5;   

function mudaTamanho( idAlvo,acao ){   

if (!document.getElementById) return   

var selecionados = null,tamanho = tamanhoInicial,i,j,tagsAlvo;   tamanho += acao;   

if ( tamanho < 0 ) tamanho = 0;
if ( acao == 2 ) tamanho = 3;
if ( tamanho > 12 ) tamanho = 12;   

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  

