<?xml version="1.0"?> 
<!--
   - The contents of this file are subject to the Netscape Public
   - License Version 1.1 (the "License"); you may not use this file
   - except in compliance with the License. You may obtain a copy of
   - the License at http://www.mozilla.org/NPL/
   -  
   - Software distributed under the License is distributed on an "AS
   - IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
   - implied. See the License for the specific language governing
   - rights and limitations under the License.
   -  
   - The Original Code is Mozilla Communicator client code, released
   - March 31, 1998.
   - 
   - The Initial Developer of the Original Code is Netscape
   - Communications Corporation. Portions created by Netscape are
   - Copyright (C) 1999 Netscape Communications Corporation. All
   - Rights Reserved.
   - 
   - Contributor(s):
  -->

<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
<?xul-overlay href="chrome://global/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://messenger/content/messengercompose/addressingWidgetOverlay.xul"?>
<?xul-overlay href="chrome://editor/content/editorOverlay.xul"?>

<?xml-stylesheet href="chrome://messenger/skin/messengercompose/messengercompose.css" type="text/css"?> 

<!--
The contents of this file are subject to the Netscape Public
License Version 1.1 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of
the License at http://www.mozilla.org/NPL/

Software distributed under the License is distributed on an "AS
IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
implied. See the License for the specific language governing
rights and limitations under the License.

The Original Code is Mozilla Communicator client code, released
March 31, 1998.

The Initial Developer of the Original Code is Netscape
Communications Corporation. Portions created by Netscape are
Copyright (C) 1998-1999 Netscape Communications Corporation. All
Rights Reserved.
-->

<!DOCTYPE window SYSTEM "chrome://messenger/locale/messengercompose/messengercompose.dtd">

<window id="main-window"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        xmlns:nc="http://home.netscape.com/NC-rdf#"
		onunload="ComposeUnload()"
		onload="ComposeLoad()"
        onclose="return ComposeCanClose()"
		title="&msgComposeWindow.title;"
		windowtype="msgcompose"
		align="vertical"
		width="640" height="480"
		persist="screenX screenY width height"
		> 

<script language="JavaScript" src="chrome://messenger/content/accountUtils.js"/>
<script language="JavaScript" src="chrome://messenger/content/widgetglue.js"/>
<script language="JavaScript" src="chrome://editor/content/editor.js"/>
<script language="JavaScript" src="chrome://editor/content/ComposerCommands.js"/>
<script language="JavaScript" src="chrome://editor/content/EditorCommandsDebug.js"/>
<script language="JavaScript" src="chrome://global/content/strres.js"/>
<script language="JavaScript" src="chrome://messenger/content/messengercompose/MsgComposeCommands.js"/>

<commands id="commands">
	<commandset id="globalEditMenuItems"/>
	<commandset id="selectEditMenuItems"/>
	<commandset id="undoEditMenuItems"/>

    <commandset id="composerMenuItems"/>
    <commandset id="composerEditMenuItems"/>
    <commandset id="composerSaveMenuItems"/>    
    <commandset id="composerStyleMenuItems"/>
    <commandset id="composerTableMenuItems"/>
</commands>

<broadcasterset id="broadcasterset">
	<!-- File Menu -->
	<broadcaster id="cmd_newNavigator"/>
	<broadcaster id="cmd_newMessage"/>
	<broadcaster id="cmd_newEditor"/>
	<broadcaster id="cmd_close" oncommand="if (ComposeCanClose()) CloseWindow()"/>
	<broadcaster id="cmd_attachFile" oncommand="AttachFile()"/>
	<broadcaster id="cmd_selectAddress" oncommand="SelectAddress()"/>
	<broadcaster id="cmd_sendNow" oncommand="SendMessage()"/>
	<broadcaster id="cmd_sendLater" oncommand="SendMessageLater()"/>
	<broadcaster id="cmd_print" oncommand="nsCmd:BrowserPrint"/>
 	<broadcaster id="cmd_quit"/>
	<!-- Edit Menu -->
	<broadcaster id="cmd_undo"/>
	<broadcaster id="cmd_redo"/>
	<broadcaster id="cmd_cut"/>
	<broadcaster id="cmd_copy"/>
	<broadcaster id="cmd_paste"/>
	<broadcaster id="cmd_delete"/>
	<broadcaster id="cmd_selectAll"/>
	<broadcaster id="cmd_preferences"/>

	<broadcaster id="broadcaster_throbber" busy="false"/>
