

// function to check a selection has been chosen
// from search page dropdown boxes
function checkSelection (passForm) {

  var formNumber;

  if (passForm.artistID) {
     formNumber = 1;
  } else if (passForm.subjectID) {
     formNumber = 2;
  } else if (passForm.categoryID) {
     formNumber = 3;
  }
    
  switch (formNumber) {

    case 1: if (passForm.artistID.value == "") {
               passForm.artistID.focus();
               passForm.artistID.selectedIndex=0;
               return false;
            }
            return true;
            break;

    case 2: if (passForm.subjectID.value == "") {
               passForm.subjectID.focus();
               passForm.subjectID.selectedIndex=0;
               return false;
            }
            return true;
            break;

    case 3: if (passForm.categoryID.value == "") {
               passForm.categoryID.focus();
               passForm.categoryID.selectedIndex=0;
               return false;
            }
            return true;
            break;
  }

}

