rem: var allenginesList = document.getElementById("allengines"); if (!allenginesList)	return(false); var select_list = allenginesList.selectedItems; if (!select_list)	return(false) if (select_list.length < 1)	return(false); 
add: var allenginesList = document.getElementById("allengines"); if (!allenginesList)  return(false); var select_list = allenginesList.selectedItems; if (!select_list) return(false) if (select_list.length < 1) return(false); 
context: function AddEngine(){	var allenginesList = document.getElementById("allengines");	if (!allenginesList)	return(false);	var select_list = allenginesList.selectedItems;	if (!select_list)	return(false)	if (select_list.length < 1)	return(false);	// make sure we have at least one category to add engine into	var categoryPopup = document.getElementById( "categoryPopup" );	if (!categoryPopup)	return(false);	if (categoryPopup.childNodes.length < 1)	{		if (NewCategory() == false)	return(false);	}	var engineList = document.getElementById("engineList");	if (!engineList)	return(false);	var ref = engineList.getAttribute("ref");	if ((!ref) || (ref == ""))	return(false);	var categoryRes = RDF.GetResource(ref);	if (!categoryRes)	return(false);	RDFCUtils.MakeSeq(catDS, categoryRes);	RDFC.Init(catDS, categoryRes);	var urlRes = RDF.GetResource("http://home.netscape.com/NC-rdf#URL");	if (!urlRes)	return(false);	var typeRes = RDF.GetResource("http://home.netscape.com/NC-rdf#searchtype");	if (!typeRes)	return(false);	var engineRes = RDF.GetResource("http://home.netscape.com/NC-rdf#Engine");	if (!engineRes)	return(false);	for (var x = 0; x < select_list.length; x++)	{		var id = select_list[x].getAttribute("id");		if ((!id) || (id == ""))	return(false);		var idRes = RDF.GetResource(id);		if (!idRes)	return(false);		// try and find/use alias to search engine		var privateEngineFlag = internetSearchDS.HasAssertion(idRes, typeRes, engineRes, true);		if (privateEngineFlag == true)		{			var node = internetSearchDS.GetTarget(idRes, urlRes, true);			if (node)	node = node.QueryInterface(Components.interfaces.nsIRDFLiteral);			if (node)			{				if (node.Value)				{					id = node.Value;					idRes = RDF.GetResource(id);					if (!idRes)	return(false);				}			}		}		var nodeIndex = RDFC.IndexOf(idRes);		if (nodeIndex < 1)		{			RDFC.AppendElement(idRes);		}	}	return(true);}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0b2dd2b2d2fd037df917e07645fa019a963332a5/search-editor.js/clean/xpfe/components/search/resources/search-editor.js