</broadcasterset>

<broadcaster id="args" value="editorType=default"/>

<!-- Interim hack to transition from nsIXULWindowCallbacks/ShowWindowWithArgs -->
<broadcaster id="dialog.start" ready="false"/>
<observes element="dialog.start" attribute="ready" onbroadcast="ComposeStartup()"/>

<popupset>
	<popup id="TextColorPopup"/>
	<popup id="BackColorPopup"/>
</popupset>
<popupset id="aTooltipSet"/>

<keyset id="keyset">
	<!-- File Menu -->
	<key id="key_newNavigator"/>
	<key id="key_newMessage"/>
	<key id="key_close"/>
	<key id="key_save" xulkey="true" key="&saveCmd.key;" disabled="true"/>
	<!-- key id="key_attachFile" xulkey="true" key="&attachFileCmd.key;" observes="cmd_attachFile"/ -->
	<!-- key id="key_selectAddresses" xulkey="true" key="&selectAddressCmd.key;" observes="cmd_selectAddress"/ -->
	<!-- key id="key_sendNow" xulkey="true" keycode="&sendNowCmd.keycode;" observes="cmd_sendNow"/ -->
	<!-- key id="key_sendLater" xulkey="true" keycode="&sendLaterCmd.keycode;" shift="true" observes="cmd_sendLater"/ -->
	<key id="key_print" xulkey="true" key="&printCmd.key;" disabled="true" observes="cmd_print"/>
	<key id="key_quit"/>
	<!-- 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_selectAll"/>
	<key id="key_find" xulkey="true" key="&findCmd.key;"  observes="cmd_find"/>
	<key id="key_findAgain" xulkey="true" key="&findAgainCmd.key;" observes="cmd_findAgain"/>
	<key id="key_preferences"/>
	<!-- Options Menu -->
    <key id="key_checkspelling" xulkey="true" key="&checkSpellingCmd.key;" observes="cmd_spelling" />
	
</keyset>

<!--- REMOVE KEYSET UNTIL IT WORKS CORRECTLY ON MAC!
ACTUALLY, EVERY TIME YOU TYPE ANY OF THE KEY DEFINED HERE AFTER WITHOUT ANY OF THE MODIFIERS PRESSED, THE COMMAND IS EXECUTED.

<keyset id="defaultKeySet">
	<key id="acmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="a" onkeypress="EditorSelectAll()" />
	<key id="bcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="b" onkeypress="EditorApplyStyle('b')"/>
	<key id="ccmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="c" onkeypress="EditorCopy()" />
	<key id="fcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="f" onkeypress="EditorFind()" />
	<key id="gcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="g" onkeypress="EditorFindNext()" />
	<key id="icmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="i" onkeypress="EditorApplyStyle('i')"/>
	<key id="kcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="k" onkeypress="CheckSpelling()" />
	<key id="ucmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="u" onkeypress="EditorApplyStyle('u')"/>
	<key id="vcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="v" onkeypress="EditorPaste()" />
	<key id="xcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="x" onkeypress="EditorCut()" />
	<key id="ycmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="y" onkeypress="EditorRedo()" />
	<key id="zcmdkey" disabled="false" shift="false" xulkey="true" alt="false" key="z" onkeypress="EditorUndo()" />
</keyset>

-->

<popupset>
  <popup id="TextColorPopup"/>
  <popup id="BackColorPopup"/>
</popupset>

