This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Adds an event handler to an object | |
function addEvent(obj, type, fn) { | |
if (obj.addEventListener) | |
obj.addEventListener(type, fn); | |
else if (obj.attachEvent) | |
obj.attachEvent('on' + type, function () { return fn.apply(obj, [window.event]); }); | |
}; | |
window.onload = function () { | |
//Give the UI 10 seconds to load (not doing this resulted in the elements not being found). |