/*  Use addLoadListener to add functions to the list that run when the page runs. 
	First argument must be the function name.
	Any further arguments will be treated as arguments to the function. */
function addLoadListener()
{
	var func = addLoadListener.arguments[0];
	var args = null;
	if (addLoadListener.arguments.length > 1)
	{
		args = new Array();
		var i = 1;
		// Copy all the function arguments into an array that can be passed to the function.
		while (i < addLoadListener.arguments.length)
		{
			args[i-1] = addLoadListener.arguments[i];
			i++;
		}
	}
	var oldOnLoad = window.onload;
	if(typeof oldOnLoad != 'function')
		window.onload = function() { func(args); };
	else
	{
		window.onload = function() {
			oldOnLoad();
			func();
		};  //End onload function definition
	}
}