<!-- box id="toolbar" align="vertical" style="width:100%;height:100%" -->
<toolbox class="toolbox-top">
  <menubar>
	<menu id="menu_File">
      <menupopup id="menu_FilePopup">
        <menuitem value="&newMessage.label;" accessKey="&newMessage.accesskey;" key="key_newMessage" observes="cmd_newMessage"/>
        <menu id="menu_New">
          <menupopup id="menu_NewPopup">
            <menuitem id="menu_newNavigator"/>
            <menuitem id="menu_newMessage"/>
            <menuitem id="cmd_newCard"/>
            <menuitem id="menu_newEditor"/>
          </menupopup>
        </menu>
		<menuseparator/>

		<menuitem id="menu_close"/>
		<menuitem value="&saveCmd.label;" disabled="true" key="key_save"/>
		<menu value="&saveAsCmd.label;" accessKey="&saveAsCmd.accesskey;">
          <menupopup>
            <menuitem value="&saveAsFileCmd.label;" disabled="true" accessKey="&saveAsFileCmd.accesskey;"/>
            <menuseparator/>
            <menuitem value="&saveAsDraftCmd.label;" accessKey="&saveAsDraftCmd.accesskey;" oncommand="SaveAsDraft()"/>
            <menuitem value="&saveAsTemplateCmd.label;" accessKey="&saveAsTemplateCmd.accesskey;" oncommand="SaveAsTemplate()"/>
          </menupopup>
		</menu>
		<menuseparator/>

		<menuitem value="&attachFileCmd.label;" accesskey="&attachFileCmd.accesskey;" observes="cmd_attachFile"/>
		<menuitem value="&attachPageCmd.label;" accesskey="&attachPageCmd.accesskey;" oncommand="AttachPage()"/>
	    <menuseparator/>
		
		<menuitem value="&sendNowCmd.label;" accessKey="&sendNowCmd.accesskey;" observes="cmd_sendNow"/>
		<menuitem value="&sendLaterCmd.label;" accessKey="&sendLaterCmd.accesskey;" observes="cmd_sendLater"/>
		<menuseparator/>
		<menuitem id="menu_pageSetup" disabled="true"/>
		<menuitem value="&printPreviewCmd.label;" disabled="true" accessKey="&printPreviewCmd.accesskey;" oncommand="nsCmd:BrowserPrintPreview"/>
		<menuitem value="&printCmd.label;" disabled="true" key="key_print" accessKey="&printCmd.accesskey;" observes="cmd_print"/>
		<menuseparator/>
		</menupopup>
	</menu>
	<menu id="menu_Edit">
		<menupopup>
			<menuitem id="menu_undo"/>
			<menuitem id="menu_redo"/>
			<menuseparator/>
			<menuitem id="menu_cut"/>
			<menuitem id="menu_copy"/>
			<menuitem id="menu_paste"/>
            <menuitem id="menu_pasteQuote"/>
			<menuitem id="menu_delete"/>
			<menuseparator/>
			<menuitem id="menu_selectAll"/>
			<menuseparator/>
			<menuitem value="&findCmd.label;"      key="key_find"      accesskey="&findCmd.accesskey;"      observes="cmd_find"/>
			<menuitem value="&findAgainCmd.label;" key="key_findAgain" accesskey="&findAgainCmd.accesskey;" observes="cmd_findAgain"/>
			<menuseparator/>
			<menuitem id="menu_preferences" oncommand="goPreferences('messengercompose.xul', 'chrome://messenger/content/messengercompose/pref-messages.xul')"/>
		</menupopup>
	</menu>
	<menu id="menu_View">
	<menupopup>
			<menu id="menu_Toolbars">
				<menupopup>
		            <menuitem id="menu_showComposeToolbar"
		                      value="&showComposeToolbarCmd.label;"
		                      accesskey="&showComposeToolbarCmd.accesskey;"
		                      oncommand="goToggleToolbar('composeToolbar', 'menu_showComposeToolbar')"
		                      checked="true"/>
		            <menuitem id="menu_showFormatToolbar"
		                      value="&showFormatToolbarCmd.label;"
		                      accesskey="&showFormatToolbarCmd.accesskey;"
		                      oncommand="goToggleToolbar('FormatToolbar', 'menu_showFormatToolbar')"
		                      checked="true"/>
		            <menuitem id="menu_showStatusbar"
		                      value="&showStatusbarCmd.label;"
		                      accesskey="&showStatusbarCmd.accesskey;"
		                      oncommand="goToggleToolbar('status-bar', 'menu_showStatusbar')"
		                      checked="true" disabled="true"/>
					<menuitem id="menu_showTaskbar"/>
				</menupopup>
			</menu>
			<menuitem value="&showParagraphMarksCmd.label;" disabled="true" cmd="nsCmd:ComposeNYI"/>
			<menuseparator/>
			<menuitem value="&pageInfoCmd.label;" disabled="true" accesskey="&pageInfoCmd.accesskey;" cmd="nsCmd:ComposeNYI"/>
			<menuseparator/>
