Global Javascript Events
If you want to catch ex. every mouseclick on the whole page, you should attach the event to document.body. This will work with both Firefox (addEventListener) and IE (attachEvent).
If you want to attach the onload event globally (fires when the page is loaded), you can attach it to window.