  <menubar id="composer-main-menubar" class="chromeclass-menubar"
           fullscreentoolbar="true">

    <menu id="fileMenu" label="&fileMenu.label;" accesskey="&fileMenu.accesskey;">
      <menupopup id="fileMenu_popup">
        <menuitem label="&newMenu.label;" accesskey="&newMenu.accesskey;" key="key_newNavigator"
                  command="cmd_new"/>
        <menuitem label="&newWizardMenu.label;"
                  command="cmd_newWizard"/>
        <menu id="menu_RecentFiles" accesskey="&filerecentmenu.accesskey;" label="&fileRecentMenu.label;"
              onpopupshowing="RecentPagesHandler.buildRecentPagesMenu();">
          <menupopup id="menupopup_RecentFiles"
                      oncommand="OpenFile(event.target.getAttribute('value'), true);"/>
            <!-- menuitems appended at runtime -->
        </menu>

        <menuseparator/>
        <menuitem id="openPageMenuitem" accesskey="&openPage.accesskey;" key="openpagekb" observes="cmd_open"/>

        <menuseparator/>
        <menuitem id="saveMenuitem"   key="savekb" observes="cmd_save"/>
        <menuitem id="saveAsMenuitem" key="saveaskb" observes="cmd_saveAs"/>

        <menuseparator/>
        <menuitem id="closeTabMenuitem" key="closetabkb" observes="cmd_closeTab"/>

        <menuseparator id="menu_FileQuitSeparator"/>
        <menuitem id="menu_FileQuitItem"
                  label="&quit.label;"
                  accesskey="&quit.accesskey;"
                  key="key_quitApplication"
                  oncommand="SaveTabs(); goQuitApplication()"/>
      </menupopup>
    </menu>

    <menu id="editMenu"   label="&editMenu.label;"   accesskey="&editMenu.accesskey;">
      <menupopup id="editMenuPopup">
        <!-- magic from chrome://global/content/editMenuOverlay.xul -->
        <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/>
        <menu label="&select.label;">
          <menupopup>
            <menuitem label="&parentElement.label;"
                      key="structureclimbkb"
                      observes="cmd_structureClimb"/>
            <menuitem label="&firstChild.label;"
                      key="structurefirstchildkb"
                      observes="cmd_structureFirstChild"/>
            <menuseparator/>
            <menuitem label="&nextSibling.label;"
                      key="structurenextkb"
                      observes="cmd_structureNext"/>
            <menuitem label="&previousSibling.label;"
                      key="structurepreviousbkb"
                      observes="cmd_structurePrevious"/>
          </menupopup>
        </menu>
        <menuitem id="menu_selectAll" />
        <menuseparator/>
        <menuitem id="menu_copyHTMLCode"
                  label="&copyHTMLCodeCmd.label;"
                  accesskey="&copyHTMLCodeCmd.accesskey;"
                  observes="cmd_copyHTMLCode"/>
        <menuseparator/>
        <menuitem id="menu_gotoLink"
                  label="&gotoLink.label;"
                  accesskey="&gotoLink.accesskey;"
                  observes="cmd_gotoLink"/>
        <menuseparator/>
        <menuitem label="&spellCheck.label;"
                  accesskey="&spellCheck.accesskey;"
                  observes="cmd_spellCheck"/>
        <menuseparator/>
        <menuitem id="bgmenu_find" command="cmd_bgfind"
                  key="findkb"/>
        <menuitem id="bgmenu_replace" command="cmd_replace"
                  key="replacekb"/>
      </menupopup>
    </menu>

    <menu id="viewMenu"   label="&viewMenu.label;"   accesskey="&viewMenu.accesskey;">
      <menupopup id="viewMenuPopup"
                 onpopupshowing="UpdateViewMenu()">
        <menuitem label="&allTagsMode.label;"
                  type="checkbox"
                  id="allTagsModeMenuitem"
                  observes="cmd_renderedHTMLEnabler"
                  oncommand="ToggleAllTagsMode()"/>
        <menuseparator/>
        <!--menu label="&viewToolbars.label;">
          <menupopup id="viewToolbarsPopup"
                     onpopupshowing="BGToolbarManager.listToolbars(this)"/>
        </menu>
        <menuitem label="&viewStatusbar.label;"
                  oncommand="BGToolbarManager.goToggleToolbar('statusbar')" /-->
        <menu label="&source.label;" observes="cmd_renderedSourceEnabler">
          <menupopup>
            <menu label="&theme.label;">
              <menupopup id="themesMenupopup"
                         onpopupshowing="FillAceThemesMenupopup()"
                         oncommand="UseAceTheme(event)"/>
            </menu>
          </menupopup>
        </menu>
      </menupopup>
    </menu>

    <menu id="insertMenu" label="&insertMenu.label;" accesskey="&insertMenu.accesskey;">
      <menupopup id="insertMenuPopup">
        <menuitem label="&imageToolbarCmd.label;"
                  command="cmd_image"
                  accesskey="&imageToolbarCmd.key;"/>
        <menuitem label="&tableToolbarCmd.label;"
                  command="cmd_InsertTable"
                  accesskey="&tableToolbarCmd.key;"/>
        <menuitem label="&linkToolbarCmd.label;"
                  command="cmd_link"
                  accesskey="&linkToolbarCmd.key;"/>
        <menuitem label="&anchorToolbarCmd.label;"
                  command="cmd_anchor"
                  accesskey="&anchorToolbarCmd.key;"/>
        <menuitem label="&hrToolbarCmd.label;"
                  command="cmd_hr"
                  accesskey="&hrToolbarCmd.key;"/>
        <menu label="&formToolbarCmd.label;">
		        <menupopup>
		          <menuitem label="&formToolbarCmd.label;"
		                    accesskey="&formToolbarCmd.key;"
		                    command="cmd_form"/>
		          <menuseparator/>
		          <menu label="&formInputs.label;">
		            <menupopup>
		                <menuitem label="&hiddenInputForm.label;"
		                          command="cmd_formInputHidden"/>
		                <menuitem label="&textInputForm.label;"
		                          command="cmd_formInputText"/>
		                <menuitem label="&searchInputForm.label;"
		                          command="cmd_formInputSearch"/>
		                <menuitem label="&telInputForm.label;"
		                          command="cmd_formInputTel"/>
		                <menuitem label="&urlInputForm.label;"
		                          command="cmd_formInputUrl"/>
		                <menuitem label="&emailInputForm.label;"
		                          command="cmd_formInputEmail"/>
		                <menuitem label="&passwordInputForm.label;"
		                          command="cmd_formInputPassword"/>
		                <menuitem label="&datetimeInputForm.label;"
		                          command="cmd_formInputDatetime"/>
		                <menuitem label="&dateInputForm.label;"
		                          command="cmd_formInputDate"/>
		                <menuitem label="&monthInputForm.label;"
		                          command="cmd_formInputMonth"/>
		                <menuitem label="&weekInputForm.label;"
		                          command="cmd_formInputWeek"/>
		                <menuitem label="&timeInputForm.label;"
		                          command="cmd_formInputTime"/>
		                <menuitem label="&datetimelocalInputForm.label;"
		                          command="cmd_formInputDatetimelocal"/>
		                <menuitem label="&numberInputForm.label;"
		                          command="cmd_formInputNumber"/>
		                <menuitem label="&rangeInputForm.label;"
		                          command="cmd_formInputRange"/>
		                <menuitem label="&colorInputForm.label;"
		                          command="cmd_formInputColor"/>
		                <menuitem label="&checkboxInputForm.label;"
		                          command="cmd_formInputCheckbox"/>
		                <menuitem label="&radioInputForm.label;"
		                          command="cmd_formInputRadio"/>
		                <menuitem label="&fileInputForm.label;"
		                          command="cmd_formInputFile"/>
		                <menuitem label="&submitInputForm.label;"
		                          command="cmd_formInputSubmit"/>
		                <menuitem label="&imageInputForm.label;"
		                          command="cmd_formInputImage"/>
		                <menuitem label="&resetInputForm.label;"
		                          command="cmd_formInputReset"/>
		                <menuitem label="&buttonInputForm.label;"
		                          command="cmd_formInputButton"/>
		             </menupopup>
		          </menu>
		          <menuitem label="&fieldsetToolbarCmd.label;"
		                    accesskey="&fieldsetToolbarCmd.key;"
		                    command="cmd_fieldset"/>
		          <menuitem label="&labelToolbarCmd.label;"
		                    accesskey="&labelToolbarCmd.key;"
		                    command="cmd_label"/>
		          <menuitem label="&buttonToolbarCmd.label;"
		                    accesskey="&buttonToolbarCmd.key;"
		                    command="cmd_button"/>
		          <menuitem label="&selectToolbarCmd.label;"
		                    accesskey="&selectToolbarCmd.key;"
		                    command="cmd_select"/>
		          <menuitem label="&textareaToolbarCmd.label;"
		                    accesskey="&textareaToolbarCmd.key;"
		                    command="cmd_textarea"/>
		          <menuitem label="&keygenToolbarCmd.label;"
		                    accesskey="&keygenToolbarCmd.key;"
		                    command="cmd_keygen"/>
		          <menuitem label="&outputToolbarCmd.label;"
		                    accesskey="&outputToolbarCmd.key;"
		                    command="cmd_output"/>
		          <menuitem label="&progressToolbarCmd.label;"
		                    accesskey="&progressToolbarCmd.key;"
		                    command="cmd_progress"/>
		          <menuitem label="&meterToolbarCmd.label;"
		                    accesskey="&meterToolbarCmd.key;"
		                    command="cmd_meter"/>
		          <menuitem label="&datalistToolbarCmd.label;"
		                    accesskey="&datalistToolbarCmd.key;"
		                    command="cmd_datalist"/>
		       </menupopup>
        </menu>
        <menuseparator/>
	        <menuitem label="&tableOfContents.label;"
	                  observes="cmd_renderedHTMLEnabler"
                    oncommand="CreateOrUpdateTableOfContents()"/>
        <menuseparator/>
        <menu label="&html5Element.label;">
          <menupopup id="html5InsertionMenupopup"
                     onpopupshowing="HTML5Helper.initInsertMenu(this)"/>
        </menu>
        <menuseparator/>
        <menuitem label="&htmlToolbarCmd.label;"
                  command="cmd_html"
                  accesskey="&htmlToolbarCmd.key;"/>
        <menuseparator/>
        <menuitem label="&stylesheetsToolbarCmd.label;"
                  accesskey="&stylesheetsToolbarCmd.key;"
                  command="cmd_stylesheets"/>
        <menuseparator/>
        <menu label="&webfonts.label;">
          <menupopup id="webfontsMenupopup"/>
        </menu>
