<?xml version="1.0"?> 
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://messengercompose/skin/" type="text/css"?> 

<!DOCTYPE window
[

<!ENTITY msgComposeWindow.title "Message Compose">

<!-- address labels -->
<!ENTITY fromAddr.label "From:">
<!ENTITY toAddr.label   "To:"> 
<!ENTITY ccAddr.label   "Cc:"> 
<!ENTITY bccAddr.label  "Bcc:"> 
<!ENTITY newsgroupsAddr.label   "Newsgroups:"> 
<!ENTITY subject.label  "Subject:">


<!-- menu items:  the . means that the menu item isn't implemented yet -->

<!-- File menu items -->
<!ENTITY fileMenu.label "File">
<!ENTITY newCmd.label ".New">
<!ENTITY saveCmd.label ".Save">
<!ENTITY saveAsCmd.label "Save As (Draft)">
<!ENTITY saveAsTemplateCmd.label "Save As (Template)">
<!ENTITY attachCmd.label ".Attach">
<!ENTITY sendNowCmd.label ".Send Now">
<!ENTITY sendLaterCmd.label "Send Later">
<!ENTITY quoteOrigCmd.label ".Quote Original Message">
<!ENTITY selectAddressCmd.label "Select Addresses...">
<!ENTITY printSetupCmd.label ".Print Setup">
<!ENTITY printPreviewCmd.label ".Print Preview">
<!ENTITY printCmd.label ".Print">
<!ENTITY closeCmd.label ".Close">
<!ENTITY exitCmd.label "Exit">

<!-- Edit menu items -->
<!ENTITY editMenu.label ".Edit">
<!ENTITY undoCmd.label ".Undo">
<!ENTITY cutCmd.label ".Cut">
<!ENTITY copyCmd.label ".Copy">
<!ENTITY pasteCmd.label ".Paste">
<!ENTITY pasteAsQuotCmd.label ".Paste as Quotation">
<!ENTITY deleteCmd.label ".Delete">
<!ENTITY selectAllCmd.label ".Select All">
<!ENTITY findCmd.label ".Find">
<!ENTITY findAgainCmd.label ".Find Again">
<!ENTITY doNotCompleteAddrCmd.label ".Do Not Complete Address">
<!ENTITY showMatchingAddrCmd.label ".Show Matching Address">
<!ENTITY prefsCmd.label ".Preferences...">

<!-- View menu items -->
<!ENTITY viewMenu.label ".View">
<!ENTITY showCmd.label ".Show">
<!ENTITY addressCmd.label ".Address">
<!ENTITY attachmentsCmd.label ".Attachments">
<!ENTITY wrapCmd.label ".Wrap Long Lines">
<!ENTITY charSetCmd.label ".Character Set">

<!-- Tools menu items -->
<!ENTITY toolsMenu.label ".Tools">
<!ENTITY checkSpellCmd.label ".Check Spelling...">

<!-- Toolbar items -->
<!ENTITY sendButton.img "chrome://messengercompose/skin/send.gif">
<!ENTITY sendButton.label "Send">
<!ENTITY quoteButton.img "chrome://messengercompose/skin/quote.gif">
<!ENTITY quoteButton.label "Quote">
<!ENTITY addressButton.img "chrome://messengercompose/skin/address.gif">
<!ENTITY addressButton.label "Address">
<!ENTITY attachButton.img "chrome://messengercompose/skin/attach.gif">
<!ENTITY attachButton.label "Attach">
<!ENTITY spellingButton.img "chrome://messengercompose/skin/spelling.gif">
<!ENTITY spellingButton.label "Spelling">
<!ENTITY saveButton.img "chrome://messengercompose/skin/save.gif">
<!ENTITY saveButton.label "Save">
<!ENTITY stopButton.img "chrome://messengercompose/skin/stop.gif">
<!ENTITY stopButton.label "Stop">
<!ENTITY throbberButton.img "resource:/res/throbber/anims00.gif">
<!ENTITY throbberButton.url "http://www.mozilla.org/">

<!-- Toolbar items, imported from editorAppShell.xul -->
<!ENTITY formatToolbar.boldChar "B">
<!ENTITY formatToolbar.italicChar "I">
<!ENTITY formatToolbar.underlineChar "U">
]>

<window xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
		onunload="ComposeUnload()"
		width="640" height="480"
		title="&msgComposeWindow.title;"
		style="width:100%; height:100%"
		align="vertical"> 
  

