<?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://communicator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/search/search.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://communicator/locale/search/search-panel.dtd" >
<window id="searchPanel" class="box-padded color-dialog"
        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"
        orient="vertical" onload="SearchPanelStartup();"
        onunload="SearchPanelShutdown();">

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

  <popupset>
    <popup id="contextual" oncreate="return fillContextMenu('contextual', 'Tree');" >
    	<menu />
    </popup>
  </popupset>
  <box orient="vertical">
    <box autostretch="never">
      <textfield id="sidebar-search-text" flex="1" onkeypress="if (event.which == 13) { return doSearch(); }" />
		  <box autostretch="never">
			  <button class="button-toolbar-3" id="searchbutton" value="&search.button.label;" oncommand="return doSearch();"/>
			  <button class="button-toolbar-3" id="stopbutton" align="left" src="resource:/res/rdf/loading.gif" value="&stop.button.label;" oncommand="return doStop();" style="display:none;"/>
  		</box>
    </box>
    <box id="categoryBox" autostretch="never">
		  <text class="label" value="&within.label;" />
  		<menulist id="categoryList" ref="NC:SearchCategoryRoot" datasources="rdf:null" oncommand="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="1">
    <box align="vertical" class="searchpanel-outerbox" flex="1">
      <tree id="Tree" class="inset" ref="NC:LastSearchRoot"
            rdf:resource="http://home.netscape.com/NC-rdf#PageRank"
            rdf:resource2="http://home.netscape.com/NC-rdf#Name"
            sortDirection="ascending" sortActive="true"
            flex="1" datasources="rdf:internetsearch" context="contextual"
            onclick="sidebarOpenURL(event, event.target.parentNode.parentNode, 'Tree')">
      
        <template>
          <rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
            <treechildren>
              <treeitem uri="...">
                <treerow>
                  <treecell>
                    <separator class="groove"/>
                  </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 class="treecell-iconic" 
                            src="rdf:http://home.netscape.com/NC-rdf#Icon"
                            value="rdf:http://home.netscape.com/NC-rdf#Name" />
                </treerow>
              </treeitem>
            </treechildren>
          </rule>
        </template>
      
        <treehead>
          <treerow>
            <treecell class="treecell-header sortDirectionIndicator outset" 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" />
        <treecol style="width: 0;" id="SortNameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name" />
      </tree>
      
      <box>
    		<spring flex="1" />
    		<button id="saveQueryButton" value="&savesearch.button.label;" oncommand="return saveSearch();"/>
    		<spring flex="1" />
    	</box>

    </box>
      
    <box align="vertical" class="searchpanel-outerbox" flex="1">

      <box orient="vertical" id="searchengines" datasources="rdf:internetsearch"
           flex="1" class="inset color-window" autostretch="never" valign="top">
        <template>
          <rule>
            <checkbox uri="..." loading="rdf:http://home.netscape.com/NC-rdf#loading"
                      oncommand="doCheck(this);"
                      src="rdf:http://home.netscape.com/NC-rdf#Icon" 
                      value="rdf:http://home.netscape.com/NC-rdf#Name" />
          </rule>
        </template>
      </box>
      <box>
    		<spring flex="1" />
		    <button id="customizeButton" value="&customize.button.label;" oncommand="return doCustomize();"/>
    		<spring flex="1" />
    	</box>
    </box>
  </deck>
</window>
