implement DOM 3 events
bug fixes for IE8