rem: if (haveSearchRef == true) { saveQueryButton.removeAttribute("disabled", "true"); } else { saveQueryButton.setAttribute("disabled", "true"); } return(true); 
add: saveQueryButton.disabled = haveSearchRef ? false : true;  return(true); 
context: function switchTab( aPageIndex ){	var deck = document.getElementById( "advancedDeck" );	deck.setAttribute( "index", aPageIndex );    	// decide whether to show/hide/enable/disable save search query button	if (aPageIndex != 0)	return(true);	var saveQueryButton = document.getElementById("saveQueryButton");	if (!saveQueryButton)	return(true);	var resultsTree = document.getElementById("Tree");	if( !resultsTree)	return(false);	var ds = resultsTree.database;	if (!ds)		return(false);	var	haveSearchRef = false;    var rdf = Components.classes[RDFSERVICE_PROGID].getService(nsIRDFService);	if (rdf)	{		var source = rdf.GetResource( "NC:LastSearchRoot", true);		var childProperty;		var target;		// look for last search URI		childProperty = rdf.GetResource("http://home.netscape.com/NC-rdf#ref", true);		target = ds.GetTarget(source, childProperty, true);		if (target)	target = target.QueryInterface(nsIRDFLiteral);		if (target)	target = target.Value;		if (target && target != "")		{			haveSearchRef = true;		}	}	if (haveSearchRef == true)	{		saveQueryButton.removeAttribute("disabled", "true");    }	else	{		saveQueryButton.setAttribute("disabled", "true");    }    return(true);}
meta: 10234	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/10234/3c52bd48ffd914359df4157be775f67c499fcff8/search-panel.js/buggy/suite/common/search/search-panel.js