
var window_onload;
new window_onload();

function window_onload() {
	window_onload = this;
	
	/* === Add Event === */
	// Add a function to the window object's onload event
	this.add_event = function(func) {
		
		// Store the current function list
		var current_onload = window.onload;
		
		// Rebuild the window object's onload event
		window.onload = function() {
			// Add the current functions, if any
			if(current_onload)
				current_onload();
			
			// Add the specified function to the onload event
			func();
		}
	}
}

