rem: for (var j = 1;; j++) { var ruleNode = document.getElementById("matchRule."+j); 
add: for (j = 1;; j++) { ruleNode = document.getElementById("matchRule."+j); 
context: function applyFilter(){  /* This is where we manipulate the DOM to create new <rule>s */  var splitFilters = currentFilter.split("; ");  var matchAllFiles = false;  /* get just the extensions for each of the filters */  var extensions = new Array(splitFilters.length);  for (var j = 0; j < splitFilters.length; j++) {    var tmpStr = splitFilters[j];    if (tmpStr == "*") {      matchAllFiles = true;      break;    } else      extensions[j] = tmpStr.substring(1); /* chop off the '*' */  }  /* delete all rules except the first one */  for (var j = 1;; j++) {    var ruleNode = document.getElementById("matchRule."+j);    if (ruleNode) {      ruleNode.parentNode.removeChild(ruleNode);    } else {      break;    }  }  /* if we are matching all files, just clear the extension attribute     on the first match rule and we're done */  var rule0 = document.getElementById("matchRule.0");  if (matchAllFiles) {    rule0.removeAttributeNS(NC_NAMESPACE_URI, "extension");    directoryTree.builder.rebuild();    return;  }  /* rule 0 is special */  rule0.setAttributeNS(NC_NAMESPACE_URI, "extension" , extensions[0]);  /* iterate through the remaining extensions, creating new rules */  var ruleNode = document.getElementById("fileFilter");  for (var k=1; k < extensions.length; k++) {    var newRule = rule0.cloneNode(true);    newRule.setAttribute("id", "matchRule."+k);    newRule.setAttributeNS(NC_NAMESPACE_URI, "extension", extensions[k]);    ruleNode.appendChild(newRule);  }  directoryTree.builder.rebuild();}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/322559f087c3d4e17ce1707a5c8e8e99fd90a416/filepicker.js/clean/xpfe/components/filepicker/res/content/filepicker.js