Event listener for IE<=8

Internet Explorer (up to version 8) used an alternate event listener method: "attachEvent".
Now it checks for if "addEventListener" is available, if not it uses "attachEvent".