<tmpl_var header_template escape="none">

<table cellpadding="0" cellspacing="0" border="0" align="center" width="95%">
<tr>
  <td class="titlebar">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
      <td class="titlebar" width="30%" nowrap>
        <!-- do not keep the keyword and firstpage between folders -->
        <!-- they are cleared when the user changes folders -->
        <form action="<tmpl_var url_cgi escape="none">/openwebmail-main.pl" method="post" name="FolderForm">
        <input type="hidden" name="action" value="listmessages">
        <input type="hidden" name="sessionid" value="<tmpl_var sessionid escape="html">">
        <input type="hidden" name="sort" value="<tmpl_var sort escape="html">">
        <select name="folder" accesskey="L" onchange="document.FolderForm.submit();">
          <tmpl_loop folderselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if newmessagesthisfolder>class="hilighttext"</tmpl_if> <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"> (<tmpl_var newmessagesthisfolder escape="html">/<tmpl_var allmessagesthisfolder escape="html">)</option>
          </tmpl_loop>
        </select>
        <tmpl_if textbrowser>
        <input type="submit" name="read" value="Read">
        </tmpl_if>
        </form>
      </td>
      <td class="titlebar" align="center" nowrap><tmpl_if enable_quota><tmpl_if quotashowusage>Quota Usage: <tmpl_var quotabytesusage escape="html"> </tmpl_if><tmpl_if quotaoverthreshold>(<tmpl_var quotapercentusage escape="html">%) </tmpl_if><tmpl_else>&nbsp;</tmpl_if></td>
      <td class="titlebar" align="right" width="30%" nowrap><tmpl_if totalmessages><tmpl_if newmessages><tmpl_var newmessages escape="html"> unread / </tmpl_if><tmpl_var totalmessages escape="html"> messages / <tmpl_var totalsize escape="html"><tmpl_else>No messages</tmpl_if>&nbsp;</td>
    </tr>
    </table>
  </td>
