rem: if (elem.removeEventListener) { elem.removeEventListener(type, handler, false); } else { if (type = "mousedown") { if (elem.releaseEvents) { elem.releaseEvents(Event.MOUSEDOWN); } elem.onmousedown = null; } else if (type = "mouseup") { if (elem.releaseEvents) { elem.releaseEvents(Event.MOUSEUP); } elem.onmouseup = null; } else if (type = "mousemove") { if (elem.releaseEvents) { elem.releaseEvents(Event.MOUSEMOVE); } elem.onmousemove = null; } else if (type = "keypress") { if (elem.releaseEvents) { elem.releaseEvents(Event.KEYPRESS); } elem.onkeypress = null; } else { alert("unregisterEvent: unknown event type "+type); return false; } 
add: if (elem.removeEventListener) { elem.removeEventListener(type, handler, false); } else { if (type == "mousedown") { if (elem.releaseEvents) { elem.releaseEvents(Event.MOUSEDOWN); } elem.onmousedown = null; } else if (type == "mouseup") { if (elem.releaseEvents) { elem.releaseEvents(Event.MOUSEUP); } elem.onmouseup = null; } else if (type == "mousemove") { if (elem.releaseEvents) { elem.releaseEvents(Event.MOUSEMOVE); } elem.onmousemove = null; } else if (type == "keypress") { if (elem.releaseEvents) { elem.releaseEvents(Event.KEYPRESS); } elem.onkeypress = null; } else { alert("unregisterEvent: unknown event type "+type); return false; } 
context: function unregisterEvent(type, elem, handler) {    // unregister the given event handler from the indicated element     if (elem.removeEventListener) {	 elem.removeEventListener(type, handler, false);     } else {	 if (type = "mousedown") {	     if (elem.releaseEvents) {		 elem.releaseEvents(Event.MOUSEDOWN);	     }	     elem.onmousedown = null;	 } else if (type = "mouseup") {	     if (elem.releaseEvents) {		 elem.releaseEvents(Event.MOUSEUP);	     }	     elem.onmouseup = null;	 } else if (type = "mousemove") {	     if (elem.releaseEvents) {		 elem.releaseEvents(Event.MOUSEMOVE);	     }	     elem.onmousemove = null;	 } else if (type = "keypress") {	     if (elem.releaseEvents) {		 elem.releaseEvents(Event.KEYPRESS);	     }	     elem.onkeypress = null;	 } else {	     alert("unregisterEvent: unknown event type "+type);	     return false;	 }    }    return true;}
meta: 7747	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7747/2c4d6b6d5dea1734bb497f3886ee2d9b8815ca25/baselib.js/buggy/client/digitallibrary/baselib.js