<html:script language="JavaScript" src="chrome://editor/content/EditorCommands.js"/>
<html:script language="JavaScript" src="MsgComposeCommands.js"/>

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

<!-- The Following broadcasters have been imported from editorAppShell.xul -->
<broadcaster id="Editor:Style:IsBold" bold="false"/>
<broadcaster id="Editor:Style:IsItalic"/>
<broadcaster id="Editor:Style:IsUnderline"/>


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

<menubar>
	<menu name="File">
		<menuitem name="&newCmd.label;" cmd="nsCmd:ComposeNew"/>
		<menuitem name="&saveCmd.label;" cmd="nsCmd:ComposeSave"/>
		<menuitem name="&saveAsCmd.label;" onclick="SaveAsDraft()"/>
		<menuitem name="&saveAsTemplateCmd.label;" onclick="SaveAsTemplate()"/>
		<menuitem name="&attachCmd.label;" cmd="nsCmd:ComposeAttach"/>
		<separator/>
		<menuitem name="&sendNowCmd.label;" cmd="nsCmd:ComposeSend"/>
		<menuitem name="&sendLaterCmd.label;" onclick="SendMessageLater()"/>
		<menuitem name="&quoteOrigCmd.label;" cmd="nsCmd:ComposeQuote"/>
		<menuitem name="&selectAddressCmd.label;" onclick="SelectAddress()"/>
		<separator/>
		<menuitem name="&printSetupCmd.label;" cmd="nsCmd:BrowserPrintSetup"/>
		<menuitem name="&printPreviewCmd.label;" cmd="nsCmd:BrowserPrintPreview"/>
		<menuitem name="&printCmd.label;" cmd="nsCmd:BrowserPrint"/>
		<separator/>
		<menuitem name="&closeCmd.label;" cmd="nsCmd:BrowserClose"/>
		<menuitem name="&exitCmd.label;" onclick="ComposeExit()"/>
	</menu>
    <menu name="&editMenu.label;">
		<menuitem name="&undoCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
		<menuitem name="&cutCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&copyCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&pasteCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&pasteAsQuotCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&deleteCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&selectAllCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
		<menuitem name="&findCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&findAgainCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
		<menuitem name="&doNotCompleteAddrCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&showMatchingAddrCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
		<menuitem name="&prefsCmd.label;" cmd="nsCmd:ComposeNYI"/>
    </menu>
    <menu name="&viewMenu.label;">
		<menuitem name="&showCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
		<menuitem name="&addressCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<menuitem name="&attachmentsCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
		<menuitem name="&wrapCmd.label;" cmd="nsCmd:ComposeNYI"/>
		<separator/>
    		<menu name="Character Set">
    			<menuitem name="Western (ISO-8859-1)" onclick="SetDocumentCharacterSet('ISO-8859-1');"/>
          <separator/>
    			<menuitem name="Central European (ISO-8859-2)" onclick="SetDocumentCharacterSet('ISO-8859-2');"/>
          <separator/>
    			<menuitem name="Esperanto/Maltese (ISO-8859-3)" onclick="SetDocumentCharacterSet('ISO-8859-3');"/>
          <separator/>
    			<menuitem name="Baltic (ISO-8859-4)" onclick="SetDocumentCharacterSet('ISO-8859-4');"/>
          <separator/>
    			<menuitem name="Turkish (ISO-8859-9)" onclick="SetDocumentCharacterSet('ISO-8859-9');"/>
          <separator/>
    			<menuitem name="Northern European (ISO-8859-10)" onclick="SetDocumentCharacterSet('ISO-8859-10');"/>
          <separator/>
    			<menuitem name="Celtic (ISO-8859-14)" onclick="SetDocumentCharacterSet('ISO-8859-14');"/>
          <separator/>
    			<menuitem name="New Western (ISO-8859-15)" onclick="SetDocumentCharacterSet('ISO-8859-15');"/>
          <separator/>
    			<menuitem name="Japanese (ISO-2022-JP)" onclick="SetDocumentCharacterSet('ISO-2022-JP');"/>
          <separator/>
    			<menuitem name="Traditional Chinese (Big5)" onclick="SetDocumentCharacterSet('Big5');"/>
          <separator/>
    			<menuitem name="Simplified Chinese (GB2312)" onclick="SetDocumentCharacterSet('GB2312');"/>
          <separator/>
    			<menuitem name="Korean (EUC-KR)" onclick="SetDocumentCharacterSet('EUC-KR');"/>
          <separator/>
    			<menuitem name="UTF-8" onclick="SetDocumentCharacterSet('UTF-8');"/>
          <separator/>
    			<menuitem name="UTF-7" onclick="SetDocumentCharacterSet('UTF-7');"/>
          <separator/>
    			<menuitem name="Cyrillic (KOI8-R)" onclick="SetDocumentCharacterSet('KOI8-R');"/>
          <separator/>
    			<menuitem name="Ukrainian (KOI8-U)" onclick="SetDocumentCharacterSet('KOI8-U');"/>
          <separator/>
    			<menuitem name="Greek (ISO-8859-7)" onclick="SetDocumentCharacterSet('ISO-8859-7');"/>
          <separator/>
    			<menuitem name="Vietnamese (VISCII)" onclick="SetDocumentCharacterSet('VISCII');"/>
          <separator/>
    			<menuitem name="Thai (TIS-620)" onclick="SetDocumentCharacterSet('TIS-620');"/>
          <separator/>
    			<menuitem name="Armenian (ARMSCII-8)" onclick="SetDocumentCharacterSet('ARMSCII-8');"/>
    		</menu>
    </menu>
    <menu name="&toolsMenu.label;">
		<menuitem name="&checkSpellCmd.label;" cmd="nsCmd:ComposeSpelling"/>
    </menu>
