function makeArray(listName) {// make array of screen names # keywords    var arr = [];  if (listName == '2007') { // list 2007 events here    arr = [];    return arr;  } else if (listName == '2010') { // list 2010 events here   arr = ['Pony Club Champs- ShowJumping-#pcchamps10showjumping',          'Pony Club Champs-Eventing#pcchamps10eventing',          'Pony Club Champs-Dressage#pcchamps10dressage',          'Pony Club Champs- Mounted Games-#pcchamps10mountedgames',          'Pony Club Champs-Centres#pcchamps10centres',          'Pony Club Champs-Musical Ride#pcchamps10musical',          'Luhmuhlen Horse Trials#luhmuhlenhsbc10',          'Bramham Horse Trials#bramham10',          'Chatsworth Horse Trials#chatsworthhsbc10',          'Mitsubishi Motors Badminton Horse Trials#badmintonmitsub2010'];        return arr;  } else if (listName == '2009') { // list 2009 events here   arr = ['Olympia- London International Horse Show#olympialihs09',          'European Eventing Championships- Fontainebleau#fontainebleauch09',          'European Jumping Champs-Windsor#windsoreuroJumping09',          'European Dressage Champs-Windsor#windsoreuroDresage09',          'Aachen Horse Show#aachen2009',          'Tattersalls Horse Trials#tattersalls2009',          'Bramham Horse Trials#bramham2009',          'Royal Windsor Horse Show#rwhs2009',          'Badminton Horse Trials#badminton2009',          'Rolex Kentucky Three Day Event#rolexkentuck09',          'Gatcombe Novice_Spring#gatcombespring09',           'White Turf -Snow Racing St Moritz#whiteturf09'];                        return arr;  } else if (listName == '2008') { // list 2008 events here   arr = [ 'Olympia_London International Horse Show#LIHSOlympia2008',           'Pau CCI ****2008#pau08',           'Burghley Horse Trials 2008#burghley08',           'Olympics 2008_Jumping#juolym08',           'Olympics 2008_Dressage#droly08',           'Olympics2008_Eventing#eventing08',           'Olympics2008_People andIncidentals#peopleolym08',           'Badminton Horse trials 2008#badm08',           'Belton Horse Trials 13 april#belton08',           'Burnham Market Horse Trials 30march#BnhamMkt08',           '2008 Olympic Preview_ Hong Kong#hkpreviewmarch'];                return arr;  }}// Do all event editing before this following codefunction getSelectedRadioValue(buttonGroup) {   // returns the value of the selected radio button or "" if no button is selected   var i = getSelectedRadio(buttonGroup);   if (i == -1) {      return "";   } else {      if (buttonGroup[i]) { // Make sure the button group is an array (not just one button)         return buttonGroup[i].value;      } else { // The button group is just the one button, and it is checked         return buttonGroup.value;      }   }} // Ends the "getSelectedRadioValue" functionfunction getSelectedRadio(buttonGroup) {   // returns the array number of the selected radio button or -1 if no button is selected   if (buttonGroup[0]) { // if the button group is an array (one button is not an array)      for (var i=0; i<buttonGroup.length; i++) {         if (buttonGroup[i].checked) {            return i;         }      }   } else {      if (buttonGroup.checked) { return 0; } // if the one button is checked, return zero   }   // if we get to this point, no radio button is selected   return -1;} // Ends the "getSelectedRadio" functionfunction loadEventList(formName) {  myForm = document.getElementById(formName);  myForm.Select_Event.options.length= 0;  var eventList = getSelectedRadioValue(myForm.Group);  var useList = makeArray(eventList);  if (useList !== '') {    var x = useList.length;    for (x = 0; useList[x]; x++) {      var theLabel = useList[x].slice(0,(useList[x].indexOf('#')));      var theValue = useList[x].slice(useList[x].indexOf('#')+1);      myForm.Select_Event.options[x] = new Option(theLabel, theValue, false, false);    }  }  //alert('Selected option = ' + myForm.Select_Event.options[myForm.Select_Event.selectedIndex].value);  myForm.value.value = myForm.Select_Event.options[myForm.Select_Event.selectedIndex].value;  //alert('The value selected is: \"' + myForm.value.value + '\"');}function setEvent(formName) {  myForm = document.getElementById(formName);  if (myForm.Select_Event.options[myForm.Select_Event.selectedIndex].value == "No year selected...") {    alert('Please click a year button and an event name from the list.');  } else {    myForm.value.value = myForm.Select_Event.options[myForm.Select_Event.selectedIndex].value;    //alert('The value selected is: \"' + myForm.value.value + '\"');    return;  }}function checkForYear(formName) {  myForm = document.getElementById(formName);  if (getSelectedRadio(myForm.Group)==-1){    alert('Please click a Year radio button and try again.');    myForm.Group[0].focus();    return;  }}
