rem: }   if (sameEntry) { observers.splice(i--, 1); break; 
add:   if (sameEntry) { elementObservers.splice(i--, 1); if (elementObservers.length == 0) { OpenLayers.Event.observers[element.id] = null; } break; } 
context:   stopObserving: function(elementParam, name, observer, useCapture) {    var element = OpenLayers.Util.getElement(elementParam);    useCapture = useCapture || false;    if (name == 'keypress' &&        (navigator.appVersion.match(/Konqueror|Safari|KHTML/)        || element.detachEvent))      name = 'keydown';    // find entry in this.observers cache array and remove it    var observers = OpenLayers.Event.observers;    var entry = [element, name, observer, useCapture];    for (var i = 0; i < observers.length; i++) {        //compare all 4 elements of entry with observer        var sameEntry = true;                for (var j = 0; j < entry.length; j++) {            if (entry[j] != observers[i][j]) {                sameEntry = false;                break;            }        }        //if we've found it, remove it from the observers array        if (sameEntry) {            observers.splice(i--, 1);            break;         }    }    if (element && element.removeEventListener) {      element.removeEventListener(name, observer, useCapture);    } else if (element && element.detachEvent) {      element.detachEvent('on' + name, observer);    }  }
meta: 1027	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1027/87977f7bfe4e09d6d224fc58b3f1310df81a811a/Events.js/clean/lib/OpenLayers/Events.js