function ValidaFormContato(form1){
/// VALIDA O CAMPO Nome ///
	var nome = document.form1.nome.value;
	if (nome.length < 3)  //Estiver vazio
	{
		alert("Preencha o campo NOME antes de clicar no botão enviar");
		document.form1.nome.focus();
		return (false);
	}

/// VALIDA O CAMPO E-MAIL ///
var email = document.form1.email.value;
var BadChars = "*|,\":<>[]{}`\';()&$#% ";
var GoodChars = "@.";   
var posarroba = email.indexOf ('@',0);
if (email.length < 6)  // o email é menor que 6 caracteres
 {
  alert("EMAIL inválido!"); 
  document.form1.email.focus();
  return (false);
 }
for (var i = 0; i < email.length; i++) 
 {
  if (BadChars.indexOf(email.charAt(i)) != -1)  // Contém caracteres inválidos, badchars
	{
     alert("Seu EMAIL contém caracteres inválidos!");
     document.form1.email.value = "";
	 	 document.form1.email.focus();
     return (false);
	}
 }
for (var i = 0; i < GoodChars.length; i++) 
 {
  if (email.indexOf(GoodChars.charAt(i)) == -1)  // não tem goodchars
	{
     alert("EMAIL inválido!");
	 	 document.form1.email.focus();
     return (false);
	}
  if (email.indexOf(GoodChars.charAt(i),0) == 0) // começou com goodchars (. ou @)
   {
     alert("EMAIL inválido!");
	   document.form1.email.focus();
     return (false);
   }
  if (email.lastIndexOf(GoodChars.charAt(i)) > email.length-3)  //existe menos de 2 caracteres depois do ultimo goodchar
   {
     alert("EMAIL inválido!");
	   document.form1.email.focus();
     return (false);
   }
 }
if (email.lastIndexOf('@') > email.lastIndexOf('.'))  //Não tem ponto depois do arroba
 {
   alert("EMAIL inválido!");
   document.form1.email.focus();
   return (false);
 }

if (email.indexOf ('@.',0) != -1 || email.indexOf ('.@',0) != -1) // . e @ colados
 {
  alert("EMAIL inválido!");
  document.form1.email.focus();
  return (false);
 }
if (email.indexOf ('@',posarroba+1) != -1) // Contém mais de um " @ " 
 {
  alert("EMAIL inválido!");
  document.form1.email.focus();
  return (false);
 }

/// VALIDA O CAMPO Cidade ///
	var cidade = document.form1.cidade.value;
	if (cidade.length < 3)  //Estiver vazio
	{
		alert("Informe a CIDADE onde mora antes de clicar no botão enviar");
		document.form1.cidade.focus();
		return (false);
	}

/// VALIDA O CAMPO UF ///
	var estado = document.form1.estado.value;
	if (estado.length == "0")  //Estiver vazio
	{
		alert("Informe o ESTADO onde mora antes de clicar no botão enviar");
		document.form1.estado.focus();
		return (false);
	}

/// VALIDA O CAMPO Mensagem ///
	var Mensagem = document.form1.Mensagem.value;
	if (Mensagem.length < 3)  //Estiver vazio
	{
		alert("Escreva a sua MENSAGEM antes de clicar no botão enviar");
		document.form1.Mensagem.focus();
		return (false);
	}
}

function ValidaFormContact(form1){
/// VALIDA O CAMPO nome ///
	var nome = document.form1.nome.value;
	if (nome.length < 3)  //Estiver vazio
	{
		alert("The field NAME is required. Please fill the field and try again.");
		document.form1.nome.focus();
		return (false);
	}

/// VALIDA O CAMPO E-MAIL ///
var email = document.form1.email.value;
var BadChars = "*|,\":<>[]{}`\';()&$#% ";
var GoodChars = "@.";   
var posarroba = email.indexOf ('@',0);
if (email.length < 6)  // o email é menor que 6 caracteres
 {
  alert("Invalid EMAIL!"); 
  document.form1.email.focus();
  return (false);
 }
for (var i = 0; i < email.length; i++) 
 {
  if (BadChars.indexOf(email.charAt(i)) != -1)  // Contém caracteres inválidos, badchars
	{
     alert("Invalid EMAIL!");
     document.form1.email.value = "";
	 	 document.form1.email.focus();
     return (false);
	}
 }
for (var i = 0; i < GoodChars.length; i++) 
 {
  if (email.indexOf(GoodChars.charAt(i)) == -1)  // não tem goodchars
	{
     alert("Invalid EMAIL!");
	 	 document.form1.email.focus();
     return (false);
	}
  if (email.indexOf(GoodChars.charAt(i),0) == 0) // começou com goodchars (. ou @)
   {
     alert("Invalid EMAIL!");
	   document.form1.email.focus();
     return (false);
   }
  if (email.lastIndexOf(GoodChars.charAt(i)) > email.length-3)  //existe menos de 2 caracteres depois do ultimo goodchar
   {
     alert("Invalid EMAIL!");
	   document.form1.email.focus();
     return (false);
   }
 }
if (email.lastIndexOf('@') > email.lastIndexOf('.'))  //Não tem ponto depois do arroba
 {
   alert("Invalid EMAIL!");
   document.form1.email.focus();
   return (false);
 }

if (email.indexOf ('@.',0) != -1 || email.indexOf ('.@',0) != -1) // . e @ colados
 {
  alert("Invalid EMAIL!");
  document.form1.email.focus();
  return (false);
 }
if (email.indexOf ('@',posarroba+1) != -1) // Contém mais de um " @ " 
 {
  alert("Invalid EMAIL!");
  document.form1.email.focus();
  return (false);
 }

/// VALIDA O CAMPO Cidade ///
	var cidade = document.form1.cidade.value;
	if (cidade.length < 3)  //Estiver vazio
	{
		alert("The field CITY / COUNTRY is required. Please fill the field and try again.");
		document.form1.cidade.focus();
		return (false);
	}

/// VALIDA O CAMPO Mensagem ///
	var Mensagem = document.form1.Mensagem.value;
	if (Mensagem.length < 3)  //Estiver vazio
	{
		alert("The field MESSAGE is required. Please fill the field and try again.");
		document.form1.Mensagem.focus();
		return (false);
	}
}