<form method="post" id="compose" name="compose" <if:file_upload>enctype="multipart/form-data" </if:file_upload> action="<tag:post_action />">
<tag:forminput />
<loop:hidden>
<input type="hidden" name="<tag:hidden.n />" value="<tag:hidden.v />" id="<tag:hidden.n />" />
</loop:hidden>

<h1 class="header">
 <span class="rightFloat"><tag:help /></span>
 <tag:title />
</h1>

<br />

<tag:status />

<table cellspacing="0">
 <tr>
  <td></td>
  <td class="nowrap">
<if:allow_compose>
   <input name="btn_send_message" type="submit" <tag:send_msg_ak /> class="button" value="<gettext>Send Message</gettext>" />
</if:allow_compose>
<if:save_draft_ak>
   <input name="btn_save_draft" type="submit" <tag:save_draft_ak /> class="button" value="<gettext>Save Draft</gettext>" />
</if:save_draft_ak>
   <input name="btn_cancel_compose" type="submit" title="<gettext>Cancel Message</gettext>" class="button" value="<gettext>Cancel Message</gettext>" />
  </td>
 </tr>

 <tr>
  <td class="light rightAlign"><strong><if:di_locked><gettext>From</gettext><else:di_locked><tag:identity_label /></else:di_locked></if:di_locked></strong></td>
  <td class="item">
<if:di_locked>
<if:fromaddr_locked>
   <strong><tag:from /></strong>
<else:fromaddr_locked>
   <input id="text_identity" type="text" tabindex="<tag:fromaddr_tabindex />" name="from" value="<tag:from />" style="direction:ltr" />
</else:fromaddr_locked></if:fromaddr_locked>
<else:di_locked>
   <input type="hidden" id="last_identity" name="last_identity" value="<tag:last_identity />" />
<if:count_select_list>
   <select id="identity" name="identity" tabindex="<tag:selectlist_tabindex />">
<loop:select_list>
    <option value="<tag:select_list.value />" <if:select_list.selected>selected="selected" </if:select_list.selected>><tag:select_list.label /></option>
</loop:select_list>
   </select>
<else:count_select_list>
   <input type="hidden" name="identity" value="tag:identity_default />" />
   <tag:identity_text />
</else:count_select_list></if:count_select_list>
</else:di_locked></if:di_locked>
  </td>
 </tr>

<loop:addr>
 <tr>
  <td class="light rightAlign"><strong><tag:addr.label /></strong></td>
  <td class="item addressTr">
   <input type="text" id="<tag:addr.id />" autocomplete="off" tabindex="<tag:addr.input_tabindex />" style="direction:ltr" name="<tag:addr.id />" value="<tag:addr.input_value />" />
   <span id="<tag:addr.id />_loading_img" style="display:none;" class="loadingImg"></span>
  </td>
 </tr>
</loop:addr>

 <tr>
  <td class="light rightAlign"><strong><tag:subject_label /></strong></td>
  <td class="item">
   <input type="text" id="subject" tabindex="<tag:subject_tabindex />" name="subject" value="<tag:subject />" />
  </td>
 </tr>

<if:set_priority>
 <tr>
  <td class="light rightAlign">
   <strong><tag:priority_label /></strong>
  </td>
  <td class="item">
   <select id="priority" name="priority" tabindex="<tag:priority_tabindex />">
<loop:pri_opt>
    <option value="<tag:pri_opt.val />" <if:pri_opt.selected>selected="selected" </if:pri_opt.selected>><tag:pri_opt.label /></option>
</loop:pri_opt>
   </select>
  </td>
 </tr>
</if:set_priority>

<if:stationery>
 <tr>
  <td class="light rightAlign"><strong><tag:stationery_label /></strong></td>
  <td class="item">
   <select name="stationery" id="stationery">
    <option value=""><gettext>Select stationery:</gettext></option>
<loop:stationeries>
    <option value="<tag:stationeries.val />" <if:stationeries.selected>selected="selected" </if:stationeries.selected>><tag:stationeries.label /></option>
</loop:stationeries>
   </select>
  </td>
 </tr>
</if:stationery>

 <tr>
  <td></td>
  <td class="item">
   <table width="100%" cellspacing="0">
    <tr>
<loop:compose_options>
     <td align="center">
      <tag:compose_options.url /><tag:compose_options.img /><br /><tag:compose_options.label /></a>
     </td>