#ifndef XP_MACOSX
        <menuseparator/>
        <menuitem label="&specialChars.label;"
                  oncommand="OpenCharInsertionDialog()"/>
#endif
      </menupopup>
    </menu>

    <menu id="formatMenu" label="&formatMenu.label;" accesskey="&formatMenu.accesskey;">
      <menupopup id="formatMenuPopup" onpopupshowing="initFontStyleMenu(this)">
	      <menuitem label="&spanCmd.label;"
	                command="cmd_span"
                  accesskey="&spanCmd.accesskey;"/>
        <menuseparator/>
	      <menuitem label="&styleBoldCmd.label;"        accesskey="&stylebold.accesskey;"         observes="cmd_bold"          type="checkbox"/>
	      <menuitem label="&styleItalicCmd.label;"      accesskey="&styleitalic.accesskey;"       observes="cmd_italic"        type="checkbox"/>
	      <menuitem label="&styleUnderlineCmd.label;"   accesskey="&styleunderline.accesskey;"    observes="cmd_underline"     type="checkbox" key="underlinekb"/>
	      <menuitem label="&styleStrikeThruCmd.label;"  accesskey="&stylestrikethru.accesskey;"   observes="cmd_strikethrough" type="checkbox"/>
	      <menuitem label="&styleSuperscriptCmd.label;" accesskey="&stylesuperscript.accesskey;"  observes="cmd_superscript"   type="checkbox"/>
	      <menuitem label="&styleSubscriptCmd.label;"   accesskey="&stylesubscript.accesskey;"    observes="cmd_subscript"     type="checkbox"/>
	      <menuitem label="&fontFixedWidth.label;"      accesskey="&fontfixedwidth.accesskey;"    observes="cmd_tt"            type="checkbox"/>
	      <menuitem label="&styleNonbreakingCmd.label;" accesskey="&stylenonbreaking.accesskey;"  observes="cmd_nobreak"       type="checkbox"/>
	      <menuseparator/>
	      <menuitem label="&styleEm.label;"             accesskey="&styleEm.accesskey;"           observes="cmd_em"            type="checkbox" key="emkb"/>
	      <menuitem label="&styleStrong.label;"         accesskey="&styleStrong.accesskey;"       observes="cmd_strong"        type="checkbox" key="strongkb"/>
	      <menuitem label="&styleCite.label;"           accesskey="&styleCite.accesskey;"         observes="cmd_cite"          type="checkbox"/>
	      <menuitem label="&styleAbbr.label;"           accesskey="&styleAbbr.accesskey;"         observes="cmd_abbr"          type="checkbox"/>
	      <menuitem label="&styleAcronym.label;"        accesskey="&styleAcronym.accesskey;"      observes="cmd_acronym"       type="checkbox"/>
	      <menuitem label="&styleCode.label;"           accesskey="&styleCode.accesskey;"         observes="cmd_code"          type="checkbox" key="codekb"/>
	      <menuitem label="&styleSamp.label;"           accesskey="&styleSamp.accesskey;"         observes="cmd_samp"          type="checkbox"/>
	      <menuitem label="&styleVar.label;"            accesskey="&styleVar.accesskey;"          observes="cmd_var"           type="checkbox"/>
        <menuseparator/>
        <menuitem id="menu_removeAllStyles"  label="&removeAllStyles.label;"  accesskey="&removeAllStyles.accesskey;"  observes="cmd_removeStyles"/>
        <menuitem id="menu_removeAllLinks"   label="&removeAllLinks.label;"   accesskey="&removeAllLinks.accesskey;"   observes="cmd_removeLinks"/>
        <menuseparator />
        <menuitem label="&listProperties.label;" observes="cmd_list"/>
        <menuseparator/>
        <menuitem label="&pageProperties.label;" observes="cmd_pageProperties"/>
      </menupopup>
    </menu>

    <menu id="tableMenu" label="&tableMenu.label;" accesskey="&tableMenu.accesskey;">
      <menupopup id="tableMenuPopup">
        <menu id="tableInsertMenu" label="&tableInsertMenu.label;" accesskey="&tableinsertmenu.accesskey;">
          <menupopup>
            <menuitem label="&tableTable.label;"    accesskey="&tabletable.accesskey;"            observes="cmd_InsertTable"/>
            <menuseparator />
            <menuitem label="&tableRowAbove.label;"     accesskey="&tablerow.accesskey;"          observes="cmd_InsertRowAbove"/>
            <menuitem label="&tableRowBelow.label;"     accesskey="&tablerowbelow.accesskey;"     observes="cmd_InsertRowBelow"/>
            <menuseparator />
            <menuitem label="&tableColumnBefore.label;" accesskey="&tablecolumn.accesskey;"       observes="cmd_InsertColumnBefore"/>
            <menuitem label="&tableColumnAfter.label;"  accesskey="&tablecolumnafter.accesskey;"  observes="cmd_InsertColumnAfter"/>
            <menuseparator />
            <menuitem label="&tableCellBefore.label;"   accesskey="&tablecell.accesskey;"         observes="cmd_InsertCellBefore"/>
            <menuitem label="&tableCellAfter.label;"    accesskey="&tablecellafter.accesskey;"    observes="cmd_InsertCellAfter"/>
          </menupopup>
        </menu>
        <menu id="tableSelectMenu" label="&tableSelectMenu.label;" accesskey="&tableselectmenu.accesskey;">
          <menupopup id="tableSelectPopup">
            <menuitem id="menu_SelectTable"    label="&tableTable.label;"    accesskey="&tabletable.accesskey;"    observes="cmd_SelectTable"    />
            <menuitem id="menu_SelectRow"      label="&tableRow.label;"      accesskey="&tablerow.accesskey;"      observes="cmd_SelectRow"      />
            <menuitem id="menu_SelectColumn"   label="&tableColumn.label;"   accesskey="&tablecolumn.accesskey;"   observes="cmd_SelectColumn"   />
            <menuitem id="menu_SelectCell"     label="&tableCell.label;"     accesskey="&tablecell.accesskey;"     observes="cmd_SelectCell"     />
            <menuitem id="menu_SelectAllCells" label="&tableAllCells.label;" accesskey="&tableallcells.accesskey;" observes="cmd_SelectAllCells" />
          </menupopup>
        </menu>
        <menu id="tableDeleteMenu" label="&tableDeleteMenu.label;" accesskey="&tabledeletemenu.accesskey;">
          <menupopup id="tableDeletePopup">
            <menuitem id="menu_DeleteTable"         label="&tableTable.label;"        accesskey="&tabletable.accesskey;"          observes="cmd_DeleteTable"/>
            <menuitem id="menu_DeleteRow"           label="&tableRows.label;"         accesskey="&tablerow.accesskey;"            observes="cmd_DeleteRow"/>
            <menuitem id="menu_DeleteColumn"        label="&tableColumns.label;"      accesskey="&tablecolumn.accesskey;"         observes="cmd_DeleteColumn"/>
            <menuitem id="menu_DeleteCell"          label="&tableCells.label;"        accesskey="&tablecell.accesskey;"           observes="cmd_DeleteCell"/>
            <menuitem id="menu_DeleteCellContents"  label="&tableCellContents.label;" accesskey="&tablecellcontents.accesskey;"   observes="cmd_DeleteCellContents"/>
          </menupopup>
        </menu>
        <menuseparator />
        <!-- menu label is set in InitTableMenu -->
        <menuitem id="menu_JoinTableCells"   label="&tableJoinCells.label;"   accesskey="&tablejoincells.accesskey;"   observes="cmd_JoinTableCells"/>
        <menuitem id="menu_SplitTableCell"   label="&tableSplitCell.label;"   accesskey="&tablesplitcell.accesskey;"   observes="cmd_SplitTableCell"/>
        <menuitem id="menu_ConvertToTable"   label="&convertToTable.label;"   accesskey="&converttotable.accesskey;"   observes="cmd_ConvertToTable"/>
        <menuseparator />
        <menuitem id="menu_tableProperties"  label="&tableProperties.label;"  accesskey="&tableProperties.accesskey;"  observes="cmd_editTable"/>

      </menupopup>
    </menu>

    <menu id="panelsMenu" label="&panelsMenu.label;" accesskey="&panelsMenu.accesskey;"
          oncommand="TogglePanel(event)">
      <menupopup id="panelsMenuPopup"
