<?xml version="1.0"?>
<?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>

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

<window xmlns:html="http://www.w3.org/TR/REC-html40"
        xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
        onload="parent.initPanel('chrome://messenger/content/messengercompose/pref-composing_messages.xul');"
        orient="vertical"
        class="color-dialog">

  <popupset id="aTooltipSet"/>
    
  <script language="JavaScript">
  <![CDATA[
    var _elementIDs = ["forwardMessageMode", "autoQuote", "replyOnTop", "spellCheckBeforeSend", "sendStruct", "strictlyMime", "wrapLength", "sendDefaultCharsetList", "addressingAutocomplete"];
    
    function Startup()
    {
      doEnabling();
    }
    
    function doEnabling()
    {
      var quotebox = document.getElementById("thenBox");
      var quotecheck = document.getElementById("autoQuote");
      if( quotecheck.checked ) {
        quotebox.firstChild.removeAttribute("disabled");
        quotebox.lastChild.removeAttribute("disabled");
      }
      else {
        quotebox.firstChild.setAttribute("disabled","true");
        quotebox.lastChild.setAttribute("disabled","true");
      }
    }
  ]]>
  </script>  
    
  <box class="box-smallheader" title="&pane.title;"/>

	<titledbox orient="vertical">
		<title><text value="&forwardReply.label;"/></title>
		
    <box autostretch="never">
      <text class="label" value="&forwardMsg.label;" accesskey="&forwardMsg.accesskey;"/>
      <menulist id="forwardMessageMode" 
                pref="true" preftype="int" prefstring="mail.forward_message_mode"
                prefattribute="data">
        <menupopup>
          <menuitem data="0" value="&asAttachment.label;" accesskey="&asAttachment.accesskey;"/>
          <menuitem data="1" value="&quoted.label;" accesskey="&quoted.accesskey;"/>
          <menuitem data="2" value="&inline.label;" accesskey="&inline.accesskey;"/>
        </menupopup>
      </menulist>
    </box>
    
    <checkbox id="autoQuote" value="&autoQuote.label;" accesskey="&autoQuote.accesskey;" 
              pref="true" preftype="bool" prefstring="mail.auto_quote"
              prefattribute="checked" oncommand="doEnabling();"/>		
    <box class="indent" autostretch="never" id="thenBox">
      <text class="label" value="&then.label;" accesskey="&then.accesskey;" for="replyOnTop"/>
      <menulist id="replyOnTop" pref="true" preftype="int" prefstring="mailnews.reply_on_top"
                prefattribute="data">
        <menupopup>
          <menuitem data="1" value="&aboveQuote.label;" accesskey="&aboveQuote.accesskey;"/>
          <menuitem data="0" value="&belowQuote.label;" accesskey="&belowQuote.accesskey;"/>
          <menuitem data="2" value="&selectAndAboveQuote.label;" accesskey="&selectAndAboveQuote.accesskey;"/>
          <menuitem data="3" value="&selectAndBelowQuote.label;" accesskey="&selectAndBelowQuote.accesskey;"/>
        </menupopup>
      </menulist>        
    </box>
  </titledbox>

	<!-- Composing Mail -->
	<titledbox orient="vertical" autostretch="never">
		<title><text value="&sendingMessagesHeader.label;"/></title>
        
    <checkbox id="spellCheckBeforeSend" value="&spellCheck.label;" accesskey="&spellCheck.accesskey;"
              pref="true" preftype="bool" prefstring="mail.SpellCheckBeforeSend"
              prefattribute="checked"/>
    <checkbox id="sendStruct" value="&convertStructs.label;" accesskey="&convertStructs.accesskey;"
              pref="true" preftype="bool" prefstring="mail.send_struct"
              prefattribute="checked" tooltip="aTooltip" tooltiptext="&convertStructs.tooltip;"/>
	
	<checkbox id="strictlyMime" value="&useMIME.label;" accesskey="&useMIME.accesskey;"
                pref="true" preftype="bool" prefstring="mail.strictly_mime"
                prefattribute="checked"/>
    
	<box autostretch="never">
	<text class="label" value="&wrapOutMsg.label;" accesskey="&wrapOutMsg.accesskey;" for="wrapLength"/>
    <textfield id="wrapLength" size="3" pref="true" preftype="int"
               prefstring="mailnews.wraplength" prefattribute="value"/>
    <text class="label" value="&char.label;"/>
	</box>
	</titledbox>
	
	<titledbox orient="vertical" autostretch="never">
	<title><text value="&languages.label;"/></title>

   <box autostretch="never">
    <text class="label" value="&sendDefaultCharset.label;" for="sendDefaultCharsetList"/>
    <menulist id="sendDefaultCharsetList" ref="NC:MaileditCharsetMenuRoot" datasources="rdf:charset-menu"
              pref="true" preftype="string" prefstring="mailnews.send_default_charset"
              prefattribute="data">
      <template>
        <menupopup>
          <menuitem value="rdf:http://home.netscape.com/NC-rdf#Name" data="..." uri="..."/>
        </menupopup>
      </template>
    </menulist>       
    </box> 
  </titledbox>
              
      
  <titledbox orient="vertical">
    <title><text value="&addressingTitle.label;"/></title>
	<html>&addressingText.label;</html>
		<checkbox id="addressingAutocomplete" value="&addressingEnable.label;"
              pref="true" preftype="bool" prefstring="mail.enable_autocomplete"
              prefattribute="checked"/>
  </titledbox>

    
</window>
