// JavaScript Document
<!-- Validação - Contato
function Validacontato(theForm)
{

if (Trim(theForm.nome.value) == "")
 {
  alert("Por favor, digite seu Nome.")
  theForm.nome.focus();
    return (false);
  }
  
  if (Trim(theForm.estado.value) == "")
 {
  alert("Por favor, Selecione o Estado.")
  theForm.estado.focus();
    return (false);
  }
  
    
  if (Trim(theForm.cidade.value) == "")
 {
  alert("Por favor, Digite a Cidade.")
  theForm.cidade.focus();
    return (false);
  }

if (Trim(theForm.email.value) == "")
 {
  alert("Por favor, digite seu E-mail.")
  theForm.email.focus();
    return (false);
  }

if (Trim(theForm.mensagem.value) == "")
 {
  alert("Por favor, digite sua Mensagem.")
  theForm.mensagem.focus();
    return (false);
  }
  
  return (true);
}

function Trim(s) 
{
  // Remove leading spaces and carriage returns
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
  {
    s = s.substring(1,s.length);
  }

  // Remove trailing spaces and carriage returns
  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
  {
    s = s.substring(0,s.length-1);
  }
  return s;
}
//-->
// JavaScript Document
<!-- Validação - Indique
function Validaindique(theForm)
{

if (Trim(theForm.nome.value) == "")
 {
  alert("Por favor, digite seu Nome.")
  theForm.nome.focus();
    return (false);
  }

if (Trim(theForm.email.value) == "")
 {
  alert("Por favor, digite seu E-mail.")
  theForm.email.focus();
    return (false);
  }

if (Trim(theForm.nome_pessoa.value) == "")
 {
  alert("Por favor, digite o Nome a ser indicado.")
  theForm.nome_pessoa.focus();
    return (false);
  }
  
if (Trim(theForm.email_pessoa.value) == "")
 {
  alert("Por favor, digite o E-mail a ser indicado.")
  theForm.email_pessoa.focus();
    return (false);
  }  
  
  return (true);
}

function Trim(s) 
{
  // Remove leading spaces and carriage returns
  while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
  {
    s = s.substring(1,s.length);
  }

  // Remove trailing spaces and carriage returns
  while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
  {
    s = s.substring(0,s.length-1);
  }
  return s;
}
//-->