if (window.attachEvent) { window.addEventListener = function (type,func,dummy) { return window.attachEvent ('on' + type, func); } } if (window.detachEvent) { window.removeEventListener = function (type,func,dummy) { return window.detachEvent ('on' + type, func); } }