An event organizer for javascript