<!-- Deprecated BEGIN
			<menu value="&dcharMenu.label;" oncreate="InitCharsetMenuCheckMark();">
			<menupopup>
			<menuitem id="ISO-8859-1" type="radio" name="charsetGroup" value="&dcharIso1Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="ISO-8859-2" type="radio" name="charsetGroup" value="&dcharIso2Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="ISO-8859-3" type="radio" name="charsetGroup" value="&dcharIso3Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="ISO-8859-4" type="radio" name="charsetGroup" value="&dcharIso4Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="ISO-8859-9" type="radio" name="charsetGroup" value="&dcharIso9Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="ISO-8859-10" type="radio" name="charsetGroup" value="&dcharIso10Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id= "ISO-8859-14" type="radio" name="charsetGroup" value="&dcharIso14Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="ISO-8859-15" type="radio" name="charsetGroup" value="&dcharIso15Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="ISO-2022-JP" type="radio" name="charsetGroup" value="&dcharJapanCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="BIG5" type="radio" name="charsetGroup" value="&dcharTradChiBigCmd.label;" oncommand="SetDocumentCharacterSet('Big5');"/>
			<menuitem id="GB2312" type="radio" name="charsetGroup" value="&dcharSimpChiGbCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="EUC-KR" type="radio" name="charsetGroup" value="&dcharKoreanCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="UTF-8" type="radio" name="charsetGroup" value="&dcharUtf8Cmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="KOI8-R" type="radio" name="charsetGroup" value="&dcharRusCmd.label; " oncommand="SetDocumentCharacterSet(this.id);"/>
			<menuitem id="KOI8-U" type="radio" name="charsetGroup" value="&dcharUkrCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="ISO-8859-7" type="radio" name="charsetGroup" value="&dcharIsoGreekCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="VISCII" type="radio" name="charsetGroup" value="&dcharVietViCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="TIS-620" type="radio" name="charsetGroup" value="&dcharThaiCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem id="ARMSCII-8" type="radio" name="charsetGroup" value="&dcharArmCmd.label;" oncommand="SetDocumentCharacterSet(this.id);"/>
			 <menuseparator />
			<menuitem value="&dcharDEFAULT.label;" oncommand="SetDefaultMailSendCharacterSet();"/>
			</menupopup>
		</menu>