</tr>
<tr>
  <td class="menubar">
    <table cellpadding="0" cellspacing="0" border="0" width="100%">
    <tr>
      <td nowrap class="menubar">
        <tmpl_unless overlimit><a href="<tmpl_var url_cgi escape="none">/openwebmail-send.pl?action=composemessage&amp;compose_caller=main&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="C" class="icon"><tmpl_if use_texticon>compose new message<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/compose.gif" title="compose new message" alt="compose new message" border="0" align="absmiddle"></tmpl_if></a>&nbsp;
        </tmpl_unless>

        <tmpl_if enable_webmail><a href="<tmpl_var url_cgi escape="none">/openwebmail-folder.pl?action=editfolders&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="F" class="icon"><tmpl_if use_texticon>manage folders<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/folder.gif" title="manage folders" alt="manage folders" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <tmpl_if enable_userfilter><a href="<tmpl_var url_cgi escape="none">/openwebmail-prefs.pl?action=editfilter&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="I" class="icon"><tmpl_if use_texticon>mail filter setup<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/filtersetup.gif" title="mail filter setup" alt="mail filter setup" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <tmpl_if enable_preference><tmpl_if enable_saprefs><a href="<tmpl_var url_cgi escape="none">/openwebmail-saprefs.pl?action=edittest&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="J" class="icon"><tmpl_if use_texticon>spamassassin user preferences<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/saprefs.gif" title="spamassassin user preferences" alt="spamassassin user preferences" border="0" align="absmiddle"></tmpl_if></a></tmpl_if></tmpl_if>&nbsp;

        <tmpl_if enable_pop3><tmpl_if is_folder_inbox><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=pop3fetches&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="G" class="icon"><tmpl_if use_texticon>retrieve pop3 mail<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/pop3.gif" title="retrieve pop3 mail" alt="retrieve pop3 mail" border="0" align="absmiddle"></tmpl_if></a></tmpl_if></tmpl_if>

        <tmpl_if enable_advsearch><a href="<tmpl_var url_cgi escape="none">/openwebmail-advsearch.pl?action=advsearch&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="V" class="icon"><tmpl_if use_texticon>advanced search<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/advsearch.gif" title="advanced search" alt="advanced search" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <tmpl_if enable_webmail><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=userrefresh&amp;userfresh=1&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="R" class="icon"><tmpl_if use_texticon>refresh<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/refresh.gif" title="refresh" alt="refresh" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>&nbsp;

        <tmpl_if enable_addressbook><a href="<tmpl_var url_cgi escape="none">/openwebmail-abook.pl?action=addrlistview&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="A" class="icon"><tmpl_if use_texticon>addressbook<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/addrbook.gif" title="addressbook" alt="addressbook" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <tmpl_if enable_calendar><a href="<tmpl_var url_cgi escape="none">/openwebmail-cal.pl?action=<tmpl_var calendar_defaultview escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="K" class="icon"><tmpl_if use_texticon>calendar<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/calendar.gif" title="calendar" alt="calendar" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <tmpl_if enable_webdisk><a href="<tmpl_var url_cgi escape="none">/openwebmail-webdisk.pl?action=showdir&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="E" class="icon"><tmpl_if use_texticon>webdisk<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/webdisk.gif" title="webdisk" alt="webdisk" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <tmpl_if enable_sshterm><tmpl_if use_ssh2><a href="#" onclick="window.open('<tmpl_var url_html escape="none">/applet/mindterm2/ssh2.html', '_applet', 'width=400,height=100,top=2000,left=2000,resizable=no,menubar=no,scrollbars=no');" accesskey="T" class="icon"><tmpl_if use_texticon>ssh terminal<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/sshterm.gif" title="ssh terminal" alt="ssh terminal" border="0" align="absmiddle"></tmpl_if></a><tmpl_else><tmpl_if use_ssh1><a href="#" onclick="window.open('<tmpl_var url_html escape="none">/applet/mindterm/ssh.html', '_applet', 'width=400,height=100,top=2000,left=2000,resizable=no,menubar=no,scrollbars=no');" accesskey="T" class="icon"><tmpl_if use_texticon>ssh terminal<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/sshterm.gif" title="ssh terminal" alt="ssh terminal" border="0" align="absmiddle"></tmpl_if></a></tmpl_if></tmpl_if></tmpl_if>

        <tmpl_if enable_preference><a href="<tmpl_var url_cgi escape="none">/openwebmail-prefs.pl?action=editprefs&amp;prefs_caller=main&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="O" class="icon"><tmpl_if use_texticon>user preferences<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/prefs.gif" title="user preferences" alt="user preferences" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

        <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=logout&amp;sessionid=<tmpl_var sessionid escape="url">" accesskey="X" class="icon"><tmpl_if use_texticon>logout<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/logout.gif" title="logout" alt="logout" border="0" align="absmiddle"></tmpl_if></a>&nbsp;
      </td>
      <td nowrap class="menubar" align="right">
        <tmpl_if enable_learnham><a href="javascript:document.pageform.destination.value='LEARNHAM'; document.pageform.movebutton.click();" accesskey="N" class="icon"><tmpl_if use_texticon>learn ham<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/learnham.gif" title="learn ham" alt="learn ham" border="0" align="absmiddle"></tmpl_if></a><tmpl_else>
        <tmpl_if enable_learnspam><a href="javascript:document.pageform.destination.value='LEARNSPAM'; document.pageform.movebutton.click();" accesskey="N" class="icon"><tmpl_if use_texticon>learn spam<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/learnspam.gif" title="learn spam" alt="learn spam" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>
        </tmpl_if>

        <tmpl_if show_emptyfolder><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=emptyfolder&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" onclick="return confirm('Empty folder (<tmpl_var foldername escape="js">, <tmpl_var folder_allmessages escape="js"> messages)?');" accesskey="M" class="icon"><tmpl_if use_texticon>empty folder<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/emptyfolder.gif" title="empty folder" alt="empty folder" border="0" align="absmiddle"></tmpl_if></a><tmpl_else>
        <a href="javascript:document.pageform.destination.value='<tmpl_var trashfolder escape="js">'; document.pageform.movebutton.click();" accesskey="Z" class="icon"><tmpl_if use_texticon>move selected messages to trash<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/totrash.gif" title="move selected messages to trash" alt="move selected messages to trash" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>&nbsp;
      </td>
    </tr>
    </table>
  </td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" border="0" align="center" width="95%">
