function AddOnload(myFunc)
//Copied from http://haacked.com/archive/2006/04/06/StopTheWindow.OnloadMadness.aspx.
{
	if(window.addEventListener)
		window.addEventListener('load', myFunc, false);
	else if(window.attachEvent)
		window.attachEvent('onload', myFunc);
}

function GetElement(elementID)
//Helper function for trying the different methods used to find an element in the DOM.
//Modified from http://www.netlobo.com/div_hiding.html.
{
	var elementToFind;

	if(document.getElementById) //Matches standards.
	{
		elementToFind = document.getElementById(elementID);
	}
	else if(document.all) //Matches old MSIE versions.
	{
		elementToFind = document.all[elementID];
	}
	else if(document.layers) //Matches Netscape Navigator 4.
	{
		elementToFind = document.layers[elementID];
	}

	return elementToFind;
}

function Redirect(newLocation)
{
	window.location = newLocation;
}

function RedirectParameterLookup(baseAddress, dropDownID)
//Lookup the selected value of the drop-down menu with an ID of dropDownID, then append it to baseAddress.
{
	var dropDownMenu;
	dropDownMenu = GetElement(dropDownID);
	Redirect(baseAddress + dropDownMenu.options[dropDownMenu.selectedIndex].value);
}
