// getFormSubject

/*this function takes the selected option text (the text displayed between option tags)
  and assigns it to a hidden input that holds the subject of the form submission*/
  
/* the form will also have a different config_name value based upon what question the user selects
     from the config_name drop-down. The config_name maps to a servlet that processes the form and
	 sends it to appropriate department. That way, we can customize the message that arrives at that
	 department, and the success or failure message displayed to the user.*/

function getFormSubject()
{
  // shortcut to config_name field
  var configName = document.contactForm.config_name;
  /* get the value from the drop-down selected. We're doing this to ensure 
     that no empty values assigned to the subject.*/
  var configNameValue = configName.options[configName.selectedIndex].value;
  
  // get the text from the same drop-down selected. We're using it for a hidden input that
  // holds the subject of the form submission.
  var configNameSelected = configName.options[configName.selectedIndex].text;
  
  if(configNameValue != "")
  {
	 // assign the config_name option text to the subject of the form (subject is a hidden input)
     document.contactForm.subject.value = configNameSelected;
	 // alert(document.contactForm.subject.value);
  }

}