</menubar>

<!-- box id="toolbar" align="vertical" style="width:100%;height:100%" -->
<toolbox>
	<toolbar>
 		<titledbutton src="&sendButton.img;" align="bottom" value="&sendButton.label;" onClick="SendMessage()"/>
 		<titledbutton src="&quoteButton.img;" align="bottom" value="&quoteButton.label;" onClick="QuoteMessage()"/>
 		<titledbutton src="&addressButton.img;" align="bottom" value="&addressButton.label;" onClick="SelectAddress()"/>
 		<titledbutton src="&attachButton.img;" align="bottom" value="&attachButton.label;" onClick="AttachFile()"/>
 		<titledbutton src="&spellingButton.img;" align="bottom" value="&spellingButton.label;" onClick="Spelling()"/>
 		<titledbutton src="&saveButton.img;" align="bottom" value="&saveButton.label;" onClick="SaveAsDraft()"/>
 		<titledbutton src="&stopButton.img;" align="bottom" value="&stopButton.label;" onClick="Stop()"/>
	    <spring flex="100%"/>
		<titledbutton src="&throbberButton.img;" align="bottom" onclick="MsgHome('&throbberButton.url;')"/>
	</toolbar>

	<toolbar>
		<box align="horizontal" flex="100%">
			<box align="vertical" flex="60%">
				<box align="horizontal" flex="100%">
					<html:div flex="20%">&fromAddr.label;</html:div>
					<html:select id="msgIdentity" flex="80%"/>
				</box>
				<spring style="height:0.5em"/>
				<box align="horizontal" flex="100%">
					<box align="vertical" flex="20%">
						<box align="vertical" flex="100%">
							<html:select id="msgRecipientType#1" flex="100%">
							<html:option value="addr_to">&toAddr.label;</html:option>
							<html:option value="addr_cc">&ccAddr.label;</html:option>
							<html:option value="addr_bcc">&bccAddr.label;</html:option>
							<html:option value="addr_newsgroups">&newsgroupsAddr.label;</html:option>
							</html:select>
						</box>
						<box align="vertical" flex="100%">
							<html:select id="msgRecipientType#2" flex="100%"/>
						</box>
						<box align="vertical" flex="100%">
							<html:select id="msgRecipientType#3" flex="100%"/>
						</box>
					</box>
					<box align="vertical" flex="80%">
						<box align="vertical" flex="100%">
 							<html:input type="text" id="msgRecipient#1" flex="100%"/>
						</box>					
						<box align="vertical" flex="100%">
 							<html:input type="text" id="msgRecipient#2" flex="100%"/>
						</box>					
						<box align="vertical" flex="100%">
 							<html:input type="text" id="msgRecipient#3" flex="100%"/>
						</box>					
					</box>					
				</box>
				<box align="honrizontal" flex="100%">
					<html:div flex="20%">&subject.label;</html:div>
				    <html:input id="msgSubject" type="text" flex="80%"/>
				</box>
			</box>
			<box align="vertical" flex="40%">
				<html:div flex="100%">[attachment box]</html:div>
			</box>
		</box>
	</toolbar>
	

    <!-- The Following toolbar has been imported from editorAppShell.xul -->
      <toolbar id="FormatToolbar">
		    <titledbutton id="ParagraphPopup" value="Paragraph" class="popup" align="left" popup="ParagraphMenu" popupanchor="bottomleft"/>
		    <titledbutton id="FontFacePopup" value="Font" class="popup" align="left" popup="FontFaceMenu" popupanchor="bottomleft"/>
		    <titledbutton id="FontSizePopup" value="Size" class="popup" align="left" popup="FontSizeMenu" popupanchor="bottomleft"/>
		    <titledbutton id="TextColorPopup" src="chrome://editor/skin/images/ED_TextColor.gif" class="popup" popup="TextColorMenu" popupanchor="bottomleft"/>
		    <titledbutton id="BackColorPopup" src="chrome://editor/skin/images/ED_BackColor.gif" class="popup" popup="BackColorMenu" popupanchor="bottomleft"/>
        <titledbutton id="BoldButton" value="&formatToolbar.boldChar;" onclick="EditorApplyStyle('b')">
		      <observes element="Editor:Style:IsBold" attribute="bold" onchange="onBoldChange()"/>
        </titledbutton>
	      <titledbutton id="ItalicButton" value="&formatToolbar.italicChar;" onclick="EditorApplyStyle('i')"/>
	      <titledbutton id="UnderlineButton" value="&formatToolbar.underlineChar;" onclick="EditorApplyStyle('u')"/>