<tr>
  <td>
    <table cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td><tmpl_if prevpage><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;page=<tmpl_var prevpage escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="U" class="icon"><tmpl_if use_texticon>&lt;<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>right.gif<tmpl_else>left.gif</tmpl_if>" title="previous page" alt="&lt;" border="0" align="absmiddle"></tmpl_if></a><tmpl_else><tmpl_if use_texticon>-<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>right-grey.gif<tmpl_else>left-grey.gif</tmpl_if>" title="no previous page" alt="&lt;" border="0" align="absmiddle"></tmpl_if></tmpl_if></td>
      <td><tmpl_var page escape="html">/<tmpl_var totalpage escape="html"></td>
      <td><tmpl_if nextpage><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;page=<tmpl_var nextpage escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="D" class="icon"><tmpl_if use_texticon>&gt;<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>left.gif<tmpl_else>right.gif</tmpl_if>" title="next page" alt="&gt;" border="0" align="absmiddle"></tmpl_if></a><tmpl_else><tmpl_if use_texticon>-<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>left-grey.gif<tmpl_else>right-grey.gif</tmpl_if>" title="no next page" alt="&gt;" border="0" align="absmiddle"></tmpl_if></tmpl_if></td>
    </tr>
    </table>
  </td>
  <td align="right" nowrap>
    <tmpl_loop eventreminderloop>
    &nbsp;&nbsp;<tmpl_if itemdaysfromnow><span class="smallblacktext">[+<tmpl_var itemdaysfromnow escape="html">]</span></tmpl_if><a href="<tmpl_var url_cgi escape="none">/openwebmail-cal.pl?action=calday&amp;year=<tmpl_var itemyear escape="url">&amp;month=<tmpl_var itemmonth escape="url">&amp;day=<tmpl_var itemday escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="<tmpl_var itemtitletext escape="html"> <tmpl_var itemweekday escape="html">">&nbsp;<span class="smallcolortext"><tmpl_var itemstartendtime escape="html"></span>&nbsp;<span class="smallblacktext"><tmpl_var itemstring escape="html"></span></a>
    </tmpl_loop>&nbsp;
  </td>
</tr>
</table>

<form action="<tmpl_var url_cgi escape="none">/openwebmail-main.pl" method="post" name="pageform">
<input type="hidden" name="action" value="listmessages">
<input type="hidden" name="sessionid" value="<tmpl_var sessionid escape="html">">
<input type="hidden" name="folder" value="<tmpl_var folder escape="html">">
<input type="hidden" name="sort" value="<tmpl_var sort escape="html">">
<input type="hidden" name="msgdatetype" value="<tmpl_var msgdatetype escape="html">">
<input type="hidden" name="longpage" value="<tmpl_var longpage escape="html">">

<tmpl_if controlbartop>
<table cellpadding="1" cellspacing="0" border="0" align="center" width="95%">
<tr>
  <td width="35%" class="menubar" nowrap>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <td>
        <select name="searchtype" accesskey="W">
        <tmpl_loop searchselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
        </tmpl_loop>
        </select>
      </td>
      <td>
        <input type="text" size="12" name="keyword" value="<tmpl_var keyword escape="html">" accesskey="S">
      </td>
      <td>
        <input type="submit" name="searchbutton" value="Search"><input type="submit" name="clearsearchbutton" value="Clear">&nbsp;
      </td>
    </tr>
    </table>
  </td>
  <td align="center" class="menubar" nowrap>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <td>Page&nbsp;</td>
      <td>
        <select name="page" accesskey="P" onchange="document.pageform.submit();">
        <tmpl_loop pageselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
        </tmpl_loop>
        </select>
      </td>
      <td>
        &nbsp;<tmpl_if longpage><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&longpage=0&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="<tmpl_var msgsperpage escape="html"> messages per page">-</a><tmpl_else><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&longpage=1&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="1000 messages per page">+</a></tmpl_if>&nbsp;
      </td>
    </tr>
    </table>
  </td>
  <td width="35%" align="right" class="menubar" nowrap>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <td>
        <select name="destination" accesskey="B">
        <tmpl_loop destinationselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
        </tmpl_loop>
        </select>
      </td>
      <td>
        <input type="submit" name="movebutton" value="Move" onclick="return OpConfirm('Are you sure you want to move the selected message(s)?',<tmpl_var confirmmsgmovecopy escape="js">)">
      </td>
      <td>
        <input type="submit" name="copybutton" value="Copy" onclick="return OpConfirm('Are you sure you want to copy the selected message(s)?',<tmpl_var confirmmsgmovecopy escape="js">)">
      </td>
    </tr>
    </table>
  </td>
</tr>
</table>
</tmpl_if>

<tmpl_if middlepluginoutput>
<tmpl_var middlepluginoutput escape="none">
<tmpl_else>
<br>
</tmpl_if>

