// JavaScript Document
	var topo = -1;
	
	
	function ir_para_topo(){topo = -2;}
	function retroceder_qts(){history.go( topo );}
	
	
	function mostrar_controlos()
	{
		if ( document.getElementById( 'mensagem_div' ) && document.getElementById( 'mensagem_div' ).innerHTML != '' )
		{
			document.getElementById( 'mensagem_div' ).className = 'aviso';
			setTimeout( "document.getElementById( 'mensagem_div' ).className = 'div_escondido'" , 15000 );
		}
		
		if ( document.getElementById( 'links_controlo' ) && history.length > 1 )
			document.getElementById( 'links_controlo' ).className = '';
	}
	
	
	
	function mostrar_div_mapasite( id ){
		if ( !document.getElementById( 'div_' + id ) ) return;

		if ( document.getElementById( 'div_' + id ).className == 'div_escondido' )
		{
			document.getElementById( 'span_' + id ).innerHTML = '&uarr; ';
			document.getElementById( 'div_' + id ).className = 'div_visivel';
		}	
		else
		{
			document.getElementById( 'span_' + id ).innerHTML = '&darr; ';
			document.getElementById( 'div_' + id ).className = 'div_escondido';
		}
	}
	
	
	
	var last_index = null;

	function mostrar_noticia( index )
	{
		if ( document.getElementById( 'noticia_resumo_' + index ).className == 'noticia_texto' )
		{
			document.getElementById( 'noticia_resumo_' + index ).className = 'div_escondido';
			document.getElementById( 'noticia_corpo_' + index ).className = 'noticia_texto';
		}
		else
		{
			document.getElementById( 'noticia_corpo_' + index ).className = 'div_escondido';
			document.getElementById( 'noticia_resumo_' + index ).className = 'noticia_texto';
		}

		if ( last_index ) 
			if ( last_index != index )
			{
				document.getElementById( 'noticia_corpo_' + last_index ).className = 'div_escondido';
				document.getElementById( 'noticia_resumo_' + last_index ).className = 'noticia_texto';
			}
		last_index = index;
	}
	
	