// =======================================
// VALIDA LOGIN
// =======================================

function ValidaLogin(theForm)

{
  if (theForm.userarea.value.length == 0)
  {
    alert("ÁREA RESERVADA: Por favor, entre com o seu LOGIN");
    theForm.userarea.focus();
    return (false);
  }

  if (theForm.password.value.length == 0)
  {
    alert("ÁREA RESERVADA: Por favor, entre com sua senha de acesso");
    theForm.password.focus();
    return (false);
  }

string           =   theForm.userarea.value;
limite           =   theForm.userarea.value.length;
xunder           =   string.indexOf("@")

  if (xunder < 0)
  {
    alert("ÁREA RESERVADA: Por favor, entre com seu LOGIN na forma apelido@site");
    theForm.userarea.focus();
    return (false);
  }

usuariomm = string.substring(0, xunder);
servicomm = string.substring(xunder+1, limite);
theForm.service.value     = servicomm;
theForm.user.value        = usuariomm;

}
