function Form_Validator(theForm){

//**********************************
//* Função que chama as validações *
//**********************************

//ADICIONAR AS FUNÇÕES DAS VALIDAÇÕES NESTE ESPAÇO

//****** CAMPO SEU NOME ******
// verifica se o campo está vazio
if (theForm.nome.value == false){
	alert("Preencha o campo Nome.");
	theForm.nome.focus();
	theForm.nome.select();
	return (false);
}else{

	// verifica se o campo contêm números
	var contnome = theForm.nome.value;

	for (var i = 0; i < 10; i = i + 1){

	contnome.indexOf(i);
	if (contnome.indexOf(i) != -1){
		alert("O campo Nome não aceita números.");
		theForm.nome.focus();
		theForm.nome.select();
		return (false);

	}
	}
}

//-------------------------------------------------------------------------------------------

//****** CAMPO SEU EMAIL ******

var texto = theForm.email.value
// verifica se o campo não está vazio.
if (texto == false){
	alert("Preencha o campo E-mail.");
	theForm.email.focus();
	theForm.email.select();
	return (false);
}else{

	//VERIFICA SE EXISTE "@" NO E-MAIL
	pos = texto.indexOf("@")
	if (pos == -1 || pos < 2){
		alert("Preencha o campo E-mail corretamente.");
		theForm.email.focus();
		theForm.email.select();
		return(false);
		} else {
	
			//VERIFICA SE EXISTE "."(PONTO) NO E-MAIL
			pos = texto.indexOf(".")
			if (pos == -1 || pos == 0) {
				alert("Preencha o campo E-mail corretamente.");
				theForm.email.focus();
				theForm.email.select();
				return (false);
			} else {
	
				ponto = texto.indexOf(".")
				tamanho = texto.length;
				parte = texto.substring(ponto,tamanho);
	
				//VERIFICA SE EXISTE MAIS DE 2 CARACTERES APÓS O "."(PONTO) NO E-MAIL
				if (parte.length < 3){
					alert("Preencha o campo E-mail corretamente.");
					theForm.email.focus();
					theForm.email.select();
					return (false);
				}
	
			}
	}
}

//-------------------------------------------------------------------------------------------

//****** CAMPO EMPRESA ******
// verifica se o campo está vazio
if (theForm.empresa.value == false){
	alert("Preencha o campo Empresa.");
	theForm.empresa.focus();
	theForm.empresa.select();
	return (false);
}

//-------------------------------------------------------------------------------------------

}
