function displayAwardsDropMenu(showWinners, year){
    // Check to see if the "AwardSelector" element exists.
    if(document.getElementById("AwardSelector")){
        // Get the "AwardSelector" element.
        var awardSelector = document.getElementById("AwardSelector");
        // Send a request to get selected calendar month.
	    // Create XmlHttpObject
	    var xmlHttp = createHttpRequestObj();
	    // Check to see if the "xmlHttp" object was created
	    if (xmlHttp == null){
		    // The "xmlHttp" object was NOT created
		    alert ("Browser does not support HTTP Request");
		    return;
	    }
	    // Build URL and append the relevenat querystring variables
	    var url="xml/"+year+"AwardsXML.xml";
	    url=url+"?sid="+Math.random();
	    xmlHttp.onreadystatechange=function() {
		    if(xmlHttp.readyState==4){
			    // Get the XML Document object.
			    var xmlDoc = xmlHttp.responseXML;
			    // Get all of the categories.
			    var categories = xmlDoc.getElementsByTagName("category");
			    // Clear the contents of the "AwardSelector" element.
                awardSelector.innerHTML = "";
			    // Check to see if there area any elements in the "categories" array.
			    if(categories.length > 0){
			        var categoryOpts = new Array();
			        categoryOpts[0] = ["", "- Select an award category -"];
			        // Loop through each element in the "categories" array.
			        for(i=0; i<categories.length; i++){
			            // Get all of the details for the current catagory.
						// Get the category title.
			        	var catTitle = getNodeValue(categories[i].getElementsByTagName("title")[0]);
						// Set the next element in the "categoryOpts" array.
						categoryOpts[i+1] = [i, catTitle];
			        }
			        // End of For Loop.
			        // Create a new select menu and give it an instance name of "awardSelect".
                    var awardSelect = new SelectMenu(categoryOpts, "AwardCategory");
                    // Add the XML Document object to the select menu as a property.
                    awardSelect.classesXML = xmlDoc;
					// Assign the "showWinners" property the "showWinners" varaible.
					awardSelect.showWinners = showWinners;
                    // Assign the "showAwardInfo()" function to the onchange event handler.
                    awardSelect.onchange = showAwardInfo;
                    // Append text to the "categorySelector" element.
                    awardSelector.appendChild(document.createTextNode("Select an award category: "));
                    // Append the "awardSelect" object to the "awardSelector" element.
                    awardSelector.appendChild(awardSelect);
			    }
			    else{
			        // Indicate that there are no award categories to be displayed.
                    awardSelector.innerHTML = "No awards categories found";
			    }
			    // End of IF Else statement.
		    }
		    else{
		        // Indicate that the category select menu is being loaded.
    			awardSelector.innerHTML = "Loading award categories..."
		    }
		    // End of IF Else statement
	    }
	    // End of "xmlHttp.onreadystatechange" function
	    // Open a GET request to the appropriate URL in asynchronus mode.
	    xmlHttp.open("GET", url, true);
	    // Send the request.
	    xmlHttp.send(null);
	}
	// End of IF statement.
}
// End of function "displayAwardsDropMenu()".