<table cellpadding="1" cellspacing="1" border="0" align="center" width="95%">
<tr>
  <td class="columnheader" width="6%" align="center">
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=status&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="H" class="icon"><tmpl_if use_texticon>status unread first<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/unread.gif" title="sort by status (unread first)" alt="status" border="0" align="absmiddle"></tmpl_if></a>
  </td>

  <tmpl_loop headingloop>
  <tmpl_if date>
  <td class="columnheader" width="21%">
    <tmpl_if active>
    <tmpl_if headingdatebysent>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=recvdate&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by received date">Sent Date</a>&nbsp;
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>date<tmpl_else>date_rev</tmpl_if>&amp;msgdatetype=sentdate&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="Y" class="icon"><tmpl_if headingreversesort><tmpl_if use_texticon>v<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/down.gif" title="sort by oldest first" alt="v" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/up.gif" title="sort by newest first" alt="^" border="0" align="absmiddle"></tmpl_if></tmpl_if></a>
    <tmpl_else>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=sentdate&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by sent date">Received Date</a>&nbsp;
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>date<tmpl_else>date_rev</tmpl_if>&amp;msgdatetype=recvdate&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="Q" class="icon"><tmpl_if headingreversesort><tmpl_if use_texticon>v<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/down.gif" title="sort by oldest first" alt="v" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/up.gif" title="sort by newest first" alt="^" border="0" align="absmiddle"></tmpl_if></tmpl_if></a>
    </tmpl_if>
    <tmpl_else>
    <tmpl_if headingdatebysent>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=date_rev&amp;msgdatetype=sentdate&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by sent date">Sent Date</a>
    <tmpl_else>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=date_rev&amp;msgdatetype=recvdate&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by received date">Received Date</a>
    </tmpl_if>
    </tmpl_if>
  </td>
  </tmpl_if>

  <tmpl_if from>
  <td class="columnheader" width="24%">
    <tmpl_if active>
    <tmpl_if headingfrombysender>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>recipient_rev<tmpl_else>recipient</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by recipient">Sender</a>&nbsp;
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>sender<tmpl_else>sender_rev</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="0" class="icon"><tmpl_if headingreversesort><tmpl_if use_texticon>v<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/down.gif" title="sort alphanumerically" alt="v" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/up.gif" title="sort reverse alphanumerically" alt="^" border="0" align="absmiddle"></tmpl_if></tmpl_if></a>
    <tmpl_else>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>sender_rev<tmpl_else>sender</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by sender">Recipient</a>&nbsp;
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>recipient<tmpl_else>recipient_rev</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" class="icon"><tmpl_if headingreversesort><tmpl_if use_texticon>v<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/down.gif" title="sort alphanumerically" alt="v" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/up.gif" title="sort reverse alphanumerically" alt="^" border="0" align="absmiddle"></tmpl_if></tmpl_if></a>
    </tmpl_if>
    <tmpl_else>
    <tmpl_if headingfrombysender>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=sender&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by sender">Sender</a>
    <tmpl_else>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=recipient&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=1&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by recipient">Recipient</a>
    </tmpl_if>
    </tmpl_if>
  </td>
  </tmpl_if>

  <tmpl_if subject>
  <td class="columnheader">
    <tmpl_if active>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>subject<tmpl_else>subject_rev</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" <tmpl_if headingreversesort>title="sort by oldest threads first"<tmpl_else>title="sort by newest threads first"</tmpl_if>>Subject</a>&nbsp;
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>subject<tmpl_else>subject_rev</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" class="icon"><tmpl_if headingreversesort><tmpl_if use_texticon>v<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/down.gif" title="sort by oldest threads first" alt="v" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/up.gif" title="sort by newest threads first" alt="^" border="0" align="absmiddle"></tmpl_if></tmpl_if></a>
    <tmpl_else>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=subject_rev&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by subject">Subject</a>
    </tmpl_if>
  </td>
  </tmpl_if>

  <tmpl_if size>
  <td class="columnheader" width="5%" align="right" nowrap>
    <tmpl_if active>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>size<tmpl_else>size_rev</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" <tmpl_if headingreversesort>title="sort by size smallest first"<tmpl_else>title="sort by size largest first"</tmpl_if>>Size</a>&nbsp;
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=<tmpl_if headingreversesort>size<tmpl_else>size_rev</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" class="icon"><tmpl_if headingreversesort><tmpl_if use_texticon>v<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/down.gif" title="sort by size smallest first" alt="v" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/up.gif" title="sort by size largest first" alt="^" border="0" align="absmiddle"></tmpl_if></tmpl_if></a>
    <tmpl_else>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sort=size_rev&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="sort by size">Size</a>
    </tmpl_if>
  </td>
  </tmpl_if>
  </tmpl_loop>

  <td class="columnheader" width="3%" align="center">
    <input type="checkbox" name="allbox" value="1" onclick="CheckAll(<tmpl_var uselightbar escape="js">);">
  </td>
</tr>

