if theres no attachEvent we dont need to create the unloadEvent function.