rem: if (select_list && select_list.length > 0) 
add: if (select_list && select_list.item(0)) 
context: function NewCategory(){  var promptStr = bundle.GetStringFromName("NewCategoryPrompt");  var newTitle = bundle.GetStringFromName("NewCategoryTitle");  var result = {value:null};  var confirmed = promptService.prompt(window, newTitle, promptStr, result, null, {value:0});  if (!confirmed || (!result.value) || result.value == "")      return(false);  var newName = RDF.GetLiteral(result.value);  if (!newName) return(false);  var categoryRes = RDF.GetResource("NC:SearchCategoryRoot");  if (!categoryRes) return(false);  RDFC.Init(catDS, categoryRes);  var randomID = Math.random();  var categoryID = "NC:SearchCategory?category=urn:search:category:" + randomID.toString();  var currentCatRes = RDF.GetResource(categoryID);  if (!currentCatRes) return(false);  var titleRes = RDF.GetResource("http://home.netscape.com/NC-rdf#title");  if (!titleRes)  return(false);  // set the category's name  catDS.Assert(currentCatRes, titleRes, newName, true);  // and insert the category  RDFC.AppendElement(currentCatRes);  RDFCUtils.MakeSeq(catDS, currentCatRes);  // try and select the new category  var categoryList = document.getElementById( "categoryList" );  var select_list = categoryList.getElementsByAttribute("id", categoryID);  if (select_list && select_list.length > 0)  {    categoryList.selectedItem = select_list[0];    chooseCategory(categoryList.selectedItem);  }  return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/846feff6655c64b6730d27fc562b2473668519f4/search-editor.js/buggy/xpfe/components/search/resources/search-editor.js