rem: navWindow._content.setInitialSort(colNode, "descending"); 
add: navWindow.content.setInitialSort(colNode, "descending"); 
context: function doStop(){  if (!gSearchButtonText)    gSearchButtonText = searchBundle.getString("searchButtonText");  var searchButtonNode = document.getElementById("searchButton");  searchButtonNode.removeAttribute("stop");  searchButtonNode.setAttribute("label", gSearchButtonText);  // should stop button press also stop the load of the page in the browser? I think so.  var progressNode = parent.document.getElementById("statusbar-icon");  if (progressNode)    progressNode.setAttribute("mode", "normal");  // stop any network connections  var internetSearchService = Components.classes[ISEARCH_CONTRACTID].getService(nsIInternetSearchService);  internetSearchService.Stop();  // show appropriate column(s)  var navWindow = getNavigatorWindow(false);  var resultsList = navWindow ? navWindow._content.document.getElementById("resultsList") : null;  if (!resultsList)    return;  var searchURL = resultsList.getAttribute("ref");  if (!searchURL)    return;  var internetSearch = internetSearchService.QueryInterface(nsIRDFDataSource);  // get various services  var rdf = Components.classes[RDFSERVICE_CONTRACTID].getService(nsIRDFService);  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);  var colNode;  var sortSetFlag = false;  if (hasPriceFlag) {    colNode = navWindow._content.document.getElementById("PriceColumn");    if (colNode) {      colNode.removeAttribute("hidden");      if (!sortSetFlag) {        top._content.setInitialSort(colNode, "ascending");        sortSetFlag = true;      }    }  }  if (hasAvailabilityFlag) {    colNode = navWindow._content.document.getElementById("AvailabilityColumn");    if (colNode)      colNode.removeAttribute("hidden");  }  if (hasDateFlag) {    colNode = navWindow._content.document.getElementById("DateColumn");    if (colNode)      colNode.removeAttribute("hidden");  }  if (hasRelevanceFlag) {    colNode = navWindow._content.document.getElementById("RelevanceColumn");    if (colNode) {      colNode.removeAttribute("hidden");      if (!sortSetFlag) {        navWindow._content.setInitialSort(colNode, "descending");        sortSetFlag = true;      }    }  }  if (!sortSetFlag) {    colNode = navWindow._content.document.getElementById("PageRankColumn");    if (colNode)      navWindow._content.setInitialSort(colNode, "ascending");  }  switchTab(0);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1d353cf17066d2f547c8c0c0a4ef429259ec9263/search-panel.js/buggy/suite/common/search/search-panel.js