use the correct event names for attachEvent