rem: removeElementClass: function (element, className) { /***  Ensure that the given element does not have className set as part of its class attribute.  This will not disturb other class names.  ***/ var self = MochiKit.DOM; var obj = self.getElement(element); var cls = obj.className;  if (cls.length === 0) { return false; }  if (cls == className) { self.setElementClass(obj, ""); return true; } var classes = obj.className.split(" "); for (var i = 0; i < classes.length; i++) {  if (classes[i] == className) {  classes.splice(i, 1); self.setElementClass(obj, classes.join(" ")); return true; } }  return false; }, 
add: },removeElementClass:function(_380,_381){ var self=MochiKit.DOM; var obj=self.getElement(_380); var cls=obj.className; if(cls.length===0){ return false; } if(cls==_381){ self.setElementClass(obj,""); return true; } var _382=obj.className.split(" "); for(var i=0;i<_382.length;i++){ if(_382[i]==_381){ _382.splice(i,1); self.setElementClass(obj,_382.join(" ")); return true; } } return false; },swapElementClass:function(_383,_384,_385){ 
context:     removeElementClass: function (element, className) {        /***            Ensure that the given element does not have className set as part            of its class attribute.  This will not disturb other class names.        ***/        var self = MochiKit.DOM;        var obj = self.getElement(element);        var cls = obj.className;        // trivial case, no className yet        if (cls.length === 0) {            return false;        }        // other trivial case, set only to className        if (cls == className) {            self.setElementClass(obj, "");            return true;        }        var classes = obj.className.split(" ");        for (var i = 0; i < classes.length; i++) {            // already present            if (classes[i] == className) {                // only check sane case where the class is used once                classes.splice(i, 1);                self.setElementClass(obj, classes.join(" "));                return true;            }        }        // not found        return false;    },
meta: 8607	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8607/ad067b3f5d648d6df90ec6fb2b79f0027612a307/MochiKit.js/buggy/trunk/lib/MochiKit.js