add: tgtObj[tgtMeth].listenReg = listenReg;   listenerCache.push(tgtObj[tgtMeth].listenReg); }     if (typeof arguments[2] == 'function') { listenReg.after.push(arguments[2]); }  else { listenReg.after.push([arguments[2], arguments[3]]); }  tgtObj[tgtMeth].listenReg = listenReg; }; this.exec = function(reg, args) {    if (reg.orig.methCode) { reg.orig.methCode.apply(reg.orig.obj, args); } if (reg.orig.methName.match(/onclick|ondblclick|onmouseup|onmousedown|onmouseover|onmouseout|onmousemove|onkeyup/)) { args[0] = args[0] || window.event; }   for (var i = 0; i < reg.after.length; i++) { var ex = reg.after[i];  if (ex.length == 0) { var execFunction = ex; execFunction(args); }  else { execObj = ex[0]; execMethod = ex[1];  execObj[execMethod].apply(execObj, args); } } }; this.unlisten = function() { var tgtObj = arguments[0]; var tgtMeth = arguments[1]; var listenReg = tgtObj[tgtMeth] ? tgtObj[tgtMeth].listenReg : null; var remove = null;   if (!listenReg) { return false; }    for (var i = 0; i < listenReg.after.length; i++) { var ex = listenReg.after[i]; if (typeof arguments[2] == 'function') { if (ex == arguments[2]) { listenReg.after.splice(i, 1); } }  else { if (ex[0] == arguments[2] && ex[1] == arguments[3]) { listenReg.after.splice(i, 1); } } } tgtObj[tgtMeth].listenReg = listenReg; }; this.flush = function() {   for (var i = 0; i < listenerCache.length; i++) { var reg = listenerCache[i]; removeObj = reg.orig.obj; removeMethod = reg.orig.methName; removeObj[removeMethod] = null; } }; this.subscribe = function(subscr, obj, method) {  if (!obj) { return };  if (!channels[subscr]) { channels[subscr] = {}; channels[subscr].audience = []; } else {  this.unsubscribe(subscr, obj); }   channels[subscr].audience.push([obj, method]); }; this.unsubscribe = function(unsubscr, obj) {   if (!obj) { channels[unsubscr] = null; }   else { if (channels[unsubscr]) { var aud = channels[unsubscr].audience; for (var i = 0; i < aud.length; i++) { if (aud[i][0] == obj) { aud.splice(i, 1); } } } } }; this.publish = function(pub, data) {  if (channels[pub]) { aud = channels[pub].audience;   for (var i = 0; i < aud.length; i++) { var listenerObject = aud[i][0]; var handlerMethod = aud[i][1]; listenerObject[handlerMethod](data); } } }; this.getSrcElementId = function(e) { var ret = null; if (e.srcElement) ret = e.srcElement; else if (e.target) ret = e.target;   if (typeof ret.id == 'undefined') { return null; }  else {  while (!ret.id || ret.nodeType == 3) {  if (ret.parentNode) { ret = ret.parentNode; } else { return null; } } } return ret.id; }; } 
context:       tgtObj[tgtMeth] = function() {        var args = [];        for (var i = 0; i < arguments.length; i++) {          args.push(arguments[i]);        }        fleegix.event.exec(          tgtObj[tgtMeth].listenReg, args);      }
meta: 10428	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10428/f0576f65a7b0341560eac2493956030db69acdc9/fleegix.js.uncompressed.js/clean/fleegix.js.uncompressed.js