add: dump("*** navWindow = " + navWindow + "\n"); 
context: function doSearch(){  var searchButton = document.getElementById("searchbutton");        if ( searchButton.getAttribute("disabled") )	{	   	   var sidebarSearchText = document.getElementById("sidebar-search-text");	   sidebarSearchText.focus();	   return;	}	//get click count pref for later	//and set tree attribute to cause proper results appearance (like links) to happen 	//when user set pref to single click	var searchMode = 0;    var mClickCount = 1;    var prefvalue = false;    try    {        if( pref )        {            searchMode = pref.GetIntPref("browser.search.mode");            prefvalue = pref.GetBoolPref( "browser.search.use_double_clicks" );            mClickCount = prefvalue ? 2 : 1;        }     }    catch(e)    {        searchMode = 0;        mClickCount = 1;        prefvalue = false;    }    var tree = document.getElementById("Tree");    if (mClickCount == 1)    {        tree.setAttribute("singleclick","true");    }    else    {        tree.removeAttribute("singleclick");    }  	// hide various columns    var navWindow = getNavigatorWindow();    if( navWindow._content.isMozillaSearchWindow )    {        colNode = navWindow._content.document.getElementById("RelevanceColumn");        if (colNode)	colNode.setAttribute("style", "width: 0; visibility: collapse;");        colNode = navWindow._content.document.getElementById("PriceColumn");        if (colNode)	colNode.setAttribute("style", "width: 0; visibility: collapse;");        colNode = navWindow._content.document.getElementById("AvailabilityColumn");        if (colNode)	colNode.setAttribute("style", "width: 0; visibility: collapse;");    }	// get user text to find	var textNode = document.getElementById("sidebar-search-text");	if(!textNode)   return(false);	if ( !textNode.value )	{    alert(bundle.GetStringFromName("enterstringandlocation") );		return(false);	}	var searchURL   = "";	var foundEngine = false;  var engineURIs  = [];  if (searchMode > 0)  {      // in advanced search mode, get selected search engines      // (for the current search category)  	var engineBox = document.getElementById("engineKids");  	if (!engineBox)	return(false);  	for (var x = 0; x<engineBox.childNodes.length; x++)  	{  	  var treeitemNode = engineBox.childNodes[x];      if (!treeitemNode) continue;        var checkboxNode = treeitemNode.firstChild.firstChild.firstChild;      if (!checkboxNode) continue;            if ( checkboxNode.checked == true || checkboxNode.checked == "true")       {        var engineURI = treeitemNode.getAttribute("id");        if (!engineURI)	continue;        engineURIs[engineURIs.length] = engineURI;        foundEngine = true;      }    }    if (!foundEngine)    {      if( getNumEngines() == 1 ) {        // only one engine in this category, check it        var treeitemNode = engineBox.firstChild;        engineURIs[engineURIs.length] = treeitemNode.getAttribute("id");      }      else {        for( var i = 0; i < engineBox.childNodes.length; i++ )        {          var treeitemNode = engineBox.childNodes[i];          var theID = treeitemNode.getAttribute("id");          if( theID.indexOf("NetscapeSearch.src") != -1 )          {            engineURIs[engineURIs.length] = theID;            foundEngine = true;            break;          }        }        if (foundEngine == false)        {            alert(bundle.GetStringFromName("enterstringandlocation") );            return(false);        }      }  	}  }	// hide search button	var searchButtonNode = document.getElementById("searchbutton");	if (searchButtonNode)    searchButtonNode.setAttribute("style", "display: none;");		// show stop button	var stopButtonNode = document.getElementById("stopbutton");	if (stopButtonNode)    stopButtonNode.removeAttribute("style", "display: none;");	var progressNode = top.document.getElementById("statusbar-icon");	if (progressNode)    progressNode.setAttribute( "mode", "undetermined" );     // run the search  OpenSearch(textNode.value, engineURIs );  switchTab(0);  return(true);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/530cb77d23c38264e2e6a26e19ff5b00a064ca14/search-panel.js/clean/xpfe/components/search/resources/search-panel.js