<tmpl_loop messagesloop>
<tr id="tr_<tmpl_var messagenumber escape="html">" <tmpl_if uselightbar>class="rowlight" onclick="if (!document.layers) { var cb = document.getElementById('<tmpl_var messagenumber escape="js">'); cb.checked=!cb.checked }" onmouseover="this.className='rowhilite';" onmouseout="this.className=document.getElementById('<tmpl_var messagenumber escape="js">').checked?'rowdark':'rowlight';"</tmpl_if>>
  <td <tmpl_unless uselightbar>class="<tmpl_if odd>rowlight<tmpl_else>rowdark</tmpl_if>"</tmpl_unless> nowrap>
    <b><tmpl_var messagenumber escape="html"></b>
    <tmpl_if status_read>
    <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=markasunread&amp;message_id=<tmpl_var messageid escape="url">&amp;status=<tmpl_var messagestatus escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" class="icon"><tmpl_if use_texticon>mark as unread<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if status_answered>read.a.gif<tmpl_else>read.gif</tmpl_if>" title="mark as unread" alt="mark as unread" border="0" align="absmiddle"></tmpl_if></a><tmpl_else><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=markasread&amp;message_id=<tmpl_var messageid escape="url">&amp;status=<tmpl_var messagestatus escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" class="icon"><tmpl_if use_texticon>mark as read<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if status_answered>unread.a.gif<tmpl_else>unread.gif</tmpl_if>" title="mark as unread" alt="mark as read" border="0" align="absmiddle"></tmpl_if></a>&nbsp;
    </tmpl_if>

    <tmpl_if status_attachments><a class="icon"><tmpl_if use_texticon>attachments<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/attach.gif" title="this message has attachments" alt="attachments" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>

    <tmpl_if status_important><a class="icon"><tmpl_if use_texticon>important<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/important.gif" title="important" alt="important" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>&nbsp;
  </td>

  <tmpl_loop headingloop>

  <tmpl_if date>
  <td <tmpl_unless uselightbar>class="<tmpl_if odd>rowlight<tmpl_else>rowdark</tmpl_if>"</tmpl_unless> nowrap>
    <a title="<tmpl_if showdatereceived>sent <tmpl_var messagedatesent escape="html"><tmpl_else>received <tmpl_var messagedatereceived escape="html"></tmpl_if> (<tmpl_var timeintransitsign escape="html"><tmpl_var timeintransithour escape="html">h <tmpl_var timeintransitmin escape="html">m <tmpl_var timeintransitsec escape="html">s difference)"><tmpl_if status_read><tmpl_if showdatereceived><tmpl_var messagedatereceived escape="html"><tmpl_else><tmpl_var messagedatesent escape="html"></tmpl_if><tmpl_else><b><tmpl_if showdatereceived><tmpl_var messagedatereceived escape="html"><tmpl_else><tmpl_var messagedatesent escape="html"></tmpl_if></b></tmpl_if>&nbsp;&nbsp;</a>
  </td>
  <tmpl_if active></tmpl_if>
  </tmpl_if>

  <tmpl_if from>
  <td <tmpl_unless uselightbar>class="<tmpl_if odd>rowlight<tmpl_else>rowdark</tmpl_if>"</tmpl_unless>>
    <table cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td nowrap>
        <tmpl_if useminisearchicon>
        <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;searchtype=<tmpl_if headingfrombysender>from<tmpl_else>to</tmpl_if>&amp;keyword=<tmpl_if headingfrombysender><tmpl_var from_address escape="url"><tmpl_else><tmpl_var to_keywords escape="url"></tmpl_if>" class="icon"><tmpl_if use_texticon>search<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/search.s.gif" title="<tmpl_if headingfrombysender>search for messages from <tmpl_var from_address escape="html"><tmpl_else>search for messages to same recipients</tmpl_if>" alt="search" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>
        <tmpl_if contactinaddressbook><a href="<tmpl_var url_cgi escape="none">/openwebmail-abook.pl?action=addrlistview&amp;abookkeyword=<tmpl_if headingfrombysender><tmpl_var from_address escape="url"><tmpl_else><tmpl_var to_keywords escape="url"></tmpl_if>&amp;abooksearchtype=email&amp;abookfolder=ALL&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" class="icon"><tmpl_if use_texticon>addressbook search<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/friend.gif" title="<tmpl_if headingfrombysender>search addressbook for <tmpl_var from_address escape="html"><tmpl_else>search addressbook for recipients</tmpl_if>" alt="search addressbook" border="0" align="absmiddle"></tmpl_if></a></tmpl_if>&nbsp;
      </td>
      <td>
        <a <tmpl_unless overlimit>href="<tmpl_var url_cgi escape="none">/openwebmail-send.pl?action=composemessage&amp;composetype=sendto&amp;to=<tmpl_if headingfrombysender><tmpl_var from_nameandaddress escape="url"><tmpl_else><tmpl_var to_namesandaddresses escape="url"></tmpl_if>&amp;compose_caller=main&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">"</tmpl_unless> title="<tmpl_var from_address escape="html"> -&gt; <tmpl_var to_addresses escape="html">"><tmpl_if status_read><tmpl_if headingfrombysender><tmpl_var from_name escape="html"><tmpl_else><tmpl_if to_names><tmpl_var to_names escape="html"><tmpl_else>undisclosed-recipients</tmpl_if></tmpl_if><tmpl_else><b><tmpl_if headingfrombysender><tmpl_var from_name escape="html"><tmpl_else><tmpl_if to_names><tmpl_var to_names escape="html"><tmpl_else>undisclosed-recipients</tmpl_if></tmpl_if></b></tmpl_if>&nbsp;&nbsp;</a>
      </td>
    </tr>
    </table>
  </td>
  <tmpl_if active></tmpl_if>
  </tmpl_if>

  <tmpl_if subject>
  <td <tmpl_unless uselightbar>class="<tmpl_if odd>rowlight<tmpl_else>rowdark</tmpl_if>"</tmpl_unless>>
    <table cellpadding="0" cellspacing="0" border="0">
    <tr>
      <tmpl_if useminisearchicon>
      <td>
        <a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;searchtype=subject&amp;keyword=<tmpl_var subject_keyword escape="url">" class="icon"><tmpl_if use_texticon>search<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/search.s.gif" title="search for messages with this subject" alt="search" border="0" align="absmiddle"></tmpl_if></a>
      </td>
      <td>&nbsp;</td>
      </tmpl_if>
      <td>
        <tmpl_if active>
        <tmpl_if subjectindent><tmpl_var subjectindent escape="none"><tmpl_if headingreversesort><tmpl_if use_texticon>follow up<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/follow.up.gif" title="follow up" alt="follow up" border="0" align="absmiddle"></tmpl_if><tmpl_else><tmpl_if use_texticon>follow down<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/follow.down.gif" title="follow down" alt="follow down" border="0" align="absmiddle"></tmpl_if></tmpl_if></tmpl_if>
        </tmpl_if>
        <a href="<tmpl_var url_cgi escape="none">/openwebmail-read.pl?action=readmessage&amp;message_id=<tmpl_var messageid escape="url">&amp;headers=<tmpl_var headers escape="url">&amp;attmode=simple&amp;db_chkstatus=<tmpl_if status_read>0<tmpl_else>1</tmpl_if>&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="character set: <tmpl_var messagecharset escape="html">"><tmpl_if status_read><tmpl_if subjecttext><tmpl_var subjecttext escape="html"><tmpl_else>N/A</tmpl_if><tmpl_else><b><tmpl_if subjecttext><tmpl_var subjecttext escape="html"><tmpl_else>N/A</tmpl_if></b></tmpl_if></a>
      </td>
      <td>&nbsp;&nbsp;</td>
    </tr>
    </table>
  </td>
  </tmpl_if>

  <tmpl_if size>
  <td <tmpl_unless uselightbar>class="<tmpl_if odd>rowlight<tmpl_else>rowdark</tmpl_if>"</tmpl_unless> align="right"><tmpl_if status_read><tmpl_var messagesize escape="html"><tmpl_else><b><tmpl_var messagesize escape="html"></b></tmpl_if></td>
  <tmpl_if active></tmpl_if>
  </tmpl_if>
  </tmpl_loop>

  <td <tmpl_unless uselightbar>class="<tmpl_if odd>rowlight<tmpl_else>rowdark</tmpl_if>"</tmpl_unless> align="center"><input type="checkbox" id="<tmpl_var messagenumber escape="html">" name="message_ids" value="<tmpl_var messageid escape="html">" <tmpl_if accesskey>accesskey="<tmpl_var accesskey escape="html">"</tmpl_if> <tmpl_if uselightbar>onclick="if (!document.layers) { this.checked =! this.checked }"</tmpl_if> <tmpl_if singlemessage>checked</tmpl_if>></td>
