Cross browser event handling without jQuery