<!--
        <titledbutton id="BoldButton" src="chrome://editor/skin/images/ED_Bold.gif" align="bottom" onclick="EditorApplyStyle('b')">
		      <observes element="Editor:Style:IsBold" attribute="bold" onchange="onBoldChange()"/>
        </titledbutton>
	      <titledbutton id="ItalicButton" src="chrome://editor/skin/images/ED_Italic.gif" align="bottom" onclick="EditorApplyStyle('i')"/>
	      <titledbutton id="UnderlineButton" src="chrome://editor/skin/images/ED_Underline.gif" align="bottom" onclick="EditorApplyStyle('u')"/>
-->
	      <titledbutton src="chrome://editor/skin/images/ED_Bullets.gif" align="bottom" onclick="EditorInsertList('ul')"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Numbers.gif" align="bottom" onclick="EditorInsertList('ol')"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Outdent.gif" align="bottom" onclick="EditorIndent('outdent')"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Indent.gif" align="bottom" onclick="EditorIndent('indent')"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Align.gif" align="bottom" class="popup" popup="AlignmentWindow" popupanchor="bottomleft"/>

	      <titledbutton src="chrome://editor/skin/images/ED_Link.gif" align="bottom" value="Link" onclick="EditorInsertLink()"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Image.gif" align="bottom" value="Image" onclick="EditorInsertImage()"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Target.gif" align="bottom" value="Anchor" onclick="EditorInsertNamedAnchor()"/>
	      <titledbutton src="chrome://editor/skin/images/ED_HLine.gif" align="bottom" value="H.Line" onclick="EditorInsertHLine()"/>
	      <titledbutton src="chrome://editor/skin/images/ED_Spell.gif" align="bottom" value="Spell" class="popup" onclick="CheckSpelling()"/>
		  <spring flex="100%"/>
	  </toolbar>
</toolbox>

    <!-- The main mail three pane frame -->
    <html:iframe type="content" id="content-frame" src="about:blank" name="browser.message.body" flex="100%" />

    <!-- Ripped off from navigator.xul; this should be a XUL fragment! -->
    <box align="horizontal" id="status-bar">
 
    <titledbutton value="[Notification Component]" onclick="doTests()"/>
	<box align="vertical" style="width:100px">
		<spring flex="100%"/>
		<progressmeter mode="normal" value="0">
		</progressmeter>
		<spring flex="100%"/>
	</box>

	<titledbutton id="statusText" align="right" flex="100%" value="Document: Done" style="font-family:sans-serif;font-size:2.5mm">
	</titledbutton>
    </box>

<!-- /box -->
</window>

