/////////////////////////////////////////////////////////////////////////////////////////////////////////
// JavaScript Function Name:  ValidateInputOcc
// Purpose: Checks to make sure at least one criteria selected and checks to make sure that
// if Year is completed, Month must also be (and vice versa).
////////////////////////////////////////////////////////////////////////////////////////////////////////

function ValidateInputOcc()
{
 if(document.UsersInput.Title.value == "" &&
       document.UsersInput.SkillLevel.value == "" &&
       document.UsersInput.start_year.value == "" &&
       document.UsersInput.start_month.selectedIndex == 0 &&
    document.UsersInput.AceID.value == ""  )
 {
  alert('You must enter at least one criterion to perform a search.');
   return false;
 }

 if(document.UsersInput.start_year.value == "" &
       document.UsersInput.start_month.selectedIndex != 0)
 {
  alert('Year must also be completed when searching on Date using Month.');
   return false;
 }

 nLen = document.UsersInput.start_year.value;
 nLen = nLen.length;

 if ((nLen == 1) || (nLen == 3))
 {
  alert('Year must be either 2 or 4 digits.');
  return false;
 }
 return true;
}