</loop:compose_options>
    </tr>
   </table>
  </td>
 </tr>

<if:ssm>
 <tr>
  <td></td>
  <td class="item">
   <input id="ssm" type="checkbox" class="checkbox" name="save_sent_mail" <if:ssm_selected>checked="checked" </if:ssm_selected>/>
   <tag:ssm_label />
<if:ssm_folders>
   <select tabindex="<tag:ssm_tabindex />" id="sent_mail_folder" name="sent_mail_folder"><tag:ssm_folders /></select>
<else:ssm_folders>
   <span id="sent_mail_folder"><tag:ssm_folder /></span>
</else:ssm_folders></if:ssm_folders>
  </td>
 </tr>
</if:ssm>

<if:rrr>
 <tr>
  <td></td>
  <td class="item">
   <input id="rrr" type="checkbox" class="checkbox" name="request_read_receipt" <if:rrr_selected>checked="checked" </if:rrr_selected>/> <tag:rrr_label />
  </td>
 </tr>
</if:rrr>

<if:compose_html>
 <tr>
  <td></td>
  <td class="item">
   <tag:html_img />
   <tag:html_switch />
   <if:rtemode><gettext>Switch to plain text composition</gettext><else:rtemode><gettext>Switch to HTML composition</gettext></else:rtemode></if:rtemode></a>
  </td>
 </tr>
</if:compose_html>

<if:replyauto_all>
 <tr>
  <td></td>
  <td class="item">
   <span class="notices">
    <li id="replyallnotice">
     <gettext>You are</gettext> <span class="replyAllNoticeUnderline"><gettext>replying to ALL</gettext></span> (<tag:replyauto_all /> <gettext>recipients</gettext>).
     <input name="btn_replyall_revert" type="submit" class="button" value="<gettext>Reply To Sender instead</gettext>" />
    </li>
   </span>
  </td>
 </tr>
</if:replyauto_all>

<if:replyauto_list>
 <tr>
  <td></td>
  <td class="item">
   <span class="notices">
    <li id="replylistnotice">
     <gettext>You are replying to a mailing list</gettext><if:replyauto_list_id> (<tag:replyauto_list_id />)</if:replyauto_list_id>.
     <input name="btn_replylist_revert" type="submit" class="button" value="<gettext>Reply To Sender instead</gettext>" />
    </li>
   </span>
  </td>
 </tr>
</if:replyauto_list>

<if:reply_lang>
 <tr>
  <td></td>
  <td class="item">
   <span class="notices">
    <li id="langnotice">
     <gettext>The recipient has indicated that they prefer replies in these languages:</gettext> <tag:reply_lang />.
    </li>
   </span>
  </td>
 </tr>
</if:replyauto_list>

 <tr>
  <td class="light rightAlign"><strong><tag:message_label /></strong></td>
  <td class="item" id="composeMessageParent">
   <textarea class="fixed composebody" tabindex="<tag:message_tabindex />" name="message" id="composeMessage" rows="20" cols="80"><tag:message /></textarea>
  </td>
 </tr>

 <tr>
  <td></td>
  <td class="nowrap">
<if:allow_compose>
   <input name="btn_send_message" type="submit" <tag:send_msg_ak /> class="button" value="<gettext>Send Message</gettext>" />
</if:allow_compose>
<if:save_draft_ak>
   <input name="btn_save_draft" type="submit" <tag:save_draft_ak /> class="button" value="<gettext>Save Draft</gettext>" />
</if:save_draft_ak>
   <input name="btn_cancel_compose" type="submit" title="<gettext>Cancel Message</gettext>" class="button" value="<gettext>Cancel Message</gettext>" />
  </td>
 </tr>

<if:use_encrypt>
 <tr>
  <td></td>
  <td class="item nowrap">
   <tag:encrypt_label />:
   <select id="encrypt_options" name="encrypt_options">
    <tag:encrypt_options />
   </select>
  </td>
 </tr>
</if:use_encrypt>

<if:pgp_options>
 <tr>
  <td></td>
  <td class="item nowrap">
   <input id="pap" type="checkbox" class="checkbox" name="pgp_attach_pubkey" <if:pgp_attach_pubkey>checked="checked" </if:pgp_attach_pubkey>/>
   <tag:pap />
  </td>
 </tr>
