addLoadEvent improvement

Details

Description

The script control.js contains the function 'addLoadEvent'. This function enables one to add multiple onload events to a page.

There are two problems with the current function.

1) If the <body> tag contains a 'onload' event, and the javascript is placed in the <head> of a page, the addLoadEvent does not seem to fire its events.
2) The events added to the above function, only fires after the entire web page (including all images) have been loaded.