
function runOnLoad( func, args )
{
	if( ! args )
		args = Array();

	if( runOnLoad.loaded )
	{
		// Just run, if already loaded
		func.apply( func, args );
	}
	else
	{
		// Otherwise save for later
		runOnLoad.funcs.push(func);
		runOnLoad.args.push(args);
	}
}

runOnLoad.funcs = [];
runOnLoad.args = [];
runOnLoad.loaded = false;

runOnLoad.run = function()
{
	// We've already run, do nothing
	if( runOnLoad.loaded )
		return;

	var func;
	var args;
	for( var i=0, len = runOnLoad.funcs.length; i < len; i++ )
	{
		try
		{
			func = runOnLoad.funcs[i];
			args = runOnLoad.args[i];
			func.apply( func, args );
		}
		catch( e ) { /* Ignore any client function exception */ }
	}

	runOnLoad.loaded = true;
	delete runOnLoad.funcs;
	delete runOnLoad.args;
	delete runOnLoad.run;
};

// Register runOnLoad.run() as the single onload() event handler for the window.
if( window.addEventListener )
{
	window.addEventListener("load", runOnLoad.run, false );
}
else if( window.attachEvent )
{
	window.attachEvent("onload", runOnLoad.run );
}
else
{
	window.onload = runOnLoad.run;
}

startList = function()
{
	if(document.all && document.getElementById )
	{
		navRoot = document.getElementById("navigation-bottom");
		for( i=0; i < navRoot.childNodes.length; i++ )
		{
			node = navRoot.childNodes[i];
			if( node.nodeName == "LI" )
			{
				node.onmouseover = function()
				{
					this.className += ' over';
				}
				node.onmouseout = function()
				{
					this.className = this.className.replace(' over', '');
				}
			}
		}
	}
}

runOnLoad( startList );
