<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/search/search.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/search/internet.css" type="text/css"?>
<?xml-stylesheet href="chrome://communicator/skin/search/icons.css" type="text/css"?>

<!DOCTYPE window SYSTEM "chrome://communicator/locale/search/internet.dtd">

<window class="dialog" orient="vertical"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="loadPage()" onunload="unloadPage()">

  <script type="application/x-javascript" src="chrome://communicator/content/search/internet.js" />
  <script type="application/x-javascript" src="chrome://communicator/content/search/shared.js" />

  <box>
    <spring flex="100%" />

    <html>&search.label;</html>

    <template id="categoryTemplate">
      <rule iscontainer="true">
        <menulist uri="..." label="rdf:http://home.netscape.com/NC-rdf#title" />
      </rule>
  
      <rule>
        <menuitem uri="..." value="rdf:http://home.netscape.com/NC-rdf#category"
                  label="rdf:http://home.netscape.com/NC-rdf#title" />
      </rule>
    </template>

    <menulist id="categoryList" template="categoryTemplate" ref="NC:SearchCategoryRoot" datasources="rdf:null"
              sortResource="http://home.netscape.com/NC-rdf#title" sortDirection="ascending"
              onchange="return chooseCategory(this)" >

      <menuitem value="NC:SearchEngineRoot" label="&allengines.label;"/>

    </menulist>

    <html>&for.label;</html>
    <textfield id="searchtext" size="20" onkeypress="if (event.keyCode == 13) { doSearch(); }" />
    <button id="searchbutton" oncommand="return doSearch();" label="&search.button.label;"/>
    <button id="stopbutton" oncommand="return doStop();" style="display: none;" label="&stop.button.label;"/>
    <spring flex="100%"/>
  </box>

  <box style="height: 85%; width: 100%;" flex="1" >
    <spring flex="50%" />
    <tree orient="horizontal" id="searchengines" border="1" flex="1" datasources="rdf:internetsearch" ref="NC:SearchEngineRoot">
      <treecolgroup>
        <treecol id="CheckboxColumn" flex="1"/>
        <treecol id="NameColumn" resource="http://home.netscape.com/NC-rdf#Name" sortActive="true" sortDirection="ascending" flex="1"/>
        <treecol id="DescColumn" resource="http://home.netscape.com/NC-rdf#Description" resource2="http://home.netscape.com/NC-rdf#Name" flex="1"/>
      </treecolgroup>

      <template>
        <treechildren flex="1">
          <treeitem uri="..." loading="rdf:http://home.netscape.com/NC-rdf#loading" >
            <treerow>
              <treecell allowevents="true">
                <checkbox oncommand="doCheck(this)" />
              </treecell>
              <treecell allowevents="true">
                <button class="iconic" flex="1" crop="right" src="rdf:http://home.netscape.com/NC-rdf#Icon" label="rdf:http://home.netscape.com/NC-rdf#Name" />
              </treecell>
              <treecell allowevents="true">
                <button flex="1" crop="right" label="rdf:http://home.netscape.com/NC-rdf#Description" />
              </treecell>
            </treerow>
          </treeitem>
        </treechildren>
      </template>

      <treehead>
        <treerow>
          <treecell label="&checkbox.column.label;"/>
          <treecell observes="NameColumn" label="&engine.column.label;" resource="http://home.netscape.com/NC-rdf#Name" onclick="return doSort('NameColumn');" sortActive="true" sortDirection="ascending"/>
          <treecell observes="DescColumn" label="&description.column.label;" resource="http://home.netscape.com/NC-rdf#Description" resource2="http://home.netscape.com/NC-rdf#Name" onclick="return doSort('DescColumn');" />
        </treerow>
      </treehead>
    </tree>
    <spring flex="50%" />
  </box>

  <box style="width: 100%;" >
    <spring flex="100%" />
    <button oncommand="doCheckAll(true);" label="&checkall.button.label;"/>
    <button oncommand="doCheckAll(false);" label="&uncheckall.button.label;"/> 
    <button id="SaveSearch" disabled="true" oncommand="saveSearch();" label="&savesearch.button.label;"/>
    <spring flex="100%"/>
  </box>
</window>