#ifdef XP_UNIX
#ifdef XP_MACOSX
                 onpopupshowing="UpdatePanelsStatusInMenu()"
#endif
#else
                 onpopupshowing="UpdatePanelsStatusInMenu()"
#endif
                 >
#ifdef XP_UNIX
#ifdef XP_MACOSX
        <menuitem label="&alignPanels.label;"
                  oncommand="AlignAllPanels()"/>
        <menuseparator id="beforeAllPanelsMenuseparator"/>
#endif
#else
        <menuitem label="&alignPanels.label;"
                  oncommand="AlignAllPanels()"/>
        <menuseparator id="beforeAllPanelsMenuseparator"/>
#endif
      </menupopup>
    </menu>

    <menu id="toolsMenu" label="&toolsMenu.label;" accesskey="&toolsMenu.accesskey;">
      <menupopup id="toolsPopup">
        <menuitem id="menu_cleanup" observes="cmd_cleanup"/>
        <menuseparator/>
        <menuitem label="&addonsMenu.label;"  oncommand="OpenExtensionsManager()"/>
        <menuseparator/>
        <menuitem label="&consoleMenu.label;"  oncommand="OpenConsole()"/>
        <menuseparator id="menu_PrefsSeparator"/>
        <menuitem id="menu_preferences"
                  label="&preferences.label;"
