function XBrowserAddHandler(target,eventName,handlerName) {
  if ( target.addEventListener ) {
		if(eventName == "mousewheel") {
			target.addEventListener("DOMMouseScroll", function(e){target[handlerName](e);}, false);
		}
		target.addEventListener(eventName, function(e){target[handlerName](e);}, false);
  } else if ( target.attachEvent ) {
    target.attachEvent("on" + eventName, function(e){target[handlerName](e);});
  } else {
    var originalHandler = target["on" + eventName];
    if ( originalHandler ) {
      target["on" + eventName] = function(e){originalHandler(e);target[handlerName](e);};
    } else {
      target["on" + eventName] = target[handlerName];
    }
  }
}

function XBrowserAddHandlerNew(target,eventName,handlerFunc) {
  if ( target.addEventListener ) {
		if(eventName == "mousewheel") {
			target.addEventListener("DOMMouseScroll", handlerFunc, false);
		}
    target.addEventListener(eventName, handlerFunc, false);
  } else if ( target.attachEvent ) {
    target.attachEvent("on" + eventName, handlerFunc);
  }
}

function IsIE() {
	var agt=navigator.userAgent.toLowerCase();
	return (((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) ? true : false);
}
