Implemented cross browser event handler