function valida(theForm)
{
  if (isBlank(theForm.nome))
  {
    alert("Preencha o campo \"nome\".");
    return false;
  }
  /*if (isBlank(theForm.nomeamigo))
  {
    alert("Preencha o campo \"nome do amigo(a)\".");
    return false;
  }*/
  if (isBlank(theForm.email))
  {
    alert("Preencha o campo \"e-mail\".");
    return false;
  }
  else if (!isMail(theForm.email))
  {
    alert("Email inválido.");
    return false;
  }
  
  if (isBlank(theForm.mensagem))
  {
    alert("Digite a mensagem.");
    return false;
  }/*if (isBlank(theForm.emailamigo))
  {
    alert("Preencha o campo \"e-mail\".");
    return false;
  }
  else if (!isMail(theForm.emailamigo))
  {
    alert("Email inválido.");
    return false;
  }*/
  return true;
}