var tagAlvo = new Array('div', 'p', 'span', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'); 

var tamanhos = new Array('11px','12px','13px','14px','15px','16px','17px'); 

var tamanhoInicial = 3;   

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 resetaTamanho(idAlvo, tamanhoPadrao) {   
	if (!document.getElementById) 
		return;   
	
	var selecionados = null, i, j, tagsAlvo;  

	tamanhoInicial = tamanhoPadrao;

	if ( !( selecionados = document.getElementById( idAlvo ) ) ) 
		selecionados = document.getElementsByTagName( idAlvo )[ 0 ];      
	
	selecionados.style.fontSize = tamanhos[ tamanhoPadrao ];      
	
	for ( i = 0; i < tagAlvo.length; i++ ){     
			tagsAlvo = selecionados.getElementsByTagName( tagAlvo[ i ] );     
			for ( j = 0; j < tagsAlvo.length; j++ ) 
				tagsAlvo[ j ].style.fontSize = tamanhos[ tamanhoPadrao ];   
	} 
	
}