function vform(form) {
  if (form.Name.value=="") return red(form.Name,"Please enter your name.")
  if (form.Company.value=="") return red(form.Company,"Please enter the company name.")
  if (form.Phone.value=="") return red(form.Phone,"Please enter a daytime phone number.")
  if (form.Email.value=="") return red(form.Email,"Please enter your E-mail address.")
  var str = form.Email.value; 
  if (str.indexOf("@") == -1) return red(form.Email,"" + str + " is an invalid email address!");
  if (str.indexOf(".") == -1) return red(form.Email,"" + str + " is an invalid email address!");
  form.submit()}
function red(obj,msg) {alert(msg); obj.focus(); obj.select(); return false}
function red1(obj,msg) {alert(msg); obj.focus(); return false}
function getObject(objName) {
  Obj=(document.all)? document.all[objName] : document.getElementById(objName);
  return Obj;}
function getlength(x,y){
   if (x >= y) {alert("Maximum entry is " + y + " characters.")};
   return x < y;}
function maxtext(x,y){
   var tempstr = x.value;
   if(tempstr.length > y){
      x.value = tempstr.substring(0,y);
      alert("Please limit your entry to " + y + " characters or less. Entry truncated to " + y + " characters");
   }}
function ClientLogin() {
  window.status="Logging you in ...";
  if (document.LogIn.userid.value=="") return red(document.LogIn.userid,"Please enter your user id.");
  if (document.LogIn.pword.value=="") return red(document.LogIn.pword,"Please enter your password.");
  document.LogIn.submit();
  window.status="NW Payroll";}
function MemberLogin() {
  window.status="Logging you in ...";
  if (document.ExistLogIn.UserPass.value=="") return red(document.ExistLogIn.UserPass,"Please enter your password.");
  if (document.ExistLogIn.Email.value=="") return red(document.ExistLogIn.Email,"Please enter your registered E-mail address.");
  var str = document.ExistLogIn.Email.value; 
  if (str.indexOf("@") == -1) return red(document.ExistLogIn.Email,"" + str + " is an invalid email address!");
  if (str.indexOf(".") == -1) return red(document.ExistLogIn.Email,"" + str + " is an invalid email address!");
  document.ExistLogIn.submit();
  window.status="NW Payroll";}