<?xml version="1.0"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/viewZoomOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/viewApplyThemeOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/bookmarks/placesOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/charsetOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/mailNavigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/platformNavigationBindings.xul"?>

<!DOCTYPE overlay [
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % navigatorOverlayDTD SYSTEM "chrome://navigator/locale/navigatorOverlay.dtd">
%navigatorOverlayDTD;
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
%contentAreaCommandsDTD;
]>

<overlay id="navigatorOverlay"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <!-- Navigator -->
  <script type="application/javascript"
          src="chrome://navigator/content/browser.js"/>
  <script type="application/javascript"
          src="chrome://navigator/content/navigator.js"/>

  <!-- Places Bookmarks Utilities -->
  <script type="application/javascript"
          src="chrome://communicator/content/places/browserPlacesViews.js"/>
  <script type="application/javascript"
          src="chrome://communicator/content/bookmarks/browser-places.js"/>

  <stringbundleset id="stringbundleset">
    <stringbundle id="bundle_navigator"
                  src="chrome://navigator/locale/navigator.properties"/>
    <stringbundle id="bundle_brand"
                  src="chrome://branding/locale/brand.properties"/>
    <stringbundle id="bundle_navigator_region"
                  src="chrome://navigator-region/locale/region.properties"/>
    <stringbundle id="bundle_viewZoom"/>
    <stringbundle id="bundle_viewApplyTheme"/>
  </stringbundleset>

  <!-- Keysets -->
  <keyset id="navKeys">
    <!-- File Menu -->
    <key id="key_newNavigatorTab" key="&tabCmd.commandkey;" modifiers="accel" command="cmd_newNavigatorTab"/>
    <key id="key_newNavigator"/>
    <key id="key_newPrivateWindow"/>
    <key id="key_restoreTab" key="&recentTabs.commandkey;" modifiers="accel,shift" oncommand="gBrowser.undoCloseTab(0);"/>
    <key id="key_restoreWindow" key="&recentWindows.commandkey;" modifiers="accel,shift" oncommand="undoCloseWindow();"/>
    <key id="key_newBlankPage"/>
    <key id="focusURLBar"      key="&openCmd.commandkey;" oncommand="ShowAndSelectContentsOfURLBar();"
         modifiers="accel"/>
    <key id="openLocationKb"   key="&openCmd.commandkey;" command="Browser:Open" modifiers="accel,shift"/>
    <key id="openFileKb"         key="&openFileCmd.commandkey;" command="Browser:OpenFile"  modifiers="accel"/>
    <key id="key_savePage"       key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
    <key id="key_editPage"       key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
    <key id="key_print"/>
    <key id="key_close"/>
    <key id="key_closeWindow"/>

    <!-- Edit Menu -->
    <key id="key_undo"/>
    <key id="key_redo"/>
    <key id="key_cut"/>
    <key id="key_copy"/>
    <key id="key_paste"/>
    <key id="key_delete"/>
    <key id="key_delete2"/>
    <key id="key_selectAll"/>
    <key id="key_switchTextDirection"/>

    <!-- View Menu -->
    <key id="key_reload"  key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
    <key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
    <key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
    <key id="key_viewInfo"   key="&pageInfoCmd.commandkey;"   command="View:PageInfo"   modifiers="accel"/>
    <key id="key_viewNextSidebarPanel" keycode="VK_PAGE_DOWN"  oncommand="SidebarGetRelativePanel(1);"  modifiers="alt" />
    <key id="key_viewPrevSidebarPanel" keycode="VK_PAGE_UP"  oncommand="SidebarGetRelativePanel(-1);"  modifiers="alt" />

    <!-- Search Menu -->
    <keyset id="findKeys"/>
    <key id="key_findTypeText"/>
    <key id="key_findTypeLinks"/>

    <!-- Go Menu -->
    <key keycode="VK_BACK" command="cmd_handleBackspace"/>
    <key keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift"/>

    <!-- Bookmarks Menu -->
    <key id="addBookmarkKb" key="&addCurPageAsCmd.commandkey;" command="Browser:AddBookmark" modifiers="accel,shift"/>
    <key id="addBookmarkAsKb" key="&addCurPageAsCmd.commandkey;" command="Browser:AddBookmarkAs" modifiers="accel"/>
    <key id="manBookmarkKb" key="&manBookmarksCmd.commandkey;" command="Browser:ManageBookmark" modifiers="accel"/>

    <!-- Tools Menu -->
    <key id="searchInternetKb" key="&searchInternet.commandKey;" modifiers="accel,shift" command="Browser:SearchInternet"/>

    <!-- Misc -->
    <!-- the amazing fishcam, suppress warning by ',' at the beginning of modifiers, see bug 496322 -->
    <key key="f" modifiers=",control,alt" oncommand="loadURI('http://www.fishcam.com/');"/>
    <key id="goUpKb" keycode="VK_UP" command="Browser:Up" modifiers="alt"/>
    <key id="key_gotoHistory"  key="&history.commandKey;"        oncommand="toHistory();" modifiers="accel"/>
    <keyset id="viewZoomKeys"/>
    <keyset id="navigationKeys"/>
    <keyset id="tasksKeys"/>
    <key id="key_sanitize" command="Tools:Sanitize" keycode="VK_DELETE" modifiers="accel,shift"/>
  </keyset>

  <commandset id="commands">
    <command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab();"/>
    <command id="cmd_newNavigator"/>
    <command id="cmd_newPrivateWindow"/>
    <command id="cmd_newTabWithTarget" oncommand="contentAreaClick(event);"/>
    <command id="cmd_handleBackspace"  oncommand="BrowserHandleBackspace();" />
    <command id="cmd_handleShiftBackspace"  oncommand="BrowserHandleShiftBackspace();" />

    <command id="cmd_newEditor"/>
    <!-- NOT IMPLEMENTED
    <command id="cmd_newEditorTemplate"/>
    <command id="cmd_newEditorDraft"/> -->
    <command id="Browser:OpenFile"  oncommand="BrowserOpenFileWindow();"/>
    <command id="Browser:SavePage" oncommand="saveDocument(window.content.document, true);"/>
    <command id="Browser:EditPage" oncommand="editPageOrFrame();" observes="isImage"/>
    <command id="Browser:UploadFile" oncommand="BrowserUploadFile();"/>
    <command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
    <command id="cmd_printSetup" oncommand="PrintUtils.showPageSetup();"/>
    <command id="cmd_print" oncommand="PrintUtils.printWindow(window.gBrowser.selectedBrowser.outerWindowID, window.gBrowser.selectedBrowser);"/>
    <command id="cmd_printpreview" oncommand="BrowserPrintPreview();"/>
    <command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
    <command id="cmd_closeOtherTabs" oncommand="BrowserCloseOtherTabs()"/>
    <command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>

    <!-- Edit Menu -->
    <command id="cmd_undo"/>
    <command id="cmd_redo"/>
    <command id="cmd_cut"/>
    <command id="cmd_copy"/>
    <command id="cmd_paste"/>
    <command id="cmd_delete"/>
    <command id="cmd_selectAll" observes="isImage"/>
    <command id="cmd_switchTextDirection"/>
    <commandset id="globalEditMenuItems"/>
    <commandset id="selectEditMenuItems"/>
    <commandset id="undoEditMenuItems"/>
    <commandset id="clipboardEditMenuItems"/>

    <!-- Content area context menu -->
    <command id="cmd_copyLink"/>
    <command id="cmd_copyImage"/>

    <!-- View Menu -->
    <command id="View:PageSource" oncommand="BrowserViewSource(gBrowser.selectedBrowser);" observes="isImage"/>
    <command id="View:PageInfo"   oncommand="BrowserPageInfo();"/>
    <command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
    <command id="cmd_SwitchDocumentDirection" oncommand="SwitchDocumentDirection(window.content);" />

    <!-- Search Menu -->
    <command id="cmd_find"
             oncommand="BrowserFind();"
             observes="isImage"/>
    <command id="cmd_findNext"
             oncommand="BrowserFindAgain(false);"
             observes="isImage"/>
    <command id="cmd_findPrev"
             oncommand="BrowserFindAgain(true);"
             observes="isImage"/>
    <command id="cmd_findTypeText" observes="isImage"/>
    <command id="cmd_findTypeLinks" observes="isImage"/>

    <!-- Bookmarks Menu -->
    <command id="Browser:AddBookmark"
             label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;"
             oncommand="PlacesCommandHook.bookmarkCurrentPage(false, PlacesUtils.bookmarksMenuFolderId);"/>
    <command id="Browser:AddBookmarkAs"
             label="&addCurPageAsCmd.label;" accesskey="&addCurPageAsCmd.accesskey;"
             oncommand="PlacesCommandHook.bookmarkPageAs(gBrowser.selectedBrowser, PlacesUtils.bookmarksMenuFolderId);"/>
    <!-- The command is disabled for the hidden window. Otherwise its enabled
         state is handled by BookmarksEventHandler.onPopupShowing. -->
    <command id="Browser:BookmarkAllTabs"
             label="&addCurTabsAsCmd.label;" accesskey="&addCurTabsAsCmd.accesskey;"
             oncommand="PlacesCommandHook.bookmarkCurrentPages();"
             disabled="true"/>
    <command id="Browser:ManageBookmark"
             label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;"
             oncommand="PlacesCommandHook.showBookmarksManager('AllBookmarks');"/>
    <command id="feedsMenu" disabled="true"/>
    <commandset id="placesCommands"/>

    <!-- Go Menu -->
    <command id="Browser:Home"    oncommand="BrowserHome(event);"/>
    <command id="Browser:Back"    oncommand="BrowserBack();"    observes="canGoBack"/>
    <command id="Browser:Forward" oncommand="BrowserForward();" observes="canGoForward"/>
    <command id="Browser:Up"      oncommand="BrowserUp();"      observes="canGoUp"/>
    <commandset id="viewZoomCommands"/>
    <commandset id="tasksCommands"/>

    <!-- Tools Menu -->
    <command id="Browser:SearchInternet" oncommand="BrowserSearch.webSearch();"/>
    <command id="Tools:Sanitize"
             oncommand="Components.classes['@mozilla.org/suite/suiteglue;1'].getService(Components.interfaces.nsISuiteGlue).sanitize(window);"/>

  </commandset>

  <broadcasterset id="navBroadcasters">
    <broadcaster id="canGoBack"    disabled="true"/>
    <broadcaster id="canGoForward" disabled="true"/>
    <broadcaster id="canGoUp"      disabled="true"/>
    <broadcaster id="Communicator:WorkMode"/>
    <broadcaster id="cmd_viewtaskbar"
                 checked="true"
                 oncommand="goToggleToolbar('status-bar', 'cmd_viewtaskbar');
                            updateWindowState();"/>
    <broadcaster id="cmd_viewcomponentbar" oncommand="goToggleToolbar('component-bar', 'cmd_viewcomponentbar');" checked="true"/>
    <broadcaster id="isImage"/>
  </broadcasterset>

  <!-- Menu -->
  <menubar id="main-menubar" class="chromeclass-menubar">
    <menu id="menu_File">
      <menupopup id="menu_FilePopup" onpopupshowing="updateCloseItems();getContentAreaFrameCount();updateSavePageItems();updateFileUploadItem();">
        <menu id="menu_New">
          <menupopup id="menu_NewPopup">
            <!-- From utilityOverlay.xul -->
            <menuitem id="menu_newNavigatorTab" command="cmd_newNavigatorTab" key="key_newNavigatorTab"
                      label="&tabCmd.label;" accesskey="&tabCmd.accesskey;"/>
            <menuitem id="menu_newNavigator"/>
            <menuitem id="menu_newPrivateWindow"/>
            <menuseparator id="navBeginGlobalNewItems"/>
            <menuitem id="menu_newEditor"    command="cmd_newEditor"/>
          </menupopup>
        </menu>
        <menuitem id="menu_openLocation"
                  label="&openCmd.label;"
                  accesskey="&openCmd.accesskey;"
                  key="openLocationKb"
                  command="Browser:Open"/>
        <menuitem id="menu_openFile"
                  label="&openFileCmd.label;"
                  accesskey="&openFileCmd.accesskey;"
                  key="openFileKb"
                  command="Browser:OpenFile"/>
        <menuitem id="menu_close"/>
        <menuitem id="menu_closeOtherTabs" command="cmd_closeOtherTabs" label="&closeOtherTabs.label;" accesskey="&closeOtherTabs.accesskey;"/>
        <menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;" accesskey="&closeWindow.accesskey;"/>
        <menuseparator/>
        <menuitem id="savepage" valueSaveAs="&savePageAsCmd.label;" valueSave="&savePageCmd.label;"
                  accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
        <menuitem id="saveframe" valueSaveAs="&saveFrameAsCmd.label;" valueSave="&saveFrameCmd.label;"
                  accesskey="&saveFrameCmd.accesskey;" oncommand="saveFrameDocument();" hidden="true"/>
        <menuseparator id="saveMenuBlockEnd"/>
        <menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
        <menuseparator/>
        <menuitem command="Browser:UploadFile" label="&uploadFile.label;" accesskey="&uploadFile.accesskey;"/>
        <menuseparator/>
        <menuitem id="menu_printSetup"/>
        <menuitem id="menu_printPreview"/>
        <menuitem id="menu_print"/>
        <menuseparator/>
        <menuitem id="offlineGoOfflineCmd"/>
      </menupopup>
    </menu>

    <menu id="menu_Edit">
      <menupopup id="menu_EditPopup">
        <menuitem id="menu_undo"/>
        <menuitem id="menu_redo"/>
        <menuseparator/>
        <menuitem id="menu_cut"/>
        <menuitem id="menu_copy"/>
        <menuitem id="menu_paste"/>
        <menuitem id="menu_delete"/>
        <menuseparator/>
        <menuitem id="menu_selectAll"/>
        <menuseparator/>
        <menuitem id="menu_find" label="&findOnCmd.label;"/>
        <menuitem id="menu_findNext"/>
        <menuitem id="menu_findPrev"/>
        <menuseparator/>
        <menuitem id="menu_findTypeLinks"/>
        <menuitem id="menu_findTypeText"/>

        <menuseparator id="textfieldDirection-separator" hidden="true"/>
        <menuitem id="textfieldDirection-swap" hidden="true"/>

        <menuseparator id="menu_PrefsSeparator"/>
        <menuitem id="menu_preferences" oncommand="goPreferences('navigator_pane')"/>
      </menupopup>
    </menu>

    <menu id="menu_View">
      <menupopup id="menu_View_Popup" onpopupshowing="EnableCharsetMenu();">
        <menu label="&toolbarsCmd.label;" accesskey="&toolbarsCmd.accesskey;" id="menu_Toolbars">
          <menupopup id="view_toolbars_popup"
                     onpopupshowing="updateToolbarStates(event);"
                     oncommand="onViewToolbarCommand(event);">
            <menuitem id="menuitem_showhide_tabbar"
                      label="&tabbarCmd.label;"
                      accesskey="&tabbarCmd.accesskey;"
                      class="menuitem-iconic"
                      type="checkbox"
                      oncommand="showHideTabbar();"
                      checked="true"/>
            <menuitem id="menuitem_taskbarCmd"
                      label="&taskbarCmd.label;"
                      accesskey="&taskbarCmd.accesskey;"
                      class="menuitem-iconic"
                      type="checkbox"
                      observes="cmd_viewtaskbar"/>
            <menuitem id="menuitem_componentbarCmd"
                      label="&componentbarCmd.label;"
                      accesskey="&componentbarCmd.accesskey;"
                      class="menuitem-iconic"
                      type="checkbox"
                      observes="cmd_viewcomponentbar"/>
          </menupopup>
        </menu>
        <menuitem id="menuitem_fullScreen"
                  label="&fullScreenCmd.label;"
                  accesskey="&fullScreenCmd.accesskey;"
                  key="key_fullScreen"
                  command="View:FullScreen"/>
        <menuseparator />
        <menuitem id="menuitem-stop"
                  label="&stopCmd.label;"
                  accesskey="&stopCmd.accesskey;"
                  disabled="true"
                  oncommand="BrowserStop();"
                  key="key_stop"/>
        <menuitem id="menuitem_reload"
                  label="&reloadCmd.label;"
                  accesskey="&reloadCmd.accesskey;"
                  key="key_reload"
                  oncommand="BrowserReload(event);"
                  onclick="checkForMiddleClick(this, event);"/>
        <menuseparator />

        <!-- overlayed from viewZoomOverlay.xul -->
        <menu id="menu_zoom"/>

        <menu id="menu_UseStyleSheet"
              label="&useStyleSheetMenu.label;"
              accesskey="&useStyleSheetMenu.accesskey;"
              disabled="false"
              observes="isImage">
          <menupopup id="menupopup_stylesheetFill" onpopupshowing="stylesheetFillPopup(this);"
                     oncommand="stylesheetSwitchAll(window.content, event.target.getAttribute('data')); setStyleDisabled(false);" type="radio">
            <menuitem id="menu_pageStyleNoStyle"
                      label="&useStyleSheetNone.label;"
                      accesskey="&useStyleSheetNone.accesskey;"
                      oncommand="setStyleDisabled(true); event.stopPropagation();"
                      type="radio"/>
            <menuitem id="menu_pageStylePersistentOnly"
                      label="&useStyleSheetPersistentOnly.label;"
                      accesskey="&useStyleSheetPersistentOnly.accesskey;"
                      type="radio"/>
          </menupopup>
        </menu>
        <menu id="charsetMenu"
              onpopupshowing="BrowserUpdateCharsetMenu(this);"
              oncommand="BrowserSetCharacterSet(event);"/>
        <menuitem hidden="true" id="documentDirection-swap"
                  label="&bidiSwitchPageDirectionItem.label;"
                  accesskey="&bidiSwitchPageDirectionItem.accesskey;"
                  command="cmd_SwitchDocumentDirection"/>
        <menuseparator />
        <menuitem id="menuitem_pageSourceCmd"
                  label="&pageSourceCmd.label;"
                  accesskey="&pageSourceCmd.accesskey;"
                  key="key_viewSource"
                  command="View:PageSource"/>
        <menuitem id="menuitem_pageInfoCmd"
                  label="&pageInfoCmd.label;"
                  accesskey="&pageInfoCmd.accesskey;"
                  key="key_viewInfo"
                  command="View:PageInfo"/>
        <menuseparator />
        <!-- overlayed from viewApplyThemeOverlay.xul -->
        <menu id="menu_viewApplyTheme"/>
      </menupopup>
    </menu>

    <menu id="history-menu"
          label="&goMenu.label;"
          accesskey="&goMenu.accesskey;"
          oncommand="gotoHistoryIndex(event);"
          onclick="checkForMiddleClick(this, event);">
      <menupopup id="goPopup"
                 onpopupshowing="updateGoMenu(event);">
        <menuitem id="historyMenuBack"
                  label="&goBackCmd.label;"
                  accesskey="&goBackCmd.accesskey;"
                  key="goBackKb"
                  oncommand="BrowserBack(event);"
                  onclick="checkForMiddleClick(this, event);"
                  observes="canGoBack"/>
        <menuitem id="historyMenuForward"
                  label="&goForwardCmd.label;"
                  accesskey="&goForwardCmd.accesskey;"
                  key="goForwardKb"
                  oncommand="BrowserForward(event);"
                  onclick="checkForMiddleClick(this, event);"
                  observes="canGoForward"/>
        <menuitem id="historyMenuUp"
                  label="&goUpCmd.label;"
                  accesskey="&goUpCmd.accesskey;"
                  key="goUpKb"
                  command="Browser:Up"/>
        <menuitem id="historyMenuHome"
                  label="&goHomeCmd.label;"
                  accesskey="&goHomeCmd.accesskey;"
                  command="Browser:Home"
                  onclick="checkForMiddleClick(this, event);"
                  key="goHome"/>
        <menuseparator/>
        <menu id="menu_recentTabs"
              label="&recentTabs.label;"
              accesskey="&recentTabs.accesskey;">
          <menupopup id="menu_recentTabsPopup"
                     onpopupshowing="event.stopPropagation(); updateRecentTabs(this);"
                     oncommand="gBrowser.undoCloseTab(event.target.value);"/>
        </menu>
        <menu id="menu_recentWindows"
              label="&recentWindows.label;"
              accesskey="&recentWindows.accesskey;">
          <menupopup id="menu_recentWindowsPopup"
                     onpopupshowing="event.stopPropagation(); updateRecentWindows(this);"
                     oncommand="undoCloseWindow(event.target.value);"/>
        </menu>
        <menuitem id="historyRestoreLastSession"
                  label="&historyRestoreLastSession.label;"
                  accesskey="&historyRestoreLastSession.accesskey;"
                  oncommand="restoreLastSession();"
                  disabled="true"/>
        <menuseparator/>
        <menuitem id="menu_showAllHistory"
                  label="&historyCmd.label;"
                  accesskey="&historyCmd.accesskey;"
                  oncommand="toHistory()"
                  key="key_gotoHistory"/>
        <menuseparator id="startHistorySeparator" hidden="true"/>
        <menuseparator id="endHistorySeparator" hidden="true"/>
        <menuitem id="sync-tabs-menuitem"
                  label="&syncTabsMenu.label;"
                  oncommand="BrowserOpenSyncTabs();"
                  disabled="true"/>
      </menupopup>
    </menu>

    <menu id="bookmarksMenu"
          label="&bookmarksMenu.label;"
          accesskey="&bookmarksMenu.accesskey;"
          ondragenter="PlacesMenuDNDHandler.onDragEnter(event);"
          ondragover="PlacesMenuDNDHandler.onDragOver(event);"
          ondrop="PlacesMenuDNDHandler.onDrop(event);">
      <menupopup id="bookmarksMenuPopup"
                 placespopup="true"
                 context="placesContext"
                 openInTabs="children"
                 oncommand="BookmarksEventHandler.onCommand(event);"
                 onclick="BookmarksEventHandler.onClick(event);"
                 onpopupshowing="BookmarksMenu.onPopupShowing(event, '');
                                 BookmarksEventHandler.onPopupShowing(event);"
                 tooltip="bhTooltip" popupsinherittooltip="true">
        <menuitem id="menu_bookmarkThisPage"
                  command="Browser:AddBookmark"
                  key="addBookmarkKb"/>
        <menuitem id="menu_bookmarkThisPageAs"
                  command="Browser:AddBookmarkAs"
                  key="addBookmarkAsKb"/>
        <menuitem id="menu_bookmarkAllTabs"
                  command="Browser:BookmarkAllTabs"/>
        <menuitem id="menu_bookmarkManager"
                  command="Browser:ManageBookmark"
                  key="manBookmarkKb"/>
        <menuseparator id="organizeBookmarksSeparator"/>
        <menu id="menu_iconic_feedsMenu"
              label="&feedsMenu.label;"
              accesskey="&feedsMenu.accesskey;"
              class="menu-iconic feedsMenu"
              command="feedsMenu">
          <menupopup onpopupshowing="window.XULBrowserWindow.populateFeeds(this);"
                     oncommand="subscribeToFeed(event.target.statusText, event);"
                     onclick="checkForMiddleClick(this, event);"/>
        </menu>
        <menuseparator/>
        <menu id="bookmarksToolbarFolderMenu"
              class="menu-iconic bookmark-item"
              label="&bookmarksToolbarCmd.label;"
              container="true">
          <menupopup id="bookmarksToolbarFolderPopup"
                     placespopup="true"
                     context="placesContext"
                     onpopupshowing="if (!this.parentNode._placesView)
                                       new PlacesMenu(event, 'place:folder=TOOLBAR');"/>
        </menu>
        <menu id="unsortedBookmarksFolderMenu"
              class="menu-iconic bookmark-item"
              container="true">
          <menupopup id="unsortedBookmarksFolderPopup"
                     placespopup="true"
                     context="placesContext"
                     onpopupshowing="if (!this.parentNode._placesView)
                                       new PlacesMenu(event, 'place:folder=UNFILED_BOOKMARKS');"/>
        </menu>
        <menuseparator/>
      </menupopup>
    </menu>

    <menu id="tasksMenu">
      <menupopup id="taskPopup">
        <menuitem id="menu_searchWeb"
                  label="&searchInternetCmd.label;"
                  accesskey="&searchInternetCmd.accesskey;"
                  key="searchInternetKb"
                  command="Browser:SearchInternet"/>
        <menuitem id="menu_translate"
                  label="&translateMenu.label;"
                  accesskey="&translateMenu.accesskey;"
                  oncommand="Translate();"/>
        <menu id="menu_cookieManager"
              label="&cookieCookieManager.label;"
              accesskey="&cookieCookieManager.accesskey;"
              oncommand="if (event.target.id.startsWith('cookie_'))
                           CookieImagePopupAction(event.target);">
          <menupopup id="menupopup_checkPermissions_cookie"
                     onpopupshowing="CheckPermissionsMenu('cookie', this);">
            <menuitem id="cookie_deny"
                      label="&cookieBlockCookiesCmd.label;"
                      accesskey="&cookieBlockCookiesCmd.accesskey;"
                      title="&cookieMessageTitle.label;"
                      msg="&cookieBlockCookiesMsg.label;"
                      type="radio"
                      name="cookie"/>
            <menuitem id="cookie_default"
                      label="&cookieCookiesDefaultCmd.label;"
                      accesskey="&cookieCookiesDefaultCmd.accesskey;"
                      title="&cookieMessageTitle.label;"
                      msg="&cookieCookiesDefaultMsg.label;"
                      type="radio"
                      name="cookie"/>
            <menuitem id="cookie_session"
                      label="&cookieAllowSessionCookiesCmd.label;"
                      accesskey="&cookieAllowSessionCookiesCmd.accesskey;"
                      title="&cookieMessageTitle.label;"
                      msg="&cookieAllowSessionCookiesMsg.label;"
                      type="radio"
                      name="cookie"/>
            <menuitem id="cookie_allow"
                      label="&cookieAllowCookiesCmd.label;"
                      accesskey="&cookieAllowCookiesCmd.accesskey;"
                      title="&cookieMessageTitle.label;"
                      msg="&cookieAllowCookiesMsg.label;"
                      type="radio"
                      name="cookie"/>
            <menuseparator/>
            <menuitem id="menuitem_cookieDisplay"
                      label="&cookieDisplayCookiesCmd.label;"
                      accesskey="&cookieDisplayCookiesCmd.accesskey;"
                      oncommand="toDataManager(hostUrl() + '|cookies');
                                 event.stopPropagation();"/>
          </menupopup>
        </menu>
        <menu id="menu_imageManager"
              label="&cookieImageManager.label;"
              accesskey="&cookieImageManager.accesskey;"
              oncommand="if (event.target.id.startsWith('image_'))
                           CookieImagePopupAction(event.target);">
          <menupopup id="menupopup_checkPermissions_image"
                     onpopupshowing="CheckPermissionsMenu('image', this);">
            <menuitem id="image_deny"
                      label="&cookieBlockImagesCmd.label;"
                      accesskey="&cookieBlockImagesCmd.accesskey;"
                      title="&cookieImageMessageTitle.label;"
                      msg="&cookieBlockImagesMsg.label;"
                      type="radio"
                      name="image"/>
            <menuitem id="image_default"
                      label="&cookieImagesDefaultCmd.label;"
                      accesskey="&cookieImagesDefaultCmd.accesskey;"
                      title="&cookieImageMessageTitle.label;"
                      msg="&cookieImagesDefaultMsg.label;"
                      type="radio"
                      name="image"/>
            <menuitem id="image_allow"
                      label="&cookieAllowImagesCmd.label;"
                      accesskey="&cookieAllowImagesCmd.accesskey;"
                      title="&cookieImageMessageTitle.label;"
                      msg="&cookieAllowImagesMsg.label;"
                      type="radio"
                      name="image"/>
            <menuseparator/>
            <menuitem id="menuitem_imageDisplay"
                      label="&cookieDisplayImagesCmd.label;"
                      accesskey="&cookieDisplayImagesCmd.accesskey;"
                      oncommand="toDataManager(hostUrl() + '|permissions|add|image');
                                 event.stopPropagation();"/>
          </menupopup>
        </menu>
        <menu id="menu_popupManager"
              label="&popupsManager.label;"
              accesskey="&popupsManager.accesskey;"
              oncommand="if (event.target.id.startsWith('popup_'))
                           CookieImagePopupAction(event.target);">
          <menupopup id="menupopup_checkForVisibility"
                     onpopupshowing="CheckForVisibility(event, this);"
                     onpopuphiding="RemovePopupsItems(this);">
            <menuitem id="popup_deny"
                      label="&popupBlockCmd.label;"
                      accesskey="&popupBlockCmd.accesskey;"
                      title="&popupsMessageChangeTitle.label;"
                      msg="&popupBlockMsg.label;"
                      type="radio"
                      name="popup"/>
            <menuitem id="popup_default"
                      label="&popupDefaultCmd.label;"
                      accesskey="&popupDefaultCmd.accesskey;"
                      title="&popupsMessageChangeTitle.label;"
                      msg="&popupDefaultMsg.label;"
                      type="radio"
                      name="popup"/>
            <menuitem id="popup_allow"
                      label="&popupAllowCmd.label;"
                      accesskey="&popupAllowCmd.accesskey;"
                      title="&popupsMessageChangeTitle.label;"
                      msg="&popupAllowMsg.label;"
                      type="radio"
                      name="popup"/>
            <menuseparator id="popupMenuSeparator"/>
            <menuitem id="menuitem_PopupsManage"
                      label="&popupsManage.label;"
                      accesskey="&popupsManage.accesskey;"
                      oncommand="toDataManager(hostUrl() + '|permissions|add|popup');
                                 event.stopPropagation();"
                      hidden="true"/>
          </menupopup>
        </menu>
        <menuseparator id="navBeginGlobalItems"/>
        <menuitem id="sanitizeItem"
                  label="&clearPrivateDataCmd.label;"
                  accesskey="&clearPrivateDataCmd.accesskey;"
                  key="key_sanitize" command="Tools:Sanitize"/>
      </menupopup>
    </menu>

    <menu id="windowMenu"/>

    <menu id="menu_Help"/>
  </menubar>

</overlay>
