function checkMail(mail){
	var er=new RegExp(/^[A-Za-z0-9_\-\.]+@[A-Za-z0-9_\-\.]{2,}\.[A-Za-z0-9]{2,}(\.[A-Za-z0-9])?/);
	if(typeof(mail) == "string"){
		if(er.test(mail)){
			return true; 
		}
	}else if(typeof(mail) == "object"){
		if(er.test(mail.value)){ 
			return true; 
		}
	}else{
		return false;
	}
}

function validaNewsletter(){
	mt=document.formularioNewsletter.nome.value;
	if (mt.length<1){
	alert("Informe seu nome!");
	document.formularioNewsletter.nome.focus();
	return false;}
	
	mt=document.formularioNewsletter.from.value;
	if (mt.length<1){
	alert("Informe seu e-mail!");
	document.formularioNewsletter.from.focus();
	return false;}
	
	if(!checkMail(mt)){
	alert("E-mail incorreto!");
	document.formularioNewsletter.from.focus();
	return false;}
	
	return true;
}

function validaAgenda(){

	return true;
}

function validaContato(){
	mt=document.formularioContato.nome.value;
	if (mt.length<1){
	alert("Informe seu nome!");
	document.formularioContato.nome.focus();
	return false;}
	
	mt=document.formularioContato.from.value;
	if (mt.length<1){
	alert("Informe seu e-mail!");
	document.formularioContato.from.focus();
	return false;}
	
	if(!checkMail(mt)){
	alert("E-mail incorreto!");
	document.formularioContato.from.focus();
	return false;}
	
	
	mt=document.formularioContato.mensagem_assunto.value;
	if (mt.length<1){
	alert("Informe o assunto!");
	document.formularioContato.mensagem_assunto.focus();
	return false;}

	mt=document.formularioContato.mensagem.value;
	if (mt.length<1){
	alert("Informe sua mensagem!");
	document.formularioContato.mensagem.focus();
	return false;}
	
	return true;
}


function validaInscricao(){
	
	mt=document.formularioContato.nome.value;
	if (mt.length<1){
	alert("Informe seu nome!");
	document.formularioContato.nome.focus();
	return false;}
	
	mt=document.formularioContato.cpf.value;
	if (mt.length<1){
	alert("Informe o CPF!");
	document.formularioContato.cpf.focus();
	return false;}

	mt=document.formularioContato.nascimento.value;
	if (mt.length<1){
	alert("Informe sua data de Nascimento!");
	document.formularioContato.nascimento.focus();
	return false;}
	
	mt=document.formularioContato.curso.value;
	if (mt.length<1){
	alert("Informe o nome do Curso!");
	document.formularioContato.curso.focus();
	return false;}
	
	mt=document.formularioContato.periodo.value;
	if (mt.length<1){
	alert("Informe o Periodo");
	document.formularioContato.periodo.focus();
	return false;}
	
	mt=document.formularioContato.turno.value;
	if (mt.length<1){
	alert("Informe o Turno");
	document.formularioContato.turno.focus();
	return false;}
	
	mt=document.formularioContato.from.value;
	if (mt.length<1){
	alert("Informe seu e-mail!");
	document.formularioContato.from.focus();
	return false;}
	
	if(!checkMail(mt)){
	alert("E-mail incorreto!");
	document.formularioContato.from.focus();
	return false;}
	
	
	mt=document.formularioContato.telefone.value;
	if (mt.length<1){
	alert("Informe o Telefone");
	document.formularioContato.telefone.focus();
	return false;}
	
	mt=document.formularioContato.endereco.value;
	if (mt.length<1){
	alert("Informe o Endereco");
	document.formularioContato.endereco.focus();
	return false;}
	
	
	return true;
}
