Cross-browser JavaScript events module