rem: var categoryList = document.getElementById( "categoryList" ); if (!categoryList)	return(false); 
add: var categoryList = document.getElementById( "categoryList" ); if (!categoryList)  return(false); 
context: function RemoveCategory(){	// make sure we have at least one category	var categoryPopup = document.getElementById( "categoryPopup" );	if (!categoryPopup)	return(false);	if (categoryPopup.childNodes.length < 1)	return(false);	var promptStr = bundle.GetStringFromName("RemoveCategoryPrompt");	if (!confirm(promptStr))	return(false);	var categoryRes = RDF.GetResource("NC:SearchCategoryRoot");	if (!categoryRes)	return(false);	var categoryList = document.getElementById( "categoryList" );	if (!categoryList)	return(false);	var idNum = categoryList.selectedIndex;	var id = categoryList.selectedItem.getAttribute("id");	if ((!id) || (id == ""))	return(false);	var idRes = RDF.GetResource(id);	if (!idRes)	return(false);	RDFC.Init(catDS, categoryRes);	var nodeIndex = RDFC.IndexOf(idRes);	if (nodeIndex < 1)	return(false);		// how did that happen?	RDFC.RemoveElementAt(nodeIndex, true, idRes);	// try and select another category	if (idNum > 0)	--idNum;	else		idNum = 0;	if (categoryPopup.childNodes.length > 0)	{		categoryList.selectedItem = categoryPopup.childNodes[idNum];		chooseCategory(categoryList.selectedItem);	}	else	{		// last category was deleted, so empty out engine list		var treeNode = document.getElementById("engineList");		if (treeNode)		{			treeNode.setAttribute( "ref", "" );		}	}	return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/14c79ddbd6da59bd2a2cf0cd9efa73f23cec7ae7/search-editor.js/buggy/suite/common/search/search-editor.js