</tr>

<tmpl_if comment> Use all params used in the inner-looping to workaround global_vars H:T inheritance bug. We need to patch H:T before we can get rid of this uglyness. </tmpl_if>
<tmpl_if odd></tmpl_if>
<tmpl_if messagecharset></tmpl_if>
<tmpl_if uselightbar></tmpl_if>
<tmpl_if messagedatesent></tmpl_if>
<tmpl_if messagedatereceived></tmpl_if>
<tmpl_if showdatereceived></tmpl_if>
<tmpl_if timeintransithour></tmpl_if>
<tmpl_if timeintransitmin></tmpl_if>
<tmpl_if timeintransitsec></tmpl_if>
<tmpl_if timeintransitsign></tmpl_if>
<tmpl_if to_namesandaddresses></tmpl_if>
<tmpl_if to_names></tmpl_if>
<tmpl_if to_nameshtml></tmpl_if>
<tmpl_if to_addresses></tmpl_if>
<tmpl_if to_addresseshtml></tmpl_if>
<tmpl_if to_keywords></tmpl_if>
<tmpl_if from_nameandaddress></tmpl_if>
<tmpl_if from_name></tmpl_if>
<tmpl_if from_namehtml></tmpl_if>
<tmpl_if from_address></tmpl_if>
<tmpl_if from_addresshtml></tmpl_if>
<tmpl_if useminisearchicon></tmpl_if>
<tmpl_if contactinaddressbook></tmpl_if>
<tmpl_if subjecttext></tmpl_if>
<tmpl_if subjectindent></tmpl_if>
<tmpl_if subjecthtml></tmpl_if>
<tmpl_if subject_keyword></tmpl_if>
<tmpl_if messagesize></tmpl_if>
<tmpl_if accesskey></tmpl_if>
</tmpl_loop>

