<?xml version="1.0"?>

<?xml-stylesheet href="chrome://searchwp/skin/global.css" ?>
<?xml-stylesheet href="chrome://searchwp/skin/highlighting-agent.css" ?>

<!DOCTYPE overlay SYSTEM "chrome://searchwp/locale/searchwp.dtd">

<overlay id="searchwpOverlay"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <stringbundleset id="stringbundleset">
    <stringbundle id="bundle_searchwp" src="chrome://searchwp/locale/searchwp.properties" />
  </stringbundleset>

  <keyset id="mainKeyset">
    <key id="key_findAgain2" keycode="VK_F3" oncommand="gSearchWPOverlay.onFindAgain(event);" />
    <key id="key_findPrevious2" keycode="VK_F3" modifiers="shift" oncommand="gSearchWPOverlay.onFindAgain(event);"
/>
    <key id="key_highlight" keycode="VK_F8" oncommand="gSearchWPHighlighting.toggleHighlight();" />
  </keyset>


  <toolbarpalette id="BrowserToolbarPalette">
    <toolbaritem id="searchwp-terms-container">
      <label id="searchwp-terms-title" value="&toolbar.terms.label;" />
      <toolbarseparator id="searchwp-separator-1" hidden="true" />
      <hbox id="searchwp-terms-box" align="center">
        <toolbarbutton id="searchwp-terms-box-0" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-1" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-2" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-3" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-4" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-5" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-6" hidden="true" />
        <toolbarbutton id="searchwp-terms-box-7" hidden="true" />
      </hbox>
      <toolbarbutton id="searchwp-terms-menu" type="menu" container="true" hidden="true"
          class="chevron">
        <menupopup id="searchwp-terms-popup" class="menu-iconic">
          <toolbarbutton id="searchwp-terms-popup-0" hidden="true" />
          <toolbarbutton id="searchwp-terms-popup-1" hidden="true" />
          <toolbarbutton id="searchwp-terms-popup-2" hidden="true" />
          <toolbarbutton id="searchwp-terms-popup-3" hidden="true" />
        </menupopup>
      </toolbarbutton>
      <toolbarseparator id="searchwp-separator-2" hidden="true" />
    </toolbaritem>

    <toolbaritem id="searchwp-highlight-container" align="center">
      <toolbarbutton id="searchwp-highlight-button" class="chromeclass-toolbar-additional"
          label="&button.highlight.label;" tooltiptext="&button.highlight.tooltiptext;"
          oncommand="gSearchWPHighlighting.toggleHighlight(!this.checked);" onclick="if(event.button==1)
ClearFields_Search();"
          type="checkbox" disabled="false" />
    </toolbaritem>
  </toolbarpalette>
<script>
function ClearFields_Search()
{
var searchbar = document.getElementById('searchbar');
if (searchbar) {
    searchbar.focus();
    if (searchbar.mTextbox) searchbar.mTextbox.value = "";
            searchbar.value = "";
    var evt = document.createEvent("Events");
    evt.initEvent("oninput", true, true);
    searchbar.dispatchEvent(evt);
}
};
</script>
    <script type="application/x-javascript" src="chrome://searchwp/content/fixKeyset.js" />
    <script type="application/x-javascript" src="chrome://searchwp/content/global.js" />
  <script type="application/x-javascript" src="chrome://searchwp/content/highlighting.js" />
  <script type="application/x-javascript" src="chrome://searchwp/content/highlighter.js" />
  <script type="application/x-javascript" src="chrome://searchwp/content/termsToolbar.js" />
  <script type="application/x-javascript" src="chrome://searchwp/content/termsUtil.js" />
  <script type="application/x-javascript" src="chrome://searchwp/content/overlay.js" />
</overlay>
