rem: var treeNode = document.getElementById("NC:SearchEngineRoot"); 
add: var treeNode = document.getElementById("searchengines"); 
context: function doSearch(){	gText = "";	gSites = "";	// get user text to find	var textNode = document.getElementById("searchtext");	if (!textNode)	return(false);	var text = textNode.value;	if (!text)	{		alert("Enter some text to search for and select at least one location to search.");		return(false);	}	dump("Search text: " + text + "\n");	// get selected search engines	var treeNode = document.getElementById("NC:SearchEngineRoot");	if (!treeNode)	return(false);	var treeChildrenNode = null;	var numChildren = treeNode.childNodes.length;	for (var x = 0; x<numChildren; x++)	{		if (treeNode.childNodes[x].tagName == "treechildren")		{			treeChildrenNode = treeNode.childNodes[x];			break;		}	}	if (treeChildrenNode == null)	return(false);	gText = text;	var searchURL="";	var foundEngine = false;	var numEngines = treeChildrenNode.childNodes.length;	dump("doSearch(): " + numEngines + " engines.\n");	for (var x = 0; x<numEngines; x++)	{		var treeItem = treeChildrenNode.childNodes[x];		if (!treeItem)		{			dump("doSearch(): huh? treeitem is null.\n");			continue;		}		var checkedFlag = false;		if (treeItem.childNodes[0].childNodes[0].childNodes[0].checked == true)		{			checkedFlag = true;		}		else if (treeItem.childNodes[0].childNodes[0].childNodes[0].getAttribute("checked") == "1")		{			checkedFlag = true;		}		if (checkedFlag == true)		{			var engineURI = treeItem.getAttribute("id");			if (!engineURI)	continue;			dump ("doSearch(): Checked: # " + x + ":  " + engineURI + "\n");			var searchEngineName = treeItem.childNodes[0].childNodes[1].childNodes[0].getAttribute("value");			if (searchEngineName != "")			{				if (gSites != "")				{					gSites += ", ";				}				gSites += searchEngineName;			}			if (searchURL == "")			{				searchURL = "internetsearch:";			}			else			{				searchURL += "&";			}			searchURL += "engine=" + engineURI;			foundEngine = true;		}	}	if (foundEngine == false)	{		alert("Select at least one location to search.");		return(false);	}	searchURL += "&text=" + escape(text);	dump("\nInternet Search URL: " + searchURL + "\n");	// set text in results pane	var summaryNode = parent.frames[1].document.getElementById("internetresultssummary");	if (summaryNode)	{		var summaryText = "Results of searching for '";		summaryText += text + "':  ";		summaryNode.setAttribute("value", summaryText);	}	// load find URL into results pane	var resultsTree = parent.frames[1].document.getElementById("internetresultstree");	if (!resultsTree)	return(false);	resultsTree.setAttribute("ref", searchURL);	// start off showing all engine results	resultsTree.setAttribute("style", "height: 70%; width: 100%;");	var contentArea = parent.frames[1].document.getElementById("content");	if (contentArea)	{		contentArea.setAttribute("style", "height: 100; width: 100%;");		parent.frames[1].frames[0].document.location = "default.htm";	}	// enable "Save Search" button	var searchButton = document.getElementById("SaveSearch");	if (searchButton)	{		searchButton.removeAttribute("disabled", "false");	}	dump("doSearch done.\n");	return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/e796481a8fae2e00713b26dbcb7c982c76ba9876/internet.js/buggy/xpfe/components/search/resources/internet.js