// Efetue resize de imagens cujo tamanho seja superior ao tamanho máximo definido
function resizeImages() 
{ 

	/* se existir imagens na pagina */
	if (document.images.length > 0)
	{ 

		/* tamanho maximo da imagem */
		var maxWidth = 500;

		var imageName;
		var imgHeight; 
		var imgWidth; 

		/* loop em todas as imagens do html */
		for (var loop = 0; loop < document.images.length; loop++) 
		{ 

			imageName = document.images[loop].src;

			/* only change images with the width biger then the maxwidth */
			if ( ( document.images[loop].width > maxWidth ) && ( imageName.search("./skin") == -1 ) )
			{

				imgWidth = document.images[loop].width; 
				imgHeight = document.images[loop].height; 

				//Proportionalize Height 
				imgHeight = imgHeight / (imgWidth / maxWidth ); 

				/* altera a largura e altura da imagem */
				document.images[loop].width = maxWidth;
				document.images[loop].height = imgHeight;
				
			}

		} 
	} 
} 

// Esconde determinado elemento
function HideFrame(id) {

	var link   = document.getElementById ('link_' + id );
	var tabela = document.getElementById ('frame_' + id );

	link.innerHTML = '<strong><a href="javascript:ShowFrame(' + id + ')">+</a></strong>';
	tabela.style.display = 'none';
	return;

}

// Exibe determinado elemento
function ShowFrame(id) {

	var link   = document.getElementById ('link_' + id );
	var tabela = document.getElementById ('frame_' + id );

	link.innerHTML = '<strong><a href="javascript:HideFrame(' + id + ')">-</a></strong>';
	tabela.style.display = '';
	return;
}

