Add Items to the Queue

var loadQueue = loadQueue || [];
loadQueue.push( function()
{
	// commands here
} );

Actual LoadQueue Code

var loadQueue = loadQueue || [];
(function loadQueueProcess()
{
	if ( document.readyState !== "complete" )
	{
		window.setTimeout( arguments.callee, 10 );
	}

	loadQueue.push = function( f ) { f(); };
	for ( var i = 0; i < loadQueue.length; ++i )
	{
		loadQueue[i]();
	}
} )();