rem: var isupports = Components.classes["component: if (isupports) { var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService); if (internetSearchService) internetSearchService.Stop(); } 
add: var internetSearchService = Components.classes[ISEARCH_PROGID].getService(nsIInternetSearchService); var internetSearch = null; if (internetSearchService) { internetSearchService.Stop(); internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource); } 
context: function doStop(){	// should stop button press also stop the load of the page in the browser? I think so. 	var progressNode = parent.document.getElementById("statusbar-icon");	var stopButtonNode = document.getElementById("stopbutton");	var searchButtonNode = document.getElementById("searchbutton");	if(progressNode && stopButtonNode && searchButtonNode )	{		progressNode.setAttribute("mode", "normal");		stopButtonNode.setAttribute("style", "display: none;");		searchButtonNode.setAttribute("style", "display: inherit;");	}	// stop any network connections	var isupports = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();	if (isupports)	{		var internetSearchService = isupports.QueryInterface(Components.interfaces.nsIInternetSearchService);		if (internetSearchService)			internetSearchService.Stop();	}	// get various services	var rdf = Components.classes["component://netscape/rdf/rdf-service"].getService();	if (rdf)   rdf = rdf.QueryInterface(Components.interfaces.nsIRDFService);	var internetSearch = Components.classes["component://netscape/rdf/datasource?name=internetsearch"].getService();	if (internetSearch)	internetSearch = internetSearch.QueryInterface(Components.interfaces.nsIRDFDataSource);	var sortSetFlag = false;	// show appropriate column(s)	if ((rdf) && (internetSearch))	{		var resultsTree = top._content.document.getElementById("internetresultstree");		if( !resultsTree )			return(false);		var searchURL = resultsTree.getAttribute("ref");		if( !searchURL )				return(false);		var searchResource       = rdf.GetResource(searchURL, true);		var priceProperty        = rdf.GetResource("http://home.netscape.com/NC-rdf#Price", true);		var availabilityProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#Availability", true);		var relevanceProperty    = rdf.GetResource("http://home.netscape.com/NC-rdf#Relevance", true);		var dateProperty         = rdf.GetResource("http://home.netscape.com/NC-rdf#Date", true);		var trueProperty         = rdf.GetLiteral("true");		var hasPriceFlag         = internetSearch.HasAssertion(searchResource, priceProperty, trueProperty, true);		var hasAvailabilityFlag  = internetSearch.HasAssertion(searchResource, availabilityProperty, trueProperty, true);		var hasRelevanceFlag     = internetSearch.HasAssertion(searchResource, relevanceProperty, trueProperty, true);		var hasDateFlag          = internetSearch.HasAssertion(searchResource, dateProperty, trueProperty, true);		if(hasPriceFlag == true)		{			var colNode = top._content.document.getElementById("PriceColumn");			if (colNode)			{				colNode.removeAttribute("style", "width: 0; visibility: collapse;");				if (sortSetFlag == false)				{					top._content.setInitialSort(colNode, "ascending");					sortSetFlag = true;				}			}		}		if (hasAvailabilityFlag == true)		{			colNode = top._content.document.getElementById("AvailabilityColumn");			if (colNode)				colNode.removeAttribute("style", "width: 0; visibility: collapse;");		}		if (hasDateFlag == true)		{			colNode = top._content.document.getElementById("DateColumn");			if (colNode)				colNode.removeAttribute("style", "width: 0; visibility: collapse;");		}		if (hasRelevanceFlag == true)		{			colNode = top._content.document.getElementById("RelevanceColumn");			if (colNode)			{				colNode.removeAttribute("style", "width: 0; visibility: collapse;");				if (sortSetFlag == false)				{					top._content.setInitialSort(colNode, "descending");					sortSetFlag = true;				}			}		}	}	if (sortSetFlag == false)	{		colNode = top._content.document.getElementById("PageRankColumn");		if (colNode)			top._content.setInitialSort(colNode, "ascending");	}	switchTab(0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/6a80dfc41c74ac5b49360af43d1f736a30d98b45/search-panel.js/clean/suite/common/search/search-panel.js