add: for (x=0; x<cookies.length; x++) { if (cookies[x].number == idx) { idx = x; break; } } 
context: function ViewCookieSelected(node) {  var cookietree = document.getElementById("cookietree");  if(cookietree.nodeName != "tree")    return false;  if(cookietree.selectedItems.length > 1)    return false;  cookie = node;  if(cookie.getAttribute("id").indexOf("tree_") == -1)    return false;  var idx = parseInt(cookie.getAttribute("id").substring(5,cookie.getAttribute("id").length));  var props = [cookies[idx].number, cookies[idx].name, cookies[idx].value,                cookies[idx].domaintype, cookies[idx].domain, cookies[idx].path,               cookies[idx].secure, cookies[idx].expire];  rows =    [null,"ifl_name","ifl_value","ifl_domaintype","ifl_domain","ifl_path","ifl_secure","ifl_expires"];  for(i = 1; i < props.length; i++)  {    if(i == 3) {      var dtypecell = document.getElementById("ifl_domaintype");      if(dtypecell.hasChildNodes()) {        dtypecell.removeChild(dtypecell.lastChild);      }      var content = document.createTextNode(cookies[idx].domaintype+":");      dtypecell.appendChild(content);      continue;    }    var field = document.getElementById(rows[i]);    var content = props[i];    field.value = content;    if(rows[i] == "ifl_expires") break;  }}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1864514373f54d47cc35f9f03fe264f4dd6ebfa6/CookieViewer.js/buggy/extensions/wallet/cookieviewer/CookieViewer.js