function CheckDirName() {
   strInputValue = document.LoginPage.username.value;
   patternName = /\w+\s\w+/;
   MEIDpatternName = /^[A-Za-z]{3}[A-Za-z0-9]{2}[0-9]{5}$/;

   if (strInputValue != "") {
      if (!(strInputValue.match(MEIDpatternName))) {
         alert("Your Enterprise ID (MEID) must be entered.");
         document.LoginPage.username.focus();
         document.LoginPage.username.select();
      }
   }
}


function CheckEmpty() {
   strSiteValue = document.LoginPage.domain.selectedIndex;
   strInputValue = document.LoginPage.username.value;
   strPasswordValue = document.LoginPage.passwd.value;

   patternName = /^\w+\.\w+$/;
   MEIDpatternName = /^[A-Za-z]{3}[A-Za-z0-9]{2}[0-9]{5}$/;

   if (strSiteValue == 0) {
      alert("A site must be selected.");
      return false;
   }
   else if (strInputValue != "") {
      if (!(strInputValue.match(MEIDpatternName))) {
         alert("Please double check your Enterprise ID");
         return false;
      }
      else if (strPasswordValue == "") {
         alert("A password must be entered.");
         return false;
      }
      else if (strPasswordValue.indexOf(" ") >= 0) {
         alert("Spaces are not allowed in password.");
         return false;
      }
   }

   return true;
}
