
 
// Function to populate the events for the championship that is selected
 
	function PopulateEvents()
	
		{		
			// Only process the function if the first item is not selected.
			if (document.form.champ.selectedIndex != 0) 
			
				{
					// Find the selected index for the championship
					var ThisChamp = document.form.champ.selectedIndex;
					
					// Set the length of the titles drop-down equal to the length of the championships' array
					document.form.event.length = eval("eventNames" + ThisChamp + ".length");
					
					// Put 'Select Title' as the first option in the title drop-down
					document.form.event[0].value = "";
					document.form.event[0].text = "Choose an Event";
					document.form.event[0].selected = true;
					
					// Loop through the championships array and populate the event drop down.
					for (i=0; i<eval("eventNames" + ThisChamp + ".length"); i++)
						{
							document.form.event[i].value = 
							eval("eventID" + ThisChamp + "[i]");
							document.form.event[i].text = 
							eval("eventNames" + ThisChamp + "[i]");
						}
				}
		
		}