</table>

<table cellpadding="0" cellspacing="0" border="0" align="center" width="95%">
  <td width="35%">
    <table cellpadding="0" cellspacing="0" border="0">
    <tr>
      <td><tmpl_if prevpage><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;page=<tmpl_var prevpage escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="U" class="icon"><tmpl_if use_texticon>&lt;<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>right.gif<tmpl_else>left.gif</tmpl_if>" title="previous page" alt="&lt;" border="0" align="absmiddle"></tmpl_if></a><tmpl_else><tmpl_if use_texticon>-<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>right-grey.gif<tmpl_else>left-grey.gif</tmpl_if>" title="no previous page" alt="&lt;" border="0" align="absmiddle"></tmpl_if></tmpl_if></td>
      <td><tmpl_var page escape="html">/<tmpl_var totalpage escape="html"></td>
      <td><tmpl_if nextpage><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;page=<tmpl_var nextpage escape="url">&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;longpage=<tmpl_var longpage escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" accesskey="D" class="icon"><tmpl_if use_texticon>&gt;<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>left.gif<tmpl_else>right.gif</tmpl_if>" title="next page" alt="&gt;" border="0" align="absmiddle"></tmpl_if></a><tmpl_else><tmpl_if use_texticon>-<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/<tmpl_if is_right_to_left>left-grey.gif<tmpl_else>right-grey.gif</tmpl_if>" title="no next page" alt="&gt;" border="0" align="absmiddle"></tmpl_if></tmpl_if></td>
    </tr>
    </table>
  </td>
  <tmpl_if topjumpcontrol>
  <td align="center"><a href="#" class="icon"><tmpl_if use_texticon>^<tmpl_else><img src="<tmpl_var url_html escape="none">/images/iconsets/<tmpl_var iconset escape="html">/gotop.gif" title="jump to the top of the page" alt="^" border="0" align="absmiddle"></tmpl_if></a></td>
  </tmpl_if>
  <td width="35%">&nbsp;</td>
</table>

<tmpl_if controlbarbottom>
<table cellpadding="1" cellspacing="0" border="0" align="center" width="95%">
<tr>
  <td width="35%" class="menubar" nowrap>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <td>
        <select name="searchtype">
        <tmpl_loop searchselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
        </tmpl_loop>
        </select>
      </td>
      <td>
        <input type="text" size="12" name="keyword" value="<tmpl_var keyword escape="html">">
      </td>
      <td>
        <input type="submit" name="searchbutton" value="Search"><tmpl_if keyword><input type="submit" name="clearsearchbutton" value="Clear"></tmpl_if>&nbsp;
      </td>
    </tr>
    </table>
  </td>
  <td align="center" class="menubar" nowrap>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <td>Page&nbsp;</td>
      <td>
        <select name="page" onchange="document.pageform.submit();">
        <tmpl_loop pageselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
        </tmpl_loop>
        </select>
      </td>
      <td>
        &nbsp;<tmpl_if longpage><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;longpage=0&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="<tmpl_var msgsperpage escape="html"> messages per page">-</a><tmpl_else><a href="<tmpl_var url_cgi escape="none">/openwebmail-main.pl?action=listmessages&amp;longpage=1&amp;sessionid=<tmpl_var sessionid escape="url">&amp;folder=<tmpl_var folder escape="url">&amp;sort=<tmpl_var sort escape="url">&amp;msgdatetype=<tmpl_var msgdatetype escape="url">&amp;page=<tmpl_var page escape="url">&amp;searchtype=<tmpl_var searchtype escape="url">&amp;keyword=<tmpl_var keyword escape="url">" title="1000 messages per page">+</a></tmpl_if>&nbsp;
      </td>
    </tr>
    </table>
  </td>
  <td width="35%" align="right" class="menubar" nowrap>
    <table cellspacing="0" cellpadding="0" border="0">
    <tr>
      <td>
        <select name="destination">
        <tmpl_loop destinationselectloop>
          <option value="<tmpl_var option escape="html">" <tmpl_if selected>selected</tmpl_if>><tmpl_var label escape="html"></option>
        </tmpl_loop>
        </select>
      </td>
      <td>
        <input type="submit" name="movebutton" value="Move" onclick="return OpConfirm('Are you sure you want to move the selected message(s)?',<tmpl_var confirmmsgmovecopy escape="js">)">
      </td>
      <td>
        <input type="submit" name="copybutton" value="Copy" onclick="return OpConfirm('Are you sure you want to copy the selected message(s)?',<tmpl_var confirmmsgmovecopy escape="js">)">
      </td>
    </tr>
    </table>
  </td>
