rem: HTMLArea.prototype._stylistRemoveClassesFull = function(el, classes) { if(el != null) { var thiers = el.className.trim().split(' '); var new_thiers = [ ]; var ours   = classes.split(' '); for(var x = 0; x < thiers.length; x++) { var exists = false; for(var i = 0; exists == false && i < ours.length; i++) { if(ours[i] == thiers[x]) { exists = true; } } if(exists == false) { new_thiers[new_thiers.length] = thiers[x]; } }  if(new_thiers.length == 0 && el._stylist_usedToBe && el._stylist_usedToBe.length > 0 && el._stylist_usedToBe[el._stylist_usedToBe.length - 1].className != null) {  var last_el = el._stylist_usedToBe[el._stylist_usedToBe.length - 1]; var last_classes = HTMLArea.arrayFilter(last_el.className.trim().split(' '), function(c) { if (c == null || c.trim() == '') { return false;} return true; });  if( (new_thiers.length == 0) || ( HTMLArea.arrayContainsArray(new_thiers, last_classes) && HTMLArea.arrayContainsArray(last_classes, new_thiers) ) ) { el = this.switchElementTag(el, last_el.tagName); new_thiers = last_classes; } else {  el._stylist_usedToBe = [ ]; } }  if(     new_thiers.length > 0 ||  el.tagName.toLowerCase() != 'span' || (el.id && el.id != '') ) { el.className = new_thiers.join(' ').trim(); } else {  var prnt = el.parentNode; var childs = el.childNodes; for(var x = 0; x < childs.length; x++) { prnt.insertBefore(childs[x], el); } prnt.removeChild(el); } } 
add: HTMLArea.prototype._stylistRemoveClassesFull=function(el,_1d){ if(el!=null){ var _1e=el.className.trim().split(" "); var _1f=[]; var _20=_1d.split(" "); for(var x=0;x<_1e.length;x++){ var _22=false; for(var i=0;_22==false&&i<_20.length;i++){ if(_20[i]==_1e[x]){ _22=true; } } if(_22==false){ _1f[_1f.length]=_1e[x]; } } if(_1f.length==0&&el._stylist_usedToBe&&el._stylist_usedToBe.length>0&&el._stylist_usedToBe[el._stylist_usedToBe.length-1].className!=null){ var _24=el._stylist_usedToBe[el._stylist_usedToBe.length-1]; var _25=HTMLArea.arrayFilter(_24.className.trim().split(" "),function(c){ if(c==null||c.trim()==""){ return false; } return true; }); if((_1f.length==0)||(HTMLArea.arrayContainsArray(_1f,_25)&&HTMLArea.arrayContainsArray(_25,_1f))){ el=this.switchElementTag(el,_24.tagName); _1f=_25; }else{ el._stylist_usedToBe=[]; } } if(_1f.length>0||el.tagName.toLowerCase()!="span"||(el.id&&el.id!="")){ el.className=_1f.join(" ").trim(); }else{ var _27=el.parentNode; var _28=el.childNodes; for(var x=0;x<_28.length;x++){ _27.insertBefore(_28[x],el); } _27.removeChild(el); } } 
context: HTMLArea.prototype._stylistRemoveClassesFull = function(el, classes){  if(el != null)  {    var thiers = el.className.trim().split(' ');    var new_thiers = [ ];    var ours   = classes.split(' ');    for(var x = 0; x < thiers.length; x++)    {      var exists = false;      for(var i = 0; exists == false && i < ours.length; i++)      {        if(ours[i] == thiers[x])        {          exists = true;        }      }      if(exists == false)      {        new_thiers[new_thiers.length] = thiers[x];      }    }    if(new_thiers.length == 0 && el._stylist_usedToBe && el._stylist_usedToBe.length > 0 && el._stylist_usedToBe[el._stylist_usedToBe.length - 1].className != null)    {      // Revert back to what we were IF the classes are identical      var last_el = el._stylist_usedToBe[el._stylist_usedToBe.length - 1];      var last_classes = HTMLArea.arrayFilter(last_el.className.trim().split(' '), function(c) { if (c == null || c.trim() == '') { return false;} return true; });      if(        (new_thiers.length == 0)        ||        (        HTMLArea.arrayContainsArray(new_thiers, last_classes)        && HTMLArea.arrayContainsArray(last_classes, new_thiers)        )      )      {        el = this.switchElementTag(el, last_el.tagName);        new_thiers = last_classes;      }      else      {        // We can't rely on the remembered tags any more        el._stylist_usedToBe = [ ];      }    }    if(     new_thiers.length > 0        ||  el.tagName.toLowerCase() != 'span'        || (el.id && el.id != '')      )    {      el.className = new_thiers.join(' ').trim();    }    else    {      // Must be a span with no classes and no id, so we can splice it out      var prnt = el.parentNode;      var childs = el.childNodes;      for(var x = 0; x < childs.length; x++)      {        prnt.insertBefore(childs[x], el);      }      prnt.removeChild(el);    }  }};
meta: 6015	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6015/d8776708e0e10dfa0ab6ee1d0fa9e512d8d16348/stylist.js/buggy/packages/acs-templating/www/resources/xinha-nightly/plugins/Stylist/stylist.js