function renderForm(theElement) {
  var theForm = document.grpQualForm;
  
  if (theElement.name == "grpQualQ1") {
    if (theElement.options[theElement.selectedIndex].value != "") {
	  theForm.grpQualQ2.disabled = false;  //show the next select
    } else {
      theForm.grpQualQ2.disabled = true;  //hide the next select
      theForm.grpQualQ2.selectedIndex = 0;
      theForm.grpQualQ3.selectedIndex = 0;
      theForm.grpQualQ4.selectedIndex = 0;
    }
  } else if (theElement.name == "grpQualQ2") {
    if (theElement.options[theElement.selectedIndex].value != "") {
	  theForm.grpQualQ3.disabled = false;  //show the next select
    } else {
      theForm.grpQualQ3.disabled = true;  //hide the next select
      theForm.grpQualQ3.selectedIndex = 0;
      theForm.grpQualQ4.selectedIndex = 0;
    }
  } else if (theElement.name == "grpQualQ3") {  
    if (theElement.options[theElement.selectedIndex].value != "") {
	  theForm.grpQualQ4.disabled = false;  //show the next select
    } else {
      theForm.grpQualQ4.disabled = true;  //hide the next select
      theForm.grpQualQ4.selectedIndex = 0;
    }
  }
  
} //renderForm

function checkForm() {
  var theForm = document.grpQualForm;
  var boolSubmit = true;
  var msg = "Please provide an answer for the following question(s):\n\n"; 
   
  if (theForm.grpQualQ1.options[theForm.grpQualQ1.selectedIndex].value == "") {
    boolSubmit = false;
    msg = msg + "* Question 1: How many attendees will you be hosting?\n";
  }
   
  if (theForm.grpQualQ2.options[theForm.grpQualQ2.selectedIndex].value == "") {
    boolSubmit = false;
    msg = msg + "* Question 2: How many hotel rooms do you need?\n";
  }
  
  if (!boolSubmit) {
    alert(msg);
  }
  
  return boolSubmit;
} //checkForm