function mudaCor(id)
{
	var nome;
	nome = "texto_menu"+id;
	document.getElementById(id).style.background = "#d71921";	
	document.getElementById(nome).style.color = "#FFFFFF";
}

function fgo(at, pro){
	document.getElementById(at).style.display = "none";
	document.getElementById(pro).style.display = "inline";
}

function fback(at, ant){
	document.getElementById(at).style.display = "none";
	document.getElementById(ant).style.display = "inline";
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
function voltaCor(id)
{
	var nome;
	nome = "texto_menu"+id;
	document.getElementById(id).style.background = "#e6e6e6";	
	document.getElementById(nome).style.color = "#4d4d4d";
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
var valor, valorTexto;
valor = 0;
valorTexto = 0;
function mudaTamanho(val)
{
	if(valor == 0 && valorTexto == 0){
		document.getElementById('titulo-noticias').style.fontSize = 20;
		valor = 20;
		document.getElementById('texto-noticias').style.fontSize = 11;
		valorTexto = 11;
		
		valor = valor + val;
		document.getElementById('titulo-noticias').style.fontSize = valor;
		valorTexto = valorTexto + val;
		document.getElementById('texto-noticias').style.fontSize = valorTexto;
	}
	else{
		if((valorTexto >= 5 && val == 1) || (valorTexto != 5 && val == -1))
		{	
			valor = valor + val;
			document.getElementById('titulo-noticias').style.fontSize = valor;
			valorTexto = valorTexto + val;
			document.getElementById('texto-noticias').style.fontSize = valorTexto;
		}
	}
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function EnviaBusca()
{
	document.frm_pesquisa.submit();	
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function Envia()
{
	validaFormulario();	
}
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function EnviaOpine()
{
	validaOpine();	
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function imprimir(aURL,nomeJanela,features) 
{ 
	window.open(aURL,nomeJanela,features); 
} 



//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*function escolheNoticia(codigo)
{
	alert(codigo);
	open.location.href = "noticias.php";
}*/



//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

function validaFormulario()
 {
	 if(document.frm_contato.nome.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_contato.nome.style.background = "#fc5a5a";
		 document.frm_contato.nome.focus();
	 }
	else
	 {
		document.frm_contato.nome.style.background = "#FFFFFF";
		validaCidade();
	 } 
 }
 function validaCidade()
 {
	 if(document.frm_contato.cidade.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_contato.cidade.style.background = "#fc5a5a";
		 document.frm_contato.cidade.focus();
	 }
	else
	 {
		document.frm_contato.cidade.style.background = "#FFFFFF";
		validaEmail();
	 } 
 }
 
 function validaEmail()
 {
	 if(document.frm_contato.email.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_contato.email.style.background = "#fc5a5a";
		 document.frm_contato.email.focus();
	 }
	else
	 {
		document.frm_contato.email.style.background = "#FFFFFF";
		validaAssunto();
	 } 
 }
 
 function validaAssunto()
 {
	 if(document.frm_contato.assunto.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_contato.assunto.style.background = "#fc5a5a";
		 document.frm_contato.assunto.focus();
	 }
	else
	 {
		document.frm_contato.assunto.style.background = "#FFFFFF";
		validaMsg();
	 } 
 }
 
 function validaMsg()
 {
	 if(document.frm_contato.mensagem.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_contato.mensagem.style.background = "#fc5a5a";
		 document.frm_contato.mensagem.focus();
	 }
	else
	 {
		document.frm_contato.mensagem.style.background = "#FFFFFF";
        document.frm_contato.submit();
	 } 
 }
 
 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 
 function validaOpine()
 {
	 if(document.frm_opine.nome.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_opine.nome.style.background = "#fc5a5a";
		 document.frm_opine.nome.focus();
	 }
	else
	 {
		document.frm_opine.nome.style.background = "#FFFFFF";
		validaCidade2();
	 } 
 }
 function validaCidade2()
 {
	 if(document.frm_opine.cidade.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_opine.cidade.style.background = "#fc5a5a";
		 document.frm_opine.cidade.focus();
	 }
	else
	 {
		document.frm_opine.cidade.style.background = "#FFFFFF";
		validaEmail2();
	 } 
 }
 
 function validaEmail2()
 {
	 if(document.frm_opine.email.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_opine.email.style.background = "#fc5a5a";
		 document.frm_opine.email.focus();
	 }
	else
	 {
		document.frm_opine.email.style.background = "#FFFFFF";
		validaAssunto2();
	 } 
 }
 
 function validaAssunto2()
 {
	 if(document.frm_opine.assunto.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_opine.assunto.style.background = "#fc5a5a";
		 document.frm_opine.assunto.focus();
	 }
	else
	 {
		document.frm_opine.assunto.style.background = "#FFFFFF";
		validaMsg2();
	 } 
 }
 
 function validaMsg2()
 {
	 if(document.frm_opine.mensagem.value == "")
	 {
		 alert("Preencha todos os campos !");
		 document.frm_opine.mensagem.style.background = "#fc5a5a";
		 document.frm_opine.mensagem.focus();
	 }
	else
	 {
		document.frm_opine.mensagem.style.background = "#FFFFFF";
        document.frm_opine.submit();
	 } 
 }