</if:pgp_options>

<if:vcard>
 <tr>
  <td></td>
  <td class="item nowrap">
   <input id="vcard" type="checkbox" class="checkbox" name="vcard" <if:attach_vcard>checked="checked" </if:attach_vcard>/>
   <tag:vcard />
  </td>
 </tr>
</if:vcard>
</table>

<if:file_upload>
<br />

<h1 class="header">
 <strong><a id="attachments"></a><gettext>Attachments</gettext></strong>
<if:selectlistlink>
 <tag:selectlistlink />
 <input type="hidden" name="selectlist_selectid" value="" />
</if:selectlistlink>
</h1>

<table width="100%" cellspacing="0">
 <tr class="item" id="upload_atc">
<if:maxattachsize>
  <td><gettext>Maximum total attachment size reached.</gettext></td>
<else:maxattachsize>
<if:maxattachmentnumber>
  <td><gettext>Maximum number of attachments reached.</gettext></td>
<else:maxattachmentnumber>
  <td>
   <table>
    <tr id="attachment_row_1">
     <td>
      <strong><label for="upload_1"><gettext>File</gettext> 1:</label></strong> <input id="upload_1" name="upload_1" tabindex="<tag:file_tabindex />" type="file" size="25" />
     </td>
    </tr>
    <tr>
     <td>
      (<gettext>Maximum Attachment Size</gettext>: <tag:attach_size /> <gettext>bytes</gettext>)
     </td>
    </tr>
   </table>
  </td>
</else:maxattachmentnumber></if:maxattachmentnumber>
</else:maxattachsize></if:maxattachsize>
  <td class="rightAlign">
   <input type="submit" name="btn_add_attachment" class="button" value="<gettext>Update</gettext>" />
  </td>
 </tr>

<if:show_link_save_attach>
<loop:attach_options>
 <tr class="item">
  <td colspan="3">
   <strong><label for="<tag:attach_options.name />"><tag:attach_options.label /></label></strong>
   <select id="<tag:attach_options.name />" name="<tag:attach_options.name />">
    <option value="1"<if:attach_options.select_yes> selected="selected"</if:attach_options.select_yes>><gettext>Yes</gettext></option>
    <option value="0"<if:attach_options.select_no> selected="selected"</if:attach_options.select_no>><gettext>No</gettext></option>
   </select>
  </td>
 </tr>
</loop:attach_options>
</if:show_link_save_attach>
</table>

<if:numberattach>
<br />

<div class="smallheader leftAlign">
 <gettext>Current Attachments</gettext> (<gettext>Total Size:</gettext> <tag:total_attach_size /> <gettext>KB</gettext><if:perc_attach> / <tag:perc_attach /></if:perc_attach>)
</div>

<table class="leftAlign attachList">
<loop:atc>
 <tr class="item">
  <td>
   <img style="padding-right:5px" src="<tag:atc.icon />" alt="[Icon]" />
   <strong><tag:atc.name /></strong>
<if:atc.fwdattach>
   (<strong><gettext>Size:</gettext></strong> <tag:atc.size /> <gettext>KB</gettext>)
<else:atc.fwdattach>
   (<tag:atc.type />) <strong><gettext>Size:</gettext></strong> <tag:atc.size /> <gettext>KB</gettext>
</else:atc.fwdattach></if:atc.fwdattach>
  </td>
 </tr>
 <tr class="item">
<if:atc.fwdattach><else:atc.fwdattach>
  <td style="padding-left:30px">
   <table>
    <tr>
     <td class="rightAlign"><strong><label for="file_description_<tag:atc.number />"><gettext>Description:</gettext></label></strong></td>
     <td><input type="text" size="40" id="file_description_<tag:atc.number />" name="file_description_<tag:atc.number />" value="<tag:atc.description />" /></td>
    </tr>
    <tr>
     <td class="rightAlign"><strong><label for="delattachment<tag:atc.number />"><gettext>Delete?</gettext></label></strong></td>
     <td><input type="checkbox" class="checkbox" id="delattachment<tag:atc.number />" name="delattachments[]" value="<tag:atc.number />" /></td>
    </tr>
   </table>
  </td>
</else:atc.fwdattach></if:atc.fwdattach>
</loop:atc>
 </tr>
</table>
</if:numberattach>
</if:file_upload>

</form>