#ifdef XP_MACOSX
                  key="key_preferencesCmdMac"
#endif
                  oncommand="OpenPreferences()"/>
#ifdef XP_MACOSX
        <menuitem id="menu_mac_services" label="&servicesMenuMac.label;"/>
        <menuitem id="menu_mac_hide_app" label="&hideThisAppCmdMac.label;" key="key_hideThisAppCmdMac"/>
        <menuitem id="menu_mac_hide_others" label="&hideOtherAppsCmdMac.label;" key="key_hideOtherAppsCmdMac"/>
        <menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
#endif
        <menuitem label="Venkman" id="venkmanMenuitem"
                  hidden="true"
                  oncommand="start_venkman()"/>
        <menuitem id="menu_inspector" label="DOMI" oncommand="inspectDOMDocument();" hidden="true"/>
      </menupopup>
    </menu>

    <menu id="helpMenu" label="&helpMenu.label;" accesskey="&helpMenu.accesskey;">
      <menupopup id="helpMenuPopup">
        <menuitem label="&aboutComposer.label;"
                  id="aboutName"
                  oncommand="AboutComposer()"/>
        <menuitem label="&homePage.label;"
                  oncommand="loadExternalURL('http://bluegriffon.org')"/>
        <menuseparator/>
        <menuitem label="BlueGriffon @ Twitter"
                  oncommand="loadExternalURL('http://twitter.com/BlueGriffonApp')"/>
        <menuseparator/>
        <menuitem label="&forumsHelpMenu.label;"
                  oncommand="loadExternalURL('&forums.url;')"/>
        <menuitem label="&qa.label;"
                  oncommand="loadExternalURL('http://bugzilla.bluegriffon.org')"/>
        <menuseparator/>
        <menuitem label="&addons.label;"
                  oncommand="loadExternalURL('http://bluegriffon.com')"/>
      </menupopup>
    </menu>

  </menubar>
