
// VALIDA BOLETIM FORM ////////////////////////////////////////////////////
function validaBoletim(){
if(document.getElementById("txtNomeBoletim").value==""){
	alert("Por favor, Informe o seu Nome.");
	document.getElementById("txtNomeBoletim").style.background='#FFFFCC';
	document.getElementById("txtNomeBoletim").focus();
	return(false);
}else if(document.getElementById("txtEmailBoletim").value==""){
	alert("Por favor, informe seu Email");
	document.getElementById("txtNomeBoletim").style.background='';
	document.getElementById("txtEmailBoletim").style.background='#FFFFCC';
	document.getElementById("txtEmailBoletim").focus();
	return(false);
//}else if (document.getElementById("txtEmailBoletim").value.match(/(\w+)@(.+)\.(\w+)$/) == null){
}else if (document.getElementById("txtEmailBoletim").value.match(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/) == null){
	alert("O email informado não é válido");
	document.getElementById("txtEmailBoletim").focus();
return(false);
}else{
	document.getElementById("frmBoletim").submit();
	return(true);
	}
}
///////////////////////////////////////////////////////////////////////////

// VALIDA INDICACAO FORM //////////////////////////////////////////////////
function validaIndicacao(){
if(document.getElementById("txtNomeIndica").value==""){
	alert("Por favor, Informe o seu Nome.");
	document.getElementById("txtNomeIndica").style.background='#FFFFCC';
	document.getElementById("txtNomeIndica").focus();
	return(false);
}else if(document.getElementById("txtEmailIndica").value==""){
	alert("Por favor, informe seu Email");
	document.getElementById("txtNomeIndica").style.background='';
	document.getElementById("txtEmailIndica").style.background='#FFFFCC';
	document.getElementById("txtEmailIndica").focus();
	return(false);
}else if (document.getElementById("txtEmailIndica").value.match(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/) == null){
	alert("O seu email informado não é válido");
	document.getElementById("txtEmailIndica").focus();
	return(false);
}else if(document.getElementById("txtNomeIndicado").value==""){
	alert("Por favor, Informe o Nome do seu Amigo.");
	document.getElementById("txtNomeIndicado").style.background='#FFFFCC';
	document.getElementById("txtNomeIndicado").focus();
	return(false);
}else if(document.getElementById("txtEmailIndica").value==""){
	alert("Por favor, informe Email do seu Amigo");
	document.getElementById("txtNomeIndicado").style.background='';
	document.getElementById("txtEmailIndicado").style.background='#FFFFCC';
	document.getElementById("txtEmailIndicado").focus();
	return(false);
}else if (document.getElementById("txtEmailIndicado").value.match(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/) == null){
	alert("O email do amigo informado não é válido");
	document.getElementById("txtEmailIndicado").focus();
return(false);
}else{	
	document.getElementById("frmIndicacao").submit();
	return(true);
	}
}

// VALIDA LISTA DE INDICAÇÃO BOLETIM FORM ////////////////////////////////////////////////////
function validaListaIndicacao(){
if(document.getElementById("txtNomeIndica").value==""){
	alert("Por favor, Informe o seu Nome.");
	document.getElementById("txtNomeIndica").style.background='#FFFFCC';
	document.getElementById("txtNomeIndica").focus();
	return(false);
}else if(document.getElementById("txtEmailIndica").value==""){
	alert("Por favor, informe seu Email");
	document.getElementById("txtNomeIndica").style.background='';
	document.getElementById("txtEmailIndica").style.background='#FFFFCC';
	document.getElementById("txtEmailIndica").focus();
	return(false);
//}else if (document.getElementById("txtEmailBoletim").value.match(/(\w+)@(.+)\.(\w+)$/) == null){
}else if (document.getElementById("txtEmailIndica").value.match(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/) == null){
	alert("O email informado não é válido");
	document.getElementById("txtEmailIndica").focus();
return(false);
}else{
	document.getElementById("frmListaIndica").submit();
	return(true);
	}
}
///////////////////////////////////////////////////////////////////////////