  if (sameEntry) { elementObservers.splice(i--, 1); if (elementObservers.length == 0) { OpenLayers.Event.observers[element.id] = null; 
  var elementObservers = OpenLayers.Event.observers[element.id]; if (elementObservers) {   var i=0; while(!foundEntry && i < elementObservers.length) { var cacheEntry = elementObservers[i];  if ((cacheEntry.name == name) && (cacheEntry.observer == observer) && (cacheEntry.useCapture == useCapture)) {  elementObservers.splice(i, 1); if (elementObservers.length == 0) { OpenLayers.Event.observers[element.id] = null; } break; foundEntry = true; } i++; 
  stopObserving: function(elementParam, name, observer, useCapture) {    var element = OpenLayers.Util.getElement(elementParam);    if (!element) return;    useCapture = useCapture || false;    if (name == 'keypress' &&        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)        || element.detachEvent))      name = 'keydown';    // find element's entry in this.observers cache and remove it    var elementObservers = OpenLayers.Event.observers[element.id];    if (elementObservers) {        var entry = [name, observer, useCapture];        // find the specific event type in the element's list        for (var i = 0; i < elementObservers.length; i++) {            var cacheEntry = elementObservers[i];                        //compare all 3 elements of entry with observer            var sameEntry = true;                    for (var j = 0; j < entry.length; j++) {                if (entry[j] != cacheEntry[j]) {                    sameEntry = false;                    break;                }            }                //if we've found it, remove it from the observers array            if (sameEntry) {                elementObservers.splice(i--, 1);                if (elementObservers.length == 0) {                    OpenLayers.Event.observers[element.id] = null;                }                break;             }        }    }    //actually remove the event listener from browser    if (element.removeEventListener) {      element.removeEventListener(name, observer, useCapture);    } else if (element && element.detachEvent) {      element.detachEvent('on' + name, observer);    }  }
2032	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/2032/a07a4c309deb95919663e2189911fb0163684cea/Events.js/buggy/lib/OpenLayers/Events.js