function showAwardInfo(){
	// Check to see if the "AwardList" element exists.
    if(document.getElementById("AwardList")){
        // Get the "AwardList" element.
        var awardList = document.getElementById("AwardList");
		awardList.style.width = "90%";
		awardList.className = "";
		// Check to see if a valid option was selected.
		if(this.selectedIndex > 0){
			// Clear the "awardList" element.
			awardList.innerHTML = "";			
			// Get the "showWinners" property and assign it to the variable "showWinners".
			var showWinners = this.showWinners;
			// Get the classes XML object.
			var classesXML = this.classesXML;
			// Get the node number of the class that was clicked on (the node number is the value of the selected option).
			selectedClassNode = this.value;
			// Get the selected class/category node.
			var classNode = classesXML.getElementsByTagName("category")[selectedClassNode];
			// Get the class/category title.
			var classTitle = getNodeValue(classNode.getElementsByTagName("title")[0]);
			// Get all of the awards in the "classNode".
			var awards = classNode.getElementsByTagName("award");
			// Check to see if the length of the "awards" array is GREATER than zero.
			if(awards.length > 0){
				awardList.className = "downloads";
				var awardCategory = document.createElement("h3");
				awardCategory.className = "bg";
				awardCategory.appendChild(document.createTextNode(this.options[this.selectedIndex].innerHTML));
				awardList.appendChild(awardCategory);
				// Loop through each of the awards.
				for(i=0; i<awards.length; i++){
					// Get all of the required award information.
					var awardTitle = getNodeValue(awards[i].getElementsByTagName("title")[0]);
					
					// Create the HTML element that will display the current award information.
					var awardDiv = document.createElement("div");
					awardDiv.className = "award";
					// Create the award title element.
					var awardTitleH3 = document.createElement("h3");
					awardTitleH3.className = "title";
					awardTitleH3.appendChild(document.createTextNode(awardTitle));
					awardDiv.appendChild(awardTitleH3);
					// Check to see if the winner is to be displayed.
					if(showWinners == true){
						// Get the award winner
						var awardWinner = getNodeValue(awards[i].getElementsByTagName("winner")[0]);
						// Create the winner element.
						var awardWinnerPar = document.createElement("p");
						awardWinnerPar.className = "winner";
						awardWinnerPar.appendChild(document.createTextNode(awardWinner));
						// Display the winner.
						awardDiv.appendChild(awardWinnerPar);
					}
					else{
						// Get the description element.
						var awardDesc = getNodeValue(awards[i].getElementsByTagName("desc")[0]);
						// Create the description element.
						var awardDescPar = document.createElement("p");
						awardDescPar.className = "desc";
						awardDescPar.appendChild(document.createTextNode(awardDesc));
						awardDiv.appendChild(awardDescPar);	
					}
					// End of IF Else statement.
					// Append the "awardDiv" element to the "awardList" element.
					awardList.appendChild(awardDiv);
				}
				// End of FOR Loop.
			}
			else{
				// Clear the "awardList" element.
				awardList.innerHTML = "";
			}
			// End of IF Else statement.
		}
		else{
			// Clear the "awardList" element.
			awardList.innerHTML = "";
		}
		// End of IF Else statement.
	}
	// End of IF statement.
}
// End of function "showAwardInfo()".

function displayMedalsDropMenu(showWinners, year){
    // Check to see if the "MedalSelector" element exists.
    if(document.getElementById("MedalSelector")){
        // Get the "MedalSelector" element.
        var MedalSelector = document.getElementById("MedalSelector");
        // Send a request to get selected calendar month.
	    // Create XmlHttpObject
	    var xmlHttp = createHttpRequestObj();
	    // Check to see if the "xmlHttp" object was created
	    if (xmlHttp == null){
		    // The "xmlHttp" object was NOT created
		    alert ("Browser does not support HTTP Request");
		    return;
	    }
	    // Build URL and append the relevenat querystring variables
	    var url="xml/"+year+"MedalsXML.xml";
	    url=url+"?sid="+Math.random();
	    xmlHttp.onreadystatechange=function() {
		    if(xmlHttp.readyState==4){
			    // Get the XML Document object.
			    var xmlDoc = xmlHttp.responseXML;
			    // Get all of the categories.
			    var categories = xmlDoc.getElementsByTagName("category");
			    // Clear the contents of the "MedalSelector" element.
                MedalSelector.innerHTML = "";
			    // Check to see if there area any elements in the "categories" array.
			    if(categories.length > 0){
			        var categoryOpts = new Array();
			        categoryOpts[0] = ["", "- Select an medal category -"];
			        // Loop through each element in the "categories" array.
			        for(i=0; i<categories.length; i++){
			            // Get all of the details for the current catagory.
						// Get the category title.
			        	var catTitle = getNodeValue(categories[i].getElementsByTagName("title")[0]);
						// Set the next element in the "categoryOpts" array.
						categoryOpts[i+1] = [i, catTitle];
			        }
			        // End of For Loop.
			        // Create a new select menu and give it an instance name of "MedalSelect".
                    var MedalSelect = new SelectMenu(categoryOpts, "MedalCategory");
                    // Add the XML Document object to the select menu as a property.
                    MedalSelect.classesXML = xmlDoc;
					// Assign the "showWinners" property the "showWinners" varaible.
					MedalSelect.showWinners = showWinners;
                    // Assign the "showMedalInfo()" function to the onchange event handler.
                    MedalSelect.onchange = showMedalInfo;
                    // Append text to the "categorySelector" element.
                    MedalSelector.appendChild(document.createTextNode("Select a Medal category: "));
                    // Append the "MedalSelect" object to the "MedalSelector" element.
                    MedalSelector.appendChild(MedalSelect);
			    }
			    else{
			        // Indicate that there are no Medal categories to be displayed.
                    MedalSelector.innerHTML = "No Medals categories found";
			    }
			    // End of IF Else statement.
		    }
		    else{
		        // Indicate that the category select menu is being loaded.
    			MedalSelector.innerHTML = "Loading Medal categories..."
		    }
		    // End of IF Else statement
	    }
	    // End of "xmlHttp.onreadystatechange" function
	    // Open a GET request to the appropriate URL in asynchronus mode.
	    xmlHttp.open("GET", url, true);
	    // Send the request.
	    xmlHttp.send(null);
	}
	// End of IF statement.
}
// End of function "displayMedalsDropMenu()".

