@@@STARTCOMPOSEFORM@@@
<table border="0" align="center" width="90%" cellpadding="1" cellspacing="1">
<tr><td colspan="2" bgcolor=@@@TITLEBAR@@@>
<font color=@@@TITLEBAR_TEXT@@@ face=@@@FONTFACE@@@ size="3">
<B>REDACTA UN MISSATGE</B></font>
</td></tr><tr><td colspan="2" bgcolor=@@@MENUBAR@@@>
<table width="100%" cellspacing="0" cellpadding="0"><tr>
<td>@@@BACKTOFOLDER@@@</td>
<td align="right">
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td>Mapa de caràcters: </td>
<td>@@@CONVTOMENU@@@&nbsp;</td>
</tr></table>
</td>
</tr></table>
</td></tr><tr><td colspan="2">&nbsp;</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>De:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
<table border="0" cellpadding="0" cellspacing="1"><tr>
<td>@@@FROMMENU@@@&nbsp;&nbsp;</td>
<td><B>Prioritat:</B></td>
<td>@@@PRIORITYMENU@@@</td>
</tr></table>
</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>Per a:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
@@@TOFIELD@@@
</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>CC:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
@@@CCFIELD@@@
</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>BCC:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
@@@BCCFIELD@@@
</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>Respón a:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td>@@@REPLYTOFIELD@@@&nbsp;&nbsp;</td>
<td><B>Acús de rebut</B></td>
<td>@@@CONFIRMREADINGCHECKBOX@@@</td>
</tr></table>
</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>Fitxers adjunts:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
@@@ATTACHMENTFIELD@@@
</td></tr>
<tr><td align="right" bgcolor=@@@WINDOW_DARK@@@ nowrap>
<B>Assumpte:</B>
</td><td bgcolor=@@@WINDOW_DARK@@@>
<table border="0" cellpadding="0" cellspacing="0"><tr>
<td>@@@SUBJECTFIELD@@@&nbsp;&nbsp;</td>
@@@BACKUPSENTSTART@@@
<td><B>Desa el missatge enviat</B></td>
<td>@@@BACKUPSENTMSGCHECKBOX@@@</td>
@@@BACKUPSENTEND@@@
</tr></table>
</td></tr>

<tr><td colspan="2" bgcolor=@@@WINDOW_LIGHT@@@ class=msgbody>
@@@BUTTONSBEFORE@@@
@@@BODYAREA@@@
@@@BUTTONSAFTER@@@
</td></tr>

@@@ENDFORM@@@<!-- End of message composition form -->
@@@STARTSPELLCHECKFORM@@@
@@@ENDFORM@@@
@@@STARTCANCELFORM@@@
@@@ENDFORM@@@
</table>

<script language="JavaScript">
<!--
   if (self.document.composeform.to.value == "") {
      self.document.composeform.to.focus();
   } else {
      self.document.composeform.body.focus();
   }

   function OnLoadHandler()
   {
      document.composeform.to.focus();
   }

   function GoAddressWindow()
   {
      var url = "@@@ABOOKURL@@@?action=addrlistview&sessionid=@@@SESSIONID@@@&abookkeyword=@@@ABOOKKEYWORD@@@&abooksearchtype=@@@ABOOKSEARCHTYPE@@@&listviewmode=composeselect";

      url += "&to=" + escape (document.composeform.to.value);
      url += "&cc=" + escape (document.composeform.cc.value);
      url += "&bcc=" + escape (document.composeform.bcc.value);

      var hWnd = window.open(url,"_addressbook","width=@@@ABOOKWIDTH@@@,height=@@@ABOOKHEIGHT@@@,resizable=yes,scrollbars=yes");
      if ((document.window != null) && (!hWnd.opener))
         hWnd.opener = document.window;
   }

   function DeleteAttFile(deleteattfile)
   {
      document.composeform.deleteattfile.value=deleteattfile;
      bodygethtml();
      document.composeform.submit();
   }

   function msgfmthelp()
   {
      alert("Ho sento, per redactar en format HTML cal disposar d\'Internet Explorer 5.5+(Windows) o Mozilla 1.3+(tots els SO).");
   }

   function msgfmtchangeconfirm()
   {
      if ((document.composeform.msgformat.value == "html" ||
           document.composeform.msgformat.value == "both") &&
          document.composeform.newmsgformat.value == "text" ) {
         if (confirm("Després de la conversió, les dades en format HTML es perderan. Esteu segurs de canviar cap el mode text?")) {
            bodygethtml();
            document.composeform.submit();
            return true;
         } else {
            document.composeform.newmsgformat.value = document.composeform.msgformat.value;
            return false;
         }
      }
      if (document.composeform.msgformat.value == "text" &&
          (document.composeform.newmsgformat.value == "html" ||
           document.composeform.newmsgformat.value == "both") ) {
         document.composeform.submit();
         return true;
      }
      // else always follow new format but no need to submit to CGI
      document.composeform.msgformat.value = document.composeform.newmsgformat.value;
      return true;
   }

   function bodygethtml()
   {
      if (document.composeform.msgformat.value == "html" ||
          document.composeform.msgformat.value == "both") {
         document.composeform.body.value = editor.getHTML();
      }
   }

   function bodysethtml()
   {
      if (document.composeform.msgformat.value == "html" ||
          document.composeform.msgformat.value == "both") {
         editor.setHTML(document.composeform.body.value);
      }
   }

   function owmspellcheck()
   {
      bodygethtml();
      document.spellcheckform.sessionid.value = document.composeform.sessionid.value;
      document.spellcheckform.form.value = "composeform";
      document.spellcheckform.field.value = "body";
      document.spellcheckform.string.value = document.composeform.body.value;
      window.open('','_spellcheck','width=600,height=400,top=40,left=80,scrollbars=yes,resizable=yes,location=no');
      return true;
   }

   function sendcheck()
   {
      if (document.composeform.to.value == ""
       && document.composeform.cc.value == ""
       && document.composeform.bcc.value == "" ) {
         alert("Especifiqueu el destinatari del missatge.");
         return false;
      }
      if (document.composeform.subject.value == "" 
       || document.composeform.subject.value == "N/A" ) {
         return(confirm("Missatge sense assumpte, voleu continuar?"));
      }
      return true;
   }
//-->
</script>