END of Deprecated -->
            <menu id = "maileditCharsetMenu" />
	</menupopup>
    </menu>


	<!-- entire menus comes from editorOverlay -->
	<menu id="insertMenu"/>
	
	<!-- menu items come from editorOverlay -->
	<menu id="formatMenu" value="&formatMenu.label;" accesskey="&formatmenu.accesskey;">
    <menupopup id="formatMenuPopup">
  		<menu id="tableMenu"/>
     	<menuseparator/>
      <menuitem id="objectProperties"/>
      <menuitem id="colorsAndBackground"/>
    </menupopup>
	</menu>
	

	<menu value="&optionsMenu.label;">
    <menupopup>	
		<menuitem value="&selectAddressCmd.label;" accesskey="&selectAddressCmd.accesskey;" observes="cmd_selectAddress"/>
        <menuitem value="&checkSpellingCmd.label;" id="menu_checkspelling" accesskey="&checkSpellingCmd.accesskey;" key="key_checkspelling" observes="cmd_spelling"/>
		<menuitem value="&quoteOrigCmd.label;" accesskey="&quoteOrigCmd.accesskey;" disabled="true" oncommand="nsCmd:ComposeQuote"/>	
		<menuitem value="&editRewrapCmd.label;" oncommand="editorShell.Rewrap(false)"/>
	    <menuseparator/>
	    
	   	<menu value="&outputFormatMenu.label;" oncommand="OutputFormatMenuSelect(event.target);">
    		<menupopup>
			<menuitem value="&askmeFormatCmd.label;" id="1"/>
    		<menuitem value="&plainTextFormatCmd.label;" id="2"/>
    		<menuitem value="&htmlFormatCmd.label;" id="3"/>
    		<menuitem value="&bothFormatCmd.label;" id="4"/>
			</menupopup>
	   	</menu>
    	<menuitem value="&returnReceiptCmd.label;" oncommand="ReturnReceiptMenuSelect();"/>
		<menu value="&priorityMenu.label;" oncommand="PriorityMenuSelect(event.target);">
    		<menupopup>
			<menuitem value="&lowestPriorityCmd.label;" id="lowest"/>
    		<menuitem value="&lowPriorityCmd.label;" id="low"/>
    		<menuitem value="&normalPriorityCmd.label;" id="normal"/>
    		<menuitem value="&highPriorityCmd.label;" id="high"/>
    		<menuitem value="&highestPriorityCmd.label;" id="highest"/>
			</menupopup>
	   	</menu>

		<menu value="&fileCarbonCopyCmd.label;" id="fccMenu" datasources="rdf:mailnewsfolders rdf:msgaccountmanager" ref="msgaccounts:/" rdf:ignore="http://home.netscape.com/NC-rdf#MessageChild">
        <menupopup/>
		<template> 
		<rule nc:CanFileMessages="true" iscontainer="true" isempty="false">
            <menupopup>
              <menuitem value="[current selection]" disabled="true"/>
              <menuseparator/>
              <menu uri="..."  class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
				SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
				BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
				IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
				ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
                <menupopup>
                  <menuitem uri="..." value="&fileHereMenu.label;" 
				oncommand="MessageFcc(event.target)"
				SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
				BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
				IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
				ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType" />
                  <menuseparator/>
                </menupopup>
              </menu>
            </menupopup>
		</rule>
		<rule nc:CanFileMessages="false" nc:ServerType="nntp">
                <!-- don't show nntp servers in the file and copies menus -->
		</rule>
		<rule nc:CanFileMessages="false" iscontainer="true" isempty="false">
            <!-- note, there is no "file here" -->
            <menupopup>
              <menu uri="..."  class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name"
                                SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
                                BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
                                IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
                                ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType">
			<menupopup/>
              </menu>
            </menupopup>
		</rule>
		<rule nc:CanFileMessages="true">
            <menupopup>
			<menuitem uri="..." class="folderMenuItem" value="rdf:http://home.netscape.com/NC-rdf#Name" oncommand="MessageFcc(event.target)" 
				SpecialFolder="rdf:http://home.netscape.com/NC-rdf#SpecialFolder"
				BiffState="rdf:http://home.netscape.com/NC-rdf#BiffState"
				IsServer="rdf:http://home.netscape.com/NC-rdf#IsServer"
				ServerType="rdf:http://home.netscape.com/NC-rdf#ServerType"/>
            </menupopup>
          </rule>
        </template>
		</menu>	    

		<menuitem value="&addSignatureCmd.label;" disabled="true" oncommand=""/>    	
		<menuitem value="&attachVCardCmd.label;" disabled="true" accesskey="&attachVCardCmd.accesskey;" oncommand="AttachVCard()"/>    	
    </menupopup>
	</menu>

    <menu id="debugMenu"/>
	<menu id="tasksMenu"/>
	<menu id="menu_Help"/>
	<spring flex="100%"/>
  </menubar>
    <toolbar class="toolbar-primary" id="composeToolbar" persist="collapsed">
		<box id="toolbar_button_box">
	 		<button class="button-toolbar-2 top" id="button-send" value="&sendButton.label;" tooltip="aTooltip" tooltiptext="&sendButton.tooltip;"  onclick="SendMessage()"/>
            <toolbarseparator/>
	 		<button class="button-toolbar-2 top" id="button-address" value="&addressButton.label;" tooltip="aTooltip" tooltiptext="&addressButton.tooltip;" onclick="SelectAddress()"/>
	 		<button class="button-toolbar-2 top" id="button-attach" value="&attachButton.label;" tooltip="aTooltip" tooltiptext="&attachButton.tooltip;"  onclick="AttachFile()"/>
	 		<button class="button-toolbar-2 top" id="button-quote" disabled="true" value="&quoteButton.label;" tooltip="aTooltip" tooltiptext="&quoteButton.tooltip;"  onclick="QuoteMessage()"/>
            <button class="button-toolbar-2 top" id="spellingButton" value="&spellingButton.label;" observes="cmd_spelling"/>
            <toolbarseparator/>
	 		<button class="button-toolbar-2 top" id="button-save" value="&saveButton.label;" tooltip="aTooltip" tooltiptext="&saveButton.tooltip;"  onclick="SaveAsDraft()"/>
	 		<button class="button-toolbar-2 top" id="button-stop" disabled="true" value="&stopButton.label;" tooltip="aTooltip" tooltiptext="&stopButton.tooltip;"  onclick="Stop()"/>
	    	<spring flex="100%"/>
		</box>
    <button class="plain" id="navigator-throbber" oncommand='goClickThrobber("compose.throbber.url")'>
      <observes element="broadcaster_throbber" attribute="busy"/>
    </button>
	</toolbar>

	<toolbar id="MsgHeadersToolbar" persist="collapsed">
		<box align="horizontal" flex="100%">
			<spring style="width:0.5em"/>
			<box align="vertical" flex="75%">
				<spring style="height:0.5em"/>
				<box align="horizontal">
                    <text value="&fromAddr.label;"/>
					<spring style="width:0.5em"/>
					<menulist id="msgIdentity" value="..." flex="100%" oncommand="contentChanged=true; LoadIdentity(false);">
                        <menupopup id="msgIdentityPopup" flex="100%"/>
                    </menulist>
				</box> 
				<spring style="height:0.5em"/>

				<!-- addressing widget -->
				<box id="addressingWidget"/>
				<spring style="height:0.5em"/>
				
				<box align="horizontal">
					<text value="&subject.label;"/>
					<spring style="width:0.5em"/>
				    <textfield id="msgSubject" type="text" flex="100%"
						onkeyup="SetComposeWindowTitle(event.which);"
						onkeypress="if (event.which == 9) {
						                if (event.shiftKey == false) {
						                    contentWindow.focus();
						                    event.preventDefault();
						                }
						            }
						            else
						                if (event.which == 13)
						                    contentWindow.focus();"
						onchange="contentChanged=true;"
						/>
				</box>
				<spring style="height:0.5em"/>
			</box>
			
			<spring style="width:0.5em"/>
			<box align="vertical" flex="25%">
				<spring style="height:0.5em"/>
				<box align="vertical" style="height:1em">
					<text value="&attachments.label;" flex="100%"/>
				</box>
				<spring style="height:0.5em"/>
				<box align="vertical" style="height:8.5em; background-color:white; border-top:solid black 1px">
					<tree id="attachmentBucket" flex="100%" style="width:0px"
						onkeypress="if (event.keyCode == 8 || event.keyCode == 46) RemoveSelectedAttachment();"
						onchange="contentChanged=true;">
						<treecol style="width:100%"/>

						<treechildren id="bucketBody">
						</treechildren>
					</tree>
				</box>
				<spring style="height:0.5em"/>
			</box>
			<spring style="width:0.5em"/>
		</box>
	</toolbar>

    <!-- These toolbar items get filled out from the editorOverlay -->
    <toolbar id="FormatToolbar" persist="collapsed">
      <!-- We need this else menulists get stretched -->
      <box autostretch="never">
        <menulist id="ParagraphSelect"/>
        <menulist id="FontFaceSelect"/>

        <stack id="ColorButtons"/>

        <button id="DecreaseFontSizeButton"/>
        <button id="IncreaseFontSizeButton"/>
        <button id="boldButton"/>
        <button id="italicButton"/>
        <button id="underlineButton"/>
        <button id="ulButton"/>
        <button id="olButton"/>
        <button id="outdentButton"/>
        <button id="indentButton"/>

        <menu>
          <button id="AlignPopupButton"/>
          <menupopup id="AlignmentPopup"/>
        </menu>

        <menu>
          <button id="InsertPopupButton"/>
	      <menupopup id="InsertPopup"/>
        </menu>
      </box>
      <spring flex="100%"/>
    </toolbar>
</toolbox>

    <!-- The main mail three pane frame -->
    <editor type="content-primary" id="content-frame" src="about:blank" name="browser.message.body" flex="100%"
		onkeypress="if (event.which == 9)
		                if (event.shiftKey == true) {
		                    document.getElementById('msgSubject').focus();
		                    event.preventDefault();
		                }"
        />

    <box id="status-bar">
		<box align="vertical" style="width:100px">
			<spring flex="100%"/>
			<progressmeter mode="normal" value="0">
			</progressmeter>
			<spring flex="100%"/>
		</box>
		<button id="statusText" align="right" flex="100%" value="&defaultStatusText.label;"/>
    </box>

<!-- /box -->
	<toolbox id="taskbar" class="toolbox-bottom"/>
</window>

