/******************************************************************************* * This notice must be untouched at all times. * * This javascript library contains helper routines to assist with event * handling consinstently among browsers * * EventHelpers.js v.1.4 available at http://www.useragentman.com/ * * released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * * Chagelog: 1.4: fix fireEvent to work correctly for IE9. * *******************************************************************************/ var EventHelpers=new function(){var me=this;var safariTimer;var isSafari=/WebKit/i.test(navigator.userAgent);var globalEvent;me.init=function(){if(me.hasPageLoadHappened(arguments)){return}if(document.createEvent){globalEvent=document.createEvent("HTMLEvents")}else if(document.createEventObject){globalEvent=document.createEventObject()}me.docIsLoaded=true}me.addEvent=function(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false)}else if(obj.attachEvent){obj['e'+evType+fn]=fn;obj[evType+fn]=function(){obj["e"+evType+fn](self.event)}obj.attachEvent("on"+evType,obj[evType+fn])}}me.removeEvent=function(obj,evType,fn){if(obj.removeEventListener){obj.removeEventListener(evType,fn,false)}else if(obj.detachEvent){try{obj.detachEvent("on"+evType,obj[evType+fn]);obj[evType+fn]=null;obj["e"+evType+fn]=null}catch(ex){}}}function removeEventAttribute(obj,beginName){var attributes=obj.attributes;for(var i=0;i