
// JavaScript Document
function valida(theForm){
	
	var msgErro = document.getElementById("msgErro");
	msgErro.innerHTML = "";
	msgErro.className = "";
	
	var nome = document.getElementById("nome");
	if (theForm.nome.value == ""){
		nome.style.color = "#ff0000";
		theForm.nome.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		nome.style.color = "#333333";	
	}
	
	var email = document.getElementById("email");
	if (theForm.email.value == ""){
		email.style.color = "#ff0000";
		theForm.email.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		email.style.color = "#333333";	
	}
	
	var mensagem = document.getElementById("mensagem");
	if (theForm.mensagem.value == ""){
		mensagem.style.color = "#ff0000";
		theForm.mensagem.focus();
		msgErro.innerHTML = "Por favor, verifique o preencimento dos campos indicados e tente novamente.";
		msgErro.className = "erro";
		return (false);
	}else{
		mensagem.style.color = "#333333";	
	}
}

function esconde(){

	formulario.style.display='none';

}

function mostra(){
	data_doacao.style.display='none';
	formulario.style.display='';
	document.form1.data_doador.disabled 
	
}

function mostra2(){
	
	data_doacao.style.display='';
	formulario.style.display='';
	document.form1.data_doador.disabled = (document.form1.data_doador.disabled) ? 0 : 1;
	
}

