	// Funcoes para mostrar ou ocultar objetos
	function mostra(objeto) {
		if(document.all) { // IE4+
			elemento = 'document.all[\'' + objeto + '\']';
		} else { // NS6+
			elemento = 'document.getElementById(\'' + objeto + '\')';
		}
		if(elemento) eval(elemento).style.display = 'block';
	}

	function esconde(objeto) {
		if(document.all) { // IE4+
			elemento = 'document.all[\'' + objeto + '\']';
		} else { // NS6+
			elemento = 'document.getElementById(\'' + objeto + '\')';
		}
		if(elemento) eval(elemento).style.display = 'none';
	}
	
	function escondetodos() {
		elemento = 'document.getElementById(\'imagem1\')';
		eval(elemento).style.display = 'none';
		elemento = 'document.getElementById(\'imagem2\')';
		eval(elemento).style.display = 'none';
		elemento = 'document.getElementById(\'imagem3\')';
		eval(elemento).style.display = 'none';
		elemento = 'document.getElementById(\'imagem4\')';
		eval(elemento).style.display = 'none';
	}

	function mostraEsconde(objeto,escondeBusca) {
		if(document.all) { // IE4+
			elemento = 'document.all[\'' + objeto + '\']';
		} else { // NS6+
			elemento = 'document.getElementById(\'' + objeto + '\')';
		}
		if (eval(elemento).style.display == 'block' || eval(elemento).style.display == '') {
			if(escondeBusca){
				document.getElementById('catBusca').style.display = 'inline';
			}
			eval(elemento).style.display = 'none';
		} else {
			if(escondeBusca){
				document.getElementById('catBusca').style.display = 'none';
			}
			eval(elemento).style.display = 'block';
		}
	}
	
	function inicia() {
	if (typeof init == "function") {
		init();
	}
}

function init() {
	velocidadeMax = 3;
	velocidadeAtual = velocidadeMax;
	timeDelay = 33;
	intervalDist = 10;
	largura = 420;
	path = marquee.NoticiaRotativa.style;
	path.left = largura + 5;
	path.display = "block";
	setInterval(move,timeDelay);
}

function pxToInt(value) {
	return parseInt(value.substr(0,value.length-2));
}

function move() {
	var posAtual = pxToInt(path.left) - velocidadeAtual;
	if(document.getElementById) {
		path.left = posAtual;
	} else {
		marquee.noticias.left = posAtual;
	}
	
	if (posAtual * -1 >= intervalDist + marquee.NoticiaRotativa.width)
		path.left = largura + 5;
}

function aceleraFreia() {
	if (arguments[0]) {
		velocidadeAtual = velocidadeMax;
	} else {
		velocidadeAtual = 0;
	}
}

function mostraFoto(objeto, imagem) {
	document.getElementById('imgFoto').src = '../arquivos/galeria/' + imagem;
	document.getElementById('imgFoto').style.display = 'block';
	elemento = 'document.getElementById(\'' + objeto + '\')';
	eval(elemento).style.display = 'block';
}

function fechar() {
	document.getElementById('imgFoto').src = 'imagens/transparente.gif';
	esconde('detalhes');
}

	// Funcao para abrir janela que sera dimensionada
function abrirImagem (param) {
	novaJanela = window.open(param, 'Imagem', 'width=1,height=1,left=0,top=0'); 
	novaJanela.focus();
}

// Funcao para dimencionar a janela de acordo com o tamanho da imagem
function dimencionarJanela(){
	if ((screen.Width <= (document.images.imagem_selecionada.width)) && (screen.availHeight <= (document.images.imagem_selecionada.height))) {
		window.resizeTo(screen.Width, screen.availHeight);
		} else {
			window.resizeTo(document.images.imagem_selecionada.width+20,document.images.imagem_selecionada.height+105);
	}
}	
