/*
# $Id: window.onload.js 4 2006-11-26 10:46:23Z james $
#
# Provides a mechanism for adding multiple events to the window.onload event without overwriting each other.
#
# Usage:
# function myHandler() {
#	// do something here
# }
# window.addOnLoad(myHandler);
#
*/

window.onLoadQueue = new Array();
window.addOnLoad = function(func) {
	window.onLoadQueue.push(func);
}

window.onload = function() {
	for(var i=0; i<window.onLoadQueue.length; i++) {
		window.onLoadQueue[i]();
	}
}
