
<!-- Original:  Wayne Nolting (w.nolting@home.com) -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function verify() {
var themessage = "You are required to complete the following fields: ";
if (document.contactform.Country.value=="") {
themessage = themessage + " -  Country";
}
if (document.contactform.name.value=="") {
themessage = themessage + " - Full Name";
}
if (document.contactform.email.value=="") {
themessage = themessage + " -  Email";
}
if (document.contactform.Profession.value=="") {
themessage = themessage + " -  Profession";
}

//alert if fields are empty and cancel form submit
if (themessage == "You are required to complete the following fields: ") {
document.form.submit();
}
else {
alert(themessage);
return false;
   }
}
//  End -->

function PopulateProfessions() {

   var CountryList = document.contactform.Country;

   // Clear out the list of teams
   ClearOptions(document.contactform.Profession);

   if (CountryList[CountryList.selectedIndex].value == "United States") {
      AddToOptionList(document.contactform.Profession, "", "Select From...");
      AddToOptionList(document.contactform.Profession, "Atletic Trainer", "Athletic Trainer");
      AddToOptionList(document.contactform.Profession, "Chiropractor", "Chiropractor");
      AddToOptionList(document.contactform.Profession, "Medical Doctor", "Medical Doctor");
      AddToOptionList(document.contactform.Profession, "Occupational Therapist", "Occupational Therapist");
      AddToOptionList(document.contactform.Profession, "Physical Therapist", "Physical Therapist");
      AddToOptionList(document.contactform.Profession, "Other", "Other");
   }
   if (CountryList[CountryList.selectedIndex].value == "United Kingdom") {
      AddToOptionList(document.contactform.Profession, "", "Select From...");
      AddToOptionList(document.contactform.Profession, "Doctor", "Doctor");
      AddToOptionList(document.contactform.Profession, "Chiropractor", "Chiropractor");
      AddToOptionList(document.contactform.Profession, "Nurse", "Nurse");
      AddToOptionList(document.contactform.Profession, "Occupational Therapist", "Occupational Therapist");
      AddToOptionList(document.contactform.Profession, "Osteopath", "Osteopath");
      AddToOptionList(document.contactform.Profession, "Physiotherapist", "Physiotherapist");
      AddToOptionList(document.contactform.Profession, "Sports Injury Specialist", "Sports Injury Specialist");
      AddToOptionList(document.contactform.Profession, "Other", "Other");
   }
   if (CountryList[CountryList.selectedIndex].value != "United Kingdom" && CountryList[CountryList.selectedIndex].value != "United States") {
      AddToOptionList(document.contactform.Profession, "", "Select From...");
      AddToOptionList(document.contactform.Profession, "Doctor", "Doctor");
      AddToOptionList(document.contactform.Profession, "Chiropractor", "Chiropractor");
      AddToOptionList(document.contactform.Profession, "Nurse", "Nurse");
      AddToOptionList(document.contactform.Profession, "Occupational Therapist", "Occupational Therapist");
      AddToOptionList(document.contactform.Profession, "Osteopath", "Osteopath");
      AddToOptionList(document.contactform.Profession, "Physiotherapist", "Physiotherapist");
      AddToOptionList(document.contactform.Profession, "Sports Injury Specialist – Other", "Sports Injury Specialist – Other");
      AddToOptionList(document.contactform.Profession, "Atletic Trainer", "Athletic Trainer");
      AddToOptionList(document.contactform.Profession, "Chiropractor", "Chiropractor");
      AddToOptionList(document.contactform.Profession, "Medical Doctor", "Medical Doctor");
      AddToOptionList(document.contactform.Profession, "Occupational Therapist", "Occupational Therapist");
      AddToOptionList(document.contactform.Profession, "Physical Therapist - Other", "Physical Therapist - Other");
      AddToOptionList(document.contactform.Profession, "Other", "Other");
   }

}


function ClearOptions(OptionList) {

   // Always clear an option list from the last entry to the first
   for (x = OptionList.length; x >= 0; x = x - 1) {
      OptionList[x] = null;
   }
}


function AddToOptionList(OptionList, OptionValue, OptionText) {
   // Add option to the bottom of the list
   OptionList[OptionList.length] = new Option(OptionText, OptionValue);
}
