rem: var number, cookie, id; var cookietree = document.getElementById("cookietree"); var selected = cookietree.selectedIndex; var cookielist = document.getElementById('cookieList'); var childnodes = cookielist.childNodes;  if (selected >= 0) { cookie = childnodes[selected]; id = cookie.getAttribute("id"); number = parseInt(id.substring("cookietree_".length,id.length)); }  Wallet_ColumnSort(column, 'cookieList');  var length = childnodes.length; if (selected >= 0) { for (i=0; i<length; i++){ cookie = childnodes[i]; id = cookie.getAttribute("id"); var thisNumber = parseInt(id.substring("cookietree_".length,id.length)); if (thisNumber == number) { cookietree.selectedIndex = i; break; } } }  
add: lastCookieSortAscending = SortOutliner(cookiesOutliner, cookiesOutlinerView, cookies, column, lastCookieSortColumn, lastCookieSortAscending); lastCookieSortColumn = column; 
context: function CookieColumnSort(column) {  var number, cookie, id;  var cookietree = document.getElementById("cookietree");  var selected = cookietree.selectedIndex;  var cookielist = document.getElementById('cookieList');  var childnodes = cookielist.childNodes;  if (selected >= 0) {    cookie = childnodes[selected];    id = cookie.getAttribute("id");    number = parseInt(id.substring("cookietree_".length,id.length));  }  Wallet_ColumnSort(column, 'cookieList');  var length = childnodes.length;  if (selected >= 0) {    for (i=0; i<length; i++){      cookie = childnodes[i];      id = cookie.getAttribute("id");      var thisNumber = parseInt(id.substring("cookietree_".length,id.length));      if (thisNumber == number) {        cookietree.selectedIndex = i;        break;      }    }  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/b5cc0e55e627e69de7a57125a7c5fe338fda8afa/CookieViewer.js/buggy/extensions/wallet/cookieviewer/CookieViewer.js