Use attachEvent in lieu of addEventListener for older IE