var addEvent = document.addEventListener ? function (element, eventType, listener, useCapturing) {
element.addEventListener(eventType, listener, useCapturing == true);
return listener;
} : function (element, eventType, listener) {
var _listener = function () {
listener.call(element, window.event)
};
element.attachEvent("on" + eventType, _listener);
return _listener;
};