function showMedalInfo(){
	// Check to see if the "MedalList" element exists.
    if(document.getElementById("MedalList")){
        // Get the "MedalList" element.
        var MedalList = document.getElementById("MedalList");
		MedalList.style.width = "90%";
		MedalList.className = "";
		// Check to see if a valid option was selected.
		if(this.selectedIndex > 0){
			// Clear the "MedalList" element.
			MedalList.innerHTML = "";			
			// Get the "showWinners" property and assign it to the variable "showWinners".
			var showWinners = this.showWinners;
			// Get the classes XML object.
			var classesXML = this.classesXML;
			// Get the node number of the class that was clicked on (the node number is the value of the selected option).
			selectedClassNode = this.value;
			// Get the selected class/category node.
			var classNode = classesXML.getElementsByTagName("category")[selectedClassNode];
			// Get the Medal title.
			var MedalTitle = getNodeValue(classNode.getElementsByTagName("title")[0]);
			// Get the Medal description.
			var MedalDesc = getNodeValue(classNode.getElementsByTagName("desc")[0]);
			// Get all of the winners in the "classNode".
			var winners = classNode.getElementsByTagName("winner");
			// Check to see if the length of the "winners" array is GREATER than zero.
			if(winners.length > 0){
				MedalList.className = "downloads";
				var MedalTitleH3 = document.createElement("h3");
				MedalTitleH3.className = "bg";
				MedalTitleH3.appendChild(document.createTextNode(MedalTitle+" Medal"));
				MedalList.appendChild(MedalTitleH3);
				
				var MedalDescPar = document.createElement("p");
				MedalDescPar.className = "MedalDesc";
				MedalDescPar.innerHTML = "<strong>"+MedalTitle+" Medal Description:</strong><br />"+MedalDesc;
				MedalList.appendChild(MedalDescPar);
				
				var MedalWinnersPar = document.createElement("p");
				MedalWinnersPar.className = "MedalWinners";
				MedalWinnersPar.innerHTML = "<strong>"+MedalTitle+" Medal Winners:</strong>";
				MedalList.appendChild(MedalWinnersPar);
				
				// Loop through each of the winners.
				for(i=0; i<winners.length; i++){
					// Get all of the required Medal information.
					var MedalWinner = getNodeValue(winners[i]);
					var MedalClass = winners[i].getAttribute("class");
					
					// Create the HTML element that will display the current Medal information.
					var MedalDiv = document.createElement("div");
					MedalDiv.className = "medal";
					
					// Create the winner element.
					var MedalWinnerPar = document.createElement("p");
					MedalWinnerPar.className = "winner";
					// document.createTextNode(MedalWinner+" - "+MedalClass)
					var MedalWinnerText = document.createElement("b");
					MedalWinnerText.appendChild(document.createTextNode(MedalWinner));
					MedalWinnerPar.appendChild(MedalWinnerText);
					MedalWinnerPar.appendChild(document.createTextNode(" - "+MedalClass));
					// Display the winner.
					MedalDiv.appendChild(MedalWinnerPar);
					// Append the "MedalDiv" element to the "MedalList" element.
					MedalList.appendChild(MedalDiv);
				}
				// End of FOR Loop.
			}
			else{
				// Clear the "MedalList" element.
				MedalList.innerHTML = "";
			}
			// End of IF Else statement.
		}
		else{
			// Clear the "MedalList" element.
			MedalList.innerHTML = "";
		}
		// End of IF Else statement.
	}
	// End of IF statement.
}
// End of function "showMedalInfo()".