rem: if (index >= 0) pref = gPrefArray[index]; 
add: if (index >= 0) { if (gPrefArray != gPrefView) index = gPrefView.length - index - 1; else pref = gPrefArray[index]; } 
context:   cycleHeader: function(colID, elt) {    var index = this.selection.currentIndex;    if (colID == gSortedColumn)      gSortDirection = -gSortDirection;    if (colID == gSortedColumn && gFastIndex == gPrefArray.length) {      gPrefArray.reverse();      if (index >= 0)        index = gPrefArray.length - index - 1;    }    else {      var pref = null;      if (index >= 0)        pref = gPrefArray[index];      var old = document.getElementById(gSortedColumn);      old.setAttribute("sortDirection", "");      gPrefArray.sort(gSortFunction = gSortFunctions[colID]);      gSortedColumn = colID;      if (pref)        index = getIndexOfPref(pref);    }    elt.setAttribute("sortDirection", gSortDirection > 0 ? "ascending" : "descending");    this.treebox.invalidate();    if (index >= 0) {      this.selection.select(index);      this.treebox.ensureRowIsVisible(index);    }    gFastIndex = gPrefArray.length;  },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/28c6babc46d6ff95ffb8b9a1a821826b153c2384/config.js/clean/xpfe/global/resources/content/config.js