// disables the student id text box if the person is a member of staff
function enableStudent(student_id, student_status)
{
  var id = document.getElementById(student_id);
  var status = document.getElementById(student_status);
  if(status.value == "Staff")
  {
    id.disabled = true;
    id.value = '';
    document.getElementById(student_id + '_req').firstChild.nodeValue = ' ';
//    document.getElementById(student_id + '_error').firstChild.nodeValue = '';
  }
  else if(status.disabled == false)
  {
    id.disabled = false;
    document.getElementById(student_id + '_req').firstChild.nodeValue = '*';
  }
}

// enables the first aid check box if the person has not previously been trained
function enableFirstAid(first_aid_train, first_aid)
{
  var trained = document.getElementById(first_aid);
  var signUp = document.getElementById(first_aid_train);
  if(trained.value == "Yes")
  {
    signUp.disabled = true;
    signUp.selectedIndex = -1;
    document.getElementById(first_aid_train + '_req').firstChild.nodeValue = ' ';
//    document.getElementById(first_aid_train + '_error').firstChild.nodeValue = '';
  }
  else if(trained.disabled == false)
  {
    signUp.disabled = false;
    document.getElementById(first_aid_train + '_req').firstChild.nodeValue = '*';
  }
}

