/**
	SUMMARY
	Some general use library JavaScript routines.
	
	FEATURES
	See individual functions.
	
	NOTES
	Load this file first to make it available to all other subsequently loaded JavaScript files.
**/


/**
	Helper function to retrieve dom objects.
**/
function $(id)
{
	return document.getElementById(id);
}

/**
	Allows the queuing and execution of multiple functions when a page loads.
	This function is referenced in DOM Scripting by Jeremy Keith which is an awesome
	JavaScript book.
	The book sourced this function from the website of Simon Willison, http://simon.incutio.com.
**/
function addLoadEvent(func)
{
	var oldOnLoad = window.onload;
	
	if (typeof window.onload != 'function')
	{
		window.onload = func;
	}
	else
	{
		window.onload = function()
		{
			oldOnLoad();
			func();
		}
	}
}