</tr>
</table>
</tmpl_if>

</form>

<tmpl_if newmailsound>
<embed src="<tmpl_var url_html escape="none">/sounds/<tmpl_var newmailsound escape="html">" autostart="true" hidden="true">
</tmpl_if>

<script type="text/javascript" src="<tmpl_var url_html escape="none">/javascript/popup_message.js"></script>

<script type="text/javascript">
<!--
   function CheckAll(setbgcolor) {
      for (var i=0;i<document.pageform.elements.length;i++) {
         var e = document.pageform.elements[i];
         if (e.type == 'checkbox' && e.name != 'allbox') {
            e.checked = document.pageform.allbox.checked;
            if (!document.layers && setbgcolor) {
               var tr = document.getElementById('tr_'+e.id);
               if (e.checked) {
                  tr.className = 'rowdark';
               } else {
                  tr.className = 'rowlight';
               }
            }
         }
      }
   }

   function OpConfirm(text, conf) {
      for (var i=0;i<document.pageform.elements.length;i++) {
         var e = document.pageform.elements[i];
         if (e.type == 'checkbox' && e.name != 'allbox' && e.checked == 1 ) {
            if (conf) {
               return confirm(text);
            } else {
               return 1;
            }
         }
      }
      return false;
   }

<tmpl_if popup_quotahitdelmail>
   popup_message('<tmpl_var charset escape="js">', 'QUOTA HIT', '<span class="warning">Warning: the quota limit(<tmpl_var quotalimit escape="js"> kB) was hit. Oldest messages have been automatically removed.</span>', 'close', '_quotahit_delmail', 400, 100, 60);
</tmpl_if>

<tmpl_if popup_quotahitdelfile>
   popup_message('<tmpl_var charset escape="js">', 'QUOTA HIT', '<span class="warning">Warning: the quota limit(<tmpl_var quotalimit escape="js"> kB) was hit. Some files from the webdisk have been automatically removed.</span>', 'close', '_quotahit_delfile', 400, 100, 60);
</tmpl_if>

<tmpl_if quotaoverlimit>
   popup_message('<tmpl_var charset escape="js">', 'QUOTA HIT', '<span class="warning">You have exceeded your quota. Please delete some messages from mail folders or some files from the webdisk to free disk space.</span>', 'close', '_quotahit_alert', 400, 100, 60);
</tmpl_if>

<tmpl_if spooloverlimit>
   popup_message('<tmpl_var charset escape="js">', 'QUOTA HIT', '<span class="warning">Your INBOX has exceeded the spool limit (<tmpl_var spoollimit escape="js"> kB). Please move some messages from your INBOX to other folders.</span>', 'close', '_spool_overlimit', 400, 100, 60);
</tmpl_if>

<tmpl_if popup_messagesent>
   popup_message('<tmpl_var charset escape="js">', 'Message Sent', 'Message <tmpl_var sentsubject escape="js"> has been sent successfully', 'close', '_messagesent', 400, 100, <tmpl_var mailsentwindowtime escape="js">);
</tmpl_if>

<tmpl_if incomingmessagesloop>
   popup_message('<tmpl_var charset escape="js">', 'Incoming Messages', '<tmpl_loop incomingmessagesloop><tmpl_var incomingfolder escape="js">&nbsp;<tmpl_var incomingcount escape="js"><br></tmpl_loop>', 'close', '_incoming', 400, <tmpl_var newmailwindowheight escape="js">, <tmpl_var newmailwindowtime escape="js">);
</tmpl_if>

//-->
</script>

<tmpl_var footer_template escape="none">
