  function verificaEMail(strEMail, blnSilencio)
  {
    /*
      emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[a-zA-Z]$"
      var regex = new RegExp(emailReg);
      return regex.verificaEMail(strEMail);
    */

    var strErro = "";
    var intErro = 0;

    if (strEMail == "")
    {
      strErro += "- tens de preencher o campo email\n";
      intErro += 1;
    }
    else
    {
      if
      (
        (strEMail.indexOf("@") != strEMail.lastIndexOf("@")) ||
       !(strEMail.indexOf("@") > 0) ||
       !(strEMail.indexOf(".") > 0) ||
        (strEMail.lastIndexOf(".") < strEMail.indexOf("@"))
      )
      {
        strErro += "- email inválido\n";
        intErro += 2;
      }
    }

    if (blnSilencio)
      return intErro;


    if (strErro == "")
      return true
    else
    {
      alert("ERRO:\n\n" + strErro + "\n");
      return false;
    }
  }