﻿function SentryTrim(s){
  // Remove leading spaces
  while (s.substring(0,1) == ' '){
  s = s.substring(1,s.length); 
  }
  // Remove trailing spaces
  while (s.substring(s.length-1,s.length) == ' '){
  s = s.substring(0,s.length-1); 
  } 
  return s;
  }
  function SentryValidate(){
  var un=document.Sentry_ext_module.Sentry_USERNAME.value;
  un=SentryTrim(un);
  var pw=document.Sentry_ext_module.Sentry_PASSWORD.value;
  pw=SentryTrim(pw);
  if((un == "") || (pw == "")){ 
  // one or more field left blank
  document.Sentry_ext_module.Sentry_submit.disabled=false;
  alert('SE REQUIERE EL E-MAIL Y LA CONTRASENA PARA ENTRAR!');
  return false;
  }
  else{
  return true;
  }
  }
