<?xml version="1.0"?> <!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
<!--

  The contents of this file are subject to the Netscape Public
  License Version 1.1 (the "License"); you may not use this file
  except in compliance with the License. You may obtain a copy of
  the License at http://www.mozilla.org/NPL/
 
  Software distributed under the License is distributed on an "AS
  IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  implied. See the License for the specific language governing
  rights and limitations under the License.
 
  The Original Code is mozilla.org code.
 
  The Initial Developer of the Original Code is Netscape
  Communications Corporation.  Portions created by Netscape are
  Copyright (C) 1998 Netscape Communications Corporation. All
  Rights Reserved.
 
  Contributor(s): 

-->

<?xml-stylesheet href="chrome://search/skin/" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://search/locale/search-panel.dtd" >
<window
  xmlns:html="http://www.w3.org/TR/REC-html40"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  align="vertical"
  onload="SearchPanelStartup();"
  onunload="SearchPanelShutdown();">

  <html:script src="chrome://global/content/strres.js"/>
  <html:script src="chrome://search/content/search-panel.js" />
  <html:script src="chrome://search/content/shared.js" />

<popupset>
<popup id="contextual" oncreate="return fillContextMenu('contextual', 'Tree');" >
	<menu />
</popup>
</popupset>

      <box align="vertical">
        <box align="horizontal" class="spaced">
        	<html:input id="sidebar-search-text" flex="1" onkeyup="if (event.which == 13) { return doSearch(); }" />
          <titledbutton id="searchbutton" value="&search.button.label;" onclick="return doSearch();" class="dialog toolbar-non-iconic"/>
          <titledbutton id="stopbutton" align="left" src="resource:/res/rdf/loading.gif" value="&stop.button.label;" onclick="return doStop();" class="dialog toolbar-non-iconic" style="display:none;"/>
        </box>
        <box align="horizontal" class="spaced">

		<text value="&within.label;" />

		<menulist id="categoryList" ref="NC:SearchCategoryRoot" datasources="rdf:null"
        		onmousedown="return switchTab(1);" >

	        	<template>
	        		<menupopup>
	        			<menuitem uri="rdf:*" oncommand="return chooseCategory(this);"
	        				data="rdf:http://home.netscape.com/NC-rdf#category"
	        				value="rdf:http://home.netscape.com/NC-rdf#title" />
	        		</menupopup>
	        	</template>

			<menupopup id="categoryPopup">
				<menuitem data="NC:SearchEngineRoot" value="&allengines.label;"
					oncommand="return chooseCategory(this)" />
				<menuseparator />
			</menupopup>
		</menulist>
        </box>
      </box>

  <deck id="advancedDeck" flex="100%" style="border:none;">
      
      <!-- results panel -->
        
        <box align="vertical" class="searchpanel-outerbox" flex="1">

        <tree id="Tree" ref="NC:LastSearchRoot" context="contextual"
          rdf:resource="http://home.netscape.com/NC-rdf#PageRank"
          rdf:resource2="http://home.netscape.com/NC-rdf#Name"
          sortDirection="ascending" sortActive="true"
          class="inset"
          flex="100%"
          datasources="rdf:internetsearch"
          onclick="sidebarOpenURL(event, event.target.parentNode.parentNode, 'Tree')">
      
          <template>
            <rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
              <treechildren>
                <treeitem uri="...">
                  <treerow>
                    <treecell>
                      <html:hr width="100%" size="1" />
                    </treecell>
                  </treerow>
                </treeitem>
              </treechildren>
            </rule>

            <rule>
              <treechildren>
                <treeitem uri="..." persist="open"
                        loading="rdf:http://home.netscape.com/NC-rdf#loading"
			searchtype="rdf:http://home.netscape.com/NC-rdf#SearchType"
                        type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
                  <treerow class="searchresult">
                    <treecell value="rdf:http://home.netscape.com/NC-rdf#Name"
                              src="rdf:http://home.netscape.com/NC-rdf#Icon" />
                    <treecell />
                  </treerow>
                </treeitem>
              </treechildren>
            </rule>
          </template>

          <treehead>
            <treerow>
              <treecell observes="SortNameColumn" align="center" value="&results.label;" resource="http://home.netscape.com/NC-rdf#Name" onclick="return doSort('SortNameColumn', 'http://home.netscape.com/NC-rdf#PageRank');" sortActive="true" sortDirection="ascending" flex="1"/>
            </treerow>
          </treehead>

          <treecol style="width: 100%;" flex="100%" rdf:resource="http://home.netscape.com/NC-rdf#PageRank" rdf:resource2="http://home.netscape.com/NC-rdf#Name" />
          // magic, hidden secondary column used for sorting
          <treecol style="width: 0;" id="SortNameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name" />
      
        </tree>

	<box align="horizontal">
		<spring flex="1" />
		<titledbutton id="saveQueryButton" value="&savesearch.button.label;" onclick="return saveSearch();" class="dialog toolbar-non-iconic"/>
		<spring flex="1" />
	</box>

      </box>
      
      <!-- advanced panel -->
      <box align="vertical" class="searchpanel-outerbox" flex="1">
      
        <tree align="horizontal" id="searchengines" flex="1" datasources="rdf:internetsearch" ref="NC:SearchEngineRoot" class="inset">
          <treecol id="CheckboxColumn" class="checkboxColumn" />
          <treecol id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name" sortActive="true" sortDirection="ascending" />
          <template>
            <treechildren>
              <treeitem uri="..." loading="rdf:http://home.netscape.com/NC-rdf#loading" >
                <treerow>
                  <treecell allowevents="true">
                    <checkbox onclick="doCheck(this)" />
                  </treecell>
                  <treecell>
                    <titledbutton class="iconic" flex="1" crop="right" align="left" src="rdf:http://home.netscape.com/NC-rdf#Icon" value="rdf:http://home.netscape.com/NC-rdf#Name" />
                  </treecell>
                </treerow>
              </treeitem>
            </treechildren>
          </template>
          <treehead>
            <treerow>
              <treecell value="&checkbox.column.label;" style="width: 23px;"/>
              <treecell observes="NameColumn" align="center" value="&engine.column.label;" resource="http://home.netscape.com/NC-rdf#Name" onclick="return doSort('NameColumn', null);" sortActive="true" sortDirection="ascending" flex="1"/>
            </treerow>
          </treehead>
        </tree>
      </box>
  </deck>
</window>
