// 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.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;
}
//-->
<!-- Validação - Indique
function Validaindique(theForm)
{

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

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

if (Trim(theForm.nome_amigo.value) == "")
 {
  alert("Por favor, digite o Nome do seu amigo.")
  theForm.nome_amigo.focus();
    return (false);
  }
  
if (Trim(theForm.email_amigo.value) == "")
 {
  alert("Por favor, digite o E-mail do seu amigo.")
  theForm.email_amigo.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;
}
//-->
<!-- Validação - News
function Validanews(theForm)
{

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

if (Trim(theForm.seu_email.value) == "")
 {
  alert("Por favor, digite seu E-mail.")
  theForm.seu_email.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;
}
//-->