rem: var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService); if (rdf) { var source = rdf.GetResource( "NC:LastSearchRoot", true); var childProperty = rdf.GetResource("http: var target = ds.GetTarget(source, childProperty, true); if (target)	target = target.QueryInterface(nsIRDFLiteral); if (target)	target = target.Value; if (target && target != "") { var textNode = document.getElementById("sidebar-search-text"); if (!textNode)	return(false);   target = target.replace(/+/i, " ");  textNode.value = unescape(target); return(true); } } return(false); 
add: var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService); var source = rdf.GetResource("NC:LastSearchRoot", true); var childProperty = rdf.GetResource("http: var target = ds.GetTarget(source, childProperty, true); if (target) { target = target.QueryInterface(nsIRDFLiteral).Value; if (target) {  target = target.replace(/+/i, " "); var textNode = document.getElementById("sidebar-search-text"); textNode.value = unescape(target); return true; } } return false; 
context: function haveSearchResults(){	var resultsTree = document.getElementById("Tree");	if( !resultsTree)	return(false);	var ds = resultsTree.database;	if (!ds)		return(false);    var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService);	if (rdf)	{		var source = rdf.GetResource( "NC:LastSearchRoot", true);		var childProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#LastText", true);		var target = ds.GetTarget(source, childProperty, true);		if (target)	target = target.QueryInterface(nsIRDFLiteral);		if (target)	target = target.Value;		if (target && target != "")		{			var textNode = document.getElementById("sidebar-search-text");			if (!textNode)	return(false);			// convert pluses (+) back to spaces			target = target.replace(/+/i, " ");			textNode.value = unescape(target);			return(true);		}	}	return(false);}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/92255768432d56941bc6db8dcc4e84be97378a11/search-panel.js/clean/suite/common/search/search-panel.js