addEvent() recoding contest entryMy entry to the contest listed on http://www.quirksmode.org/blog/archives/2005/09/addEvent_recodi.html
Updated 9/12/5: Geocities apparently will modify this page to load into a frameset, so I had to change the "Remove border" link href from "#" to "javascript:void(0)" to prevent the page from reloading, which would re-run the "load" events on the document. This is a limitation of my hosting provider, not the javascript code on the page.
Also, there was a lot of talk about memory leaks on the contest page, so I updated the script to do an automatic unload of all events when the page is unloaded, eliminating the circular references which would cause a memory leak. This extra code has been documented and is easily removable.
Updated 10/10/5: Updated to support IE 5. IE 5 needed to manually generate Array.splice, and Function.call.