<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!--
/*
 * Copyright (c) OutWit Technologies 2007-2017.
 * All rights reserved.
 */
-->

<!DOCTYPE window [
  <!ENTITY % menuDTD SYSTEM "chrome://outwit-modules-docs/locale/menu.dtd">
  %menuDTD;
  <!ENTITY % kernelMenuDTD SYSTEM "chrome://outwit-kernel/locale/widgets/menu.dtd">
  %kernelMenuDTD;

]>
<overlay
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  xmlns:html="http://www.w3.org/1999/xhtml">

  <script type="application/x-javascript">
    <![CDATA[

      /************************** override of the  BROWSE action ***********************************/
      function browseStartHoldingMouseTest(event) {
        if (event.button == 2) {
          clickFlag = true;
          document.getElementById("browseActionMenupopup").children[4].setAttribute("checked","true");
          coreKit.timerService.setTimer(50, null, browseStillHoldingMouseTest);
        } else {
          clickFlag = true;
          document.getElementById("browseActionMenupopup").children[4].setAttribute("checked","true");
          coreKit.timerService.setTimer(500, null, browseStillHoldingMouseTest);
        }
      }

      function browseStillHoldingMouseTest() {
        if ((clickFlag) && (document.getElementById("browse-button").getAttribute( "disabled") != "true")) {
          //document.getElementById("browseActionMenupopup").openPopup(document.getElementById("browse-button") , "after_start" , -1, -7, false, false );
          clickFlag = false;
        }
      }

      function browseStopHoldingMouseTest() {
        clickFlag = false;
      }


      /************************** override of the  DIG action ***********************************/
      function digStartHoldingMouseTest(event){
        if (event.button == 2) {
          clickFlag = true;
          document.getElementById("digActionAnywhereDepth0").setAttribute("checked", "true");
          coreKit.timerService.setTimer(50, null, digStillHoldingMouseTest);
        } else {
          clickFlag = true;
          document.getElementById("digActionAnywhereDepth0").setAttribute("checked", "true");
          coreKit.timerService.setTimer(500, null, digStillHoldingMouseTest);
        }
      }

      function digStillHoldingMouseTest() {
        if ((clickFlag) && (document.getElementById("dig-button").getAttribute("disabled") != "true")) {
          //document.getElementById("digActionMenupopup").openPopup(document.getElementById("dig-button") , "after_start" , -1, -7, false, false );
          clickFlag = false;
        }
      }

      function digStopHoldingMouseTest(){
        clickFlag = false;
      }
    ]]>
  </script>


  <toolbox id="owToolbox">
    <toolbar
      id="owToolbarPalette"
      mode="icons"
      iconsize="large"
      align="center"
      style="max-height:41px;min-height:41px;overflow:hidden;font-size:8pt">
        <toolbaritem id="unified-back-forward-button">
          <toolbarbutton id="back-button"

            chromedir='ltr'
            command="cmd_previous"
            class="toolbarbutton-1"
            onmouseover="gNotification.showHelp('back')"
            align="center"
            orient="horizontal"
            onmouseout="gNotification.hide()"
            tooltiptext="&toolbar.back.tooltiptext;"
          />
          <toolbarbutton
            id="forward-button"
            chromedir='ltr'
            command="cmd_forward"
            class="toolbarbutton-1"
            onmouseover="gNotification.showHelp('forward')"
            align="center"
            orient="horizontal"
            onmouseout="gNotification.hide()"
            tooltiptext="&toolbar.forward.tooltiptext;"
          />

          <toolbarbutton
            id="back-forward-dropmarker"
            type="menu"
            align="center"
            orient="horizontal"
            chromedir=''
          >
            <menupopup
              onpopupshowing="historyHandler.fillHistoryMenu(this)"
              oncommand="historyHandler.onCommand(event)">
            </menupopup>
          </toolbarbutton>
        </toolbaritem>


        <toolbarbutton id="reload-button"

          chromedir='ltr'
          command="widgetPage:Reload"
          class="toolbarbutton-1"
          align="center"
          orient="horizontal"
          onmouseover="gNotification.showHelp('reload')"
          onmouseout="gNotification.hide()"
          tooltiptext="&toolbar.reload.tooltiptext;"
        />

        <toolbarbutton id="stopall-button"

          chromedir='ltr'
          command="widgetPage:StopAll"
          align="center"
          orient="horizontal"
          class="toolbarbutton-1"
          onmouseover="gNotification.showHelp('stop')"
          onmouseout="gNotification.hide()"
          tooltiptext="&toolbar.stop.tooltiptext;"
        />

        <toolbaritem id="outwitIcons">
          <toolbarseparator id="separator" style="background:none"/>
          <toolbarbutton
            id="next-button"
            chromedir='ltr'
            command="widgetPage:Next"
            align="center"
            orient="horizontal"
            class="toolbarbutton-1"
            onmouseover="gNotification.showHelp('next')"
            onmouseout="gNotification.hide()"
            tooltiptext="&toolbar.next.tooltiptext;"
          />

          <toolbarbutton
            id="browse-button"
            class="toolbarbutton-1"
            onmouseover="gNotification.showHelp('autoBrowse')"
            onmouseout="gNotification.hide()"
            align="center"
            orient="horizontal"
            command="widgetPage:Browse"
            tooltiptext="&toolbar.browse.tooltiptext;"
            onmousedown="browseStartHoldingMouseTest(event);"
            onmouseup="browseStopHoldingMouseTest(event)" >
            <menupopup id="browseActionMenupopup">
              <menuitem type="radio" actiontype="2"   label="&menu.Go.browse.twoPages;" />
              <menuitem type="radio" actiontype="3"   label="&menu.Go.browse.threePages;" />
              <menuitem type="radio" actiontype="5"   label="&menu.Go.browse.fivePages;" />
              <menuitem type="radio" actiontype="10"  label="&menu.Go.browse.tenPages;" />
              <menuitem type="radio" actiontype="all" label="&menu.Go.browse.allPages;" />
            </menupopup>
          </toolbarbutton>

          <toolbarbutton
            id="dig-button"
            chromedir='ltr'
            command="widgetPage:Dig"
            class="toolbarbutton-1"
            align="center"
            orient="horizontal"
            onmouseover="gNotification.showHelp('dig')"
            onmouseout="gNotification.hide()"
            tooltiptext="&toolbar.dig.tooltiptext;"
            onmousedown="digStartHoldingMouseTest(event);"
            onmouseup="digStopHoldingMouseTest(event)" >
            <menupopup id="digActionMenupopup">
              <menu id="digActionDomainMenu" label="&menu.Go.dig.domain;">
                <menupopup id="digActionDomainMenupopup">
                  <menuitem id="digActionDomainDepth0" label="&menu.Go.dig.depth0;" digdomain="domain" digdepth="1" />
                  <menuitem id="digActionDomainDepth1" label="&menu.Go.dig.depth1;" digdomain="domain" digdepth="2" />
                  <menuitem id="digActionDomainUnlimitedDepth" label="&menu.Go.dig.unlimitedDepth;" digdomain="domain" digdepth="-1"/>
                </menupopup>
              </menu>
              <menu label="&menu.Go.dig.notDomain;">
                <menupopup>
                  <menuitem label="&menu.Go.dig.depth0;"       digdomain="outsidedomain" digdepth="1"/>
                  <menuitem label="&menu.Go.dig.depth1;"        digdomain="outsidedomain" digdepth="2"/>
                </menupopup>
              </menu>
              <menu id="digActionAnywhereMenu" label="&menu.Go.dig.anywhere;">
                <menupopup id="digActionAnywhereMenupopup">
                  <menuitem id="digActionAnywhereDepth0" type="radio" label="&menu.Go.dig.depth0;" digdepth="1"/>
                  <menuitem id="digActionAnywhereDepth1" label="&menu.Go.dig.depth1;" digdepth="2"/>
                </menupopup>
              </menu>
            </menupopup>
          </toolbarbutton>

          <toolbarbutton
            id="up-button"
            chromedir='ltr'
            command="widgetPage:Up"
            align="center"
            orient="horizontal"
            class="toolbarbutton-1"
            onmouseover="gNotification.showHelp('up')"
            onmouseout="gNotification.hide()"
            tooltiptext="&toolbar.homeSite.tooltiptext;"
          />

        </toolbaritem>


        <!--
        <toolbarbutton
          id="find-button"
          chromedir='ltr'
          command="cmd_find"
          class="toolbarbutton-1"
          align="center"
          orient="horizontal"
          onmouseover="gNotification.showHelp('find')"
          onmouseout="gNotification.hide()"
          tooltiptext="&toolbar.search.tooltiptext;"
        />
        -->

        <toolbarseparator />

        <toolbaritem id="owDocsTopPanelToolbaritemUrl"
          flex="700"
          onmouseover="gNotification.showHelp('adressBox')"
          onmouseout="gNotification.hide()"
          align="center"
          >
            <textbox
              id="urlbar"
              flex="1"
              chromedir="ltr"
              type="autocomplete"
              frozen="true"
              autocompletesearch="history"
              autocompletepopup="PopupAutoCompleteRichResult"
              showcommentcolumn="true"
              showimagecolumn="true"
              disableAutocomplete="false"
              maxrows="6"
              newlines="stripsurroundingwhitespace"
              completeselectedindex="true"
              tabscrolling="true"
              enablehistory="true"
              ontextentered="historyHandler.newGo(this.value)"
              oninput="urlBarTextChange(this.value)"
              onchange="urlBarTextChange(this.value)"
            >
             <hbox chromedir="rtl" control="urlbar">
                <vbox class="textbox-input-box">
                  <spacer flex="1" />
                  <label id="object-class-label" value="" control="urlbar" class="transparent"/>
                  <spacer flex="1" />
                </vbox>
                <vbox class="textbox-input-box">
                </vbox>
              </hbox>
            </textbox>

          </toolbaritem>

					 <tooltip id="urlTooltip">
					<label crop="center" flex="1" class="tooltip-label"/>
					</tooltip>


          <toolbarbutton id="zoomReduce" class="toolbarButton" command="cmd_fullZoomReduce"
            tooltiptext="&toolbar.zoomReduce.tooltiptext;"
          />
          <toolbarbutton id="zoomNormal"  class="toolbarButton" command="cmd_fullZoomReset"
            label="100%"
            tooltiptext="&toolbar.zoomReset.tooltiptext;"
          />
          <toolbarbutton id="zoomEnlarge" class="toolbarButton" command="cmd_fullZoomEnlarge"
            tooltiptext="&toolbar.zoomEnlarge.tooltiptext;"
          />
		  <toolbaritem chromedir="ltr" align="center">
            <menulist id="modeList" type="menu-button" oncommand="goDoCommand(this.selectedItem.getAttribute('command'))">
              <menupopup id="modeListMenu">
                <menuitem id="viewAsSelect_icons" label="&menu.view.viewAsIcons;" command='cmd_viewAsIcons'/>
                <menuitem id="viewAsSelect_list" label="&menu.view.viewAsList;" command='cmd_viewAsList'/>
                <menuitem id="viewAsSelect_browser" label="&menu.view.viewBrowser;" command='cmd_viewBrowser'/>
              </menupopup>
            </menulist>
        </toolbaritem>

        <!--splitter id="urlbar-search-splitter" resizebefore="flex" resizeafter="flex" class="chromeclass-toolbar-additional" /-->

       <toolbaritem
        id="search-container"
        chromedir="ltr"
        align="center"
        onmouseover="gNotification.showHelp('searchBox')"
        onmouseout="gNotification.hide()"
        flex="100"
       >
        <searchbar id="searchbar" chromedir="ltr" flex="1" />
       </toolbaritem>


       <toolbaritem id="throbber-box" title="" align="center" pack="center">
         <toolbarbutton id="docs-throbber-button"
           command="widgetPage:StopAll"
           onclick="if (this.getAttribute('disabled') == 'true') openDialog('chrome://outwit-kernel/content/about/about.xul', '', 'chrome,modal')"
           onmouseover="if(this.getAttribute('disabled') != 'true') gNotification.showHelp('throbber', 'throbber2')"
           onmouseout="gNotification.hide()"
         />
       </toolbaritem>
       <spacer width="5" />
     </toolbar>
  </toolbox>
</overlay>
