<TMPL_INCLUDE NAME="common-top.thtml">
<TMPL_INCLUDE NAME="common-middle.thtml">

<TMPL_IF NAME="If_Show_Bucket_Help">

<div class="helpMessage">
    <form method="post" action="/buckets">
        <TMPL_VAR NAME="Localize_Help_Bucket_Setup">
        <input type="hidden" name="session" value="<TMPL_VAR NAME="Session_Key">" />
        <p>
        <input type="submit" class="submit" name="nomore_bucket_help" value="<TMPL_VAR NAME="Localize_Help_No_More">" />
        </p>
    </form>
</div>

</TMPL_IF>

<TMPL_IF NAME="If_Show_Training_Help">

<div class="helpMessage">
    <form method="post" action="/buckets">
        <TMPL_VAR NAME="Localize_Help_Training">
        <input type="hidden" name="session" value="<TMPL_VAR NAME="Session_Key">" />
        <p>
        <input type="submit" class="submit" name="nomore_training_help" value="<TMPL_VAR NAME="Localize_Help_No_More">" />
        </p>
    </form>
</div>

</TMPL_IF>

<TMPL_IF NAME="History_If_Some_Messages">

<table width="100%" summary="">
    <tr>
        <td align="left">
            <h2 class="history" style="margin-top: 0pt;"><TMPL_VAR NAME="Localize_History_Title"> (<TMPL_VAR NAME="History_Count">) </h2>
        </td>
        <td class="historyNavigatorTop" style="vertical-align: top;" align="right">

        <TMPL_IF "History_If_MultiPage">
            <!-- the following html was generated by history-navigator-widget.thtml -->
            <TMPL_INCLUDE NAME="history-navigator-widget.thtml">
            <!-- end of history-navigator-widget.thtml content -->
        </TMPL_IF>

 (<a class="history" href="/history?session=<TMPL_VAR NAME="Session_Key">"><TMPL_VAR NAME="Localize_Refresh"></a>)

        </td>
    </tr>
    <tr>
        <td colspan="<TMPL_VAR NAME="History_Colspan">">
            <!-- the following html was history-search-filter-widget.thtml -->
            <TMPL_INCLUDE NAME="history-search-filter-widget.thtml">
            <!-- end of history-search-filter-widget.thtml content -->
        </td>
    </tr>
</table>
<br />
<form class="HistoryMainForm" action="/history" method="post">
    <input type="hidden" name="search" value="<TMPL_VAR NAME="History_Field_Search">" />
    <input type="hidden" name="sort" value="<TMPL_VAR NAME="History_Field_Sort">" />
    <input type="hidden" name="negate" value="<TMPL_VAR NAME="History_Field_Not">" />
    <input type="hidden" name="session" value="<TMPL_VAR NAME="Session_Key">" />
    <input type="hidden" name="start_message" value="<TMPL_VAR NAME="History_Start_Message">" />
    <input type="hidden" name="filter" value="<TMPL_VAR NAME="History_Field_Filter">" />

    <input type="submit" class="submit removeButton" name="clearchecked" value="<TMPL_VAR NAME="Localize_History_RemoveChecked">" />
    <input type="submit" class="submit removeButton" name="clearpage" value="<TMPL_VAR NAME="Localize_History_RemovePage">" />
    <input type="submit" class="submit removeButton" name="clearall" value="<TMPL_VAR NAME="Localize_History_RemoveAll"> (<TMPL_VAR NAME="History_Count">)" />

    <table class="historyTable" width="100%" summary="<TMPL_VAR NAME="Localize_History_MainTableSummary">">
        <tr valign="bottom">

            <th></th>

            <TMPL_LOOP NAME="History_Loop_Headers">

            <th class="historyLabel" scope="col" align="left">
                <a href="/history?<TMPL_VAR NAME="History_Fields">&amp;setsort=<TMPL_VAR NAME="History_Sort"><TMPL_VAR NAME="History_Header">">

                    <TMPL_IF NAME="History_If_Sorted">

                    <em class="historyLabelSort">

                        <TMPL_IF NAME="History_If_Sorted_Ascending">

                        &gt;&nbsp;<TMPL_VAR NAME="History_Label">

                        <TMPL_ELSE>

                        &lt;&nbsp;<TMPL_VAR NAME="History_Label">

                        </TMPL_IF>

                    </em>

                    <TMPL_ELSE>

                    <TMPL_VAR NAME="History_Label">

                    </TMPL_IF>

                </a>
            </th>

            </TMPL_LOOP>

            <td class="historyLabel" scope="col" align="left">
                <input type="submit" class="submit reclassifyButton" name="change" value="<TMPL_VAR NAME="Localize_Reclassify">" />
            </td>
        </tr>

        <TMPL_LOOP NAME="History_Loop_Messages">

            <TMPL_IF NAME="History_If_Session">
            <tr class="rowBoundary"><td colspan="<TMPL_VAR NAME="History_Colspan">"></td></tr>
            </TMPL_IF>

            <TMPL_IF NAME="__odd__">
            <tr class="rowOdd">
            <TMPL_ELSE>
            <tr class="rowEven">
            </TMPL_IF>

            <td>
                <input type="checkbox" id="remove_<TMPL_VAR NAME="History_I1">" class="checkbox" name="remove_<TMPL_VAR NAME="History_I1">"/>
                <input type="hidden" id="rowid_<TMPL_VAR NAME="History_I1">" name="rowid_<TMPL_VAR NAME="History_I1">" value="<TMPL_VAR NAME="History_I1">"/>
            </td>
            <TMPL_IF NAME="History_If_inserted">
            <td>
                <span title="<TMPL_VAR NAME="History_Arrived" ESCAPE=HTML>"><TMPL_VAR NAME="History_Arrived" ESCAPE=HTML></span>
            </td>
            </TMPL_IF>
            <TMPL_IF NAME="History_If_from">
            <td>
                <span title="<TMPL_VAR NAME="History_From" ESCAPE=HTML>"><TMPL_VAR NAME="History_Short_From" ESCAPE=HTML></span>
            </td>
            </TMPL_IF>
            <TMPL_IF NAME="History_If_to">
            <td>
                <span title="<TMPL_VAR NAME="History_To" ESCAPE=HTML>"><TMPL_VAR NAME="History_Short_To" ESCAPE=HTML></span>
            </td>
            </TMPL_IF>
            <TMPL_IF NAME="History_If_cc">
            <td>
                <span title="<TMPL_VAR NAME="History_Cc" ESCAPE=HTML>"><TMPL_VAR NAME="History_Short_Cc" ESCAPE=HTML></span>
            </td>
            </TMPL_IF>
            <TMPL_IF NAME="History_If_subject">
            <td>
                <a class="messageLink" title="<TMPL_VAR NAME="History_Subject" ESCAPE=HTML>" href="/view?view=<TMPL_VAR NAME="History_Mail_File"><TMPL_VAR NAME="History_Fields">">
                    <TMPL_VAR NAME="History_Short_Subject" ESCAPE=HTML>
                </a>
            </td>
            </TMPL_IF>
            <TMPL_IF NAME="History_If_date">
            <td>
                <span title="<TMPL_VAR NAME="History_Date" ESCAPE=HTML>"><TMPL_VAR NAME="History_Date"></span>
            </td>
            </TMPL_IF>
            <TMPL_IF NAME="History_If_size">
            <td>
                <span title="<TMPL_VAR NAME="History_Size">"><TMPL_VAR NAME="History_Size"></span>
            </td>
            </TMPL_IF>

            <TMPL_IF NAME="History_If_bucket">
            <td>

                <TMPL_IF NAME="History_If_Magnetized">


                </TMPL_IF>

                <TMPL_IF NAME="History_If_Not_Pseudo">

                <a href="/buckets?session=<TMPL_VAR NAME="Session_Key">&amp;showbucket=<TMPL_VAR NAME="History_Bucket">">

                </TMPL_IF>

                <span style="color:<TMPL_VAR NAME="History_Bucket_Color">">
                    <TMPL_VAR NAME="History_Bucket">
                </span>

                <TMPL_IF NAME="History_If_Not_Pseudo">

                </a>

                </TMPL_IF>

            </td>
            </TMPL_IF>
            <td>

                <TMPL_IF NAME="History_If_Reclassified">
                <TMPL_VAR NAME="Localize_History_Reclassified">
                <input type="submit" class="submit undoButton" name="undo_<TMPL_VAR NAME="History_I">" value="<TMPL_VAR NAME="Localize_Undo">" />

                <TMPL_ELSE>

                <TMPL_IF NAME="History_If_Magnetized">
                    <img title="<TMPL_VAR NAME="History_Magnet" ESCAPE=HTML>" alt="<TMPL_VAR NAME="History_Magnet" ESCAPE=HTML>" src="/skins/default/magnet.png">
                <TMPL_ELSE>

                <select name="reclassify_<TMPL_VAR NAME="History_I">">
                    <option selected="selected"></option>

                    <TMPL_LOOP NAME="History_Loop_Loop_Buckets">

                    <option value="<TMPL_VAR NAME="History_Bucket">" style="color: <TMPL_VAR NAME="History_Bucket_Color">">
                        <TMPL_VAR NAME="History_Bucket">
                    </option>

                    </TMPL_LOOP>

                </select>

                </TMPL_IF>

                </TMPL_IF>
            </td>
        </tr>

        <TMPL_IF NAME="History_If_Feedback">

        <tr class="rowHighlighted">
            <td>
                &nbsp;
            </td>
            <td colspan="<TMPL_VAR NAME="History_Colspan">">
                <TMPL_VAR NAME="History_Feedback">
            </td>
        </tr>

        </TMPL_IF>

        </TMPL_LOOP>

        <tr>
            <td colspan="<TMPL_VAR NAME="History_Colspan">">
                <input type="submit" class="submit removeButton" name="clearchecked" value="<TMPL_VAR NAME="Localize_History_RemoveChecked">" />
                <input type="submit" class="submit removeButton" name="clearpage" value="<TMPL_VAR NAME="Localize_History_RemovePage">" />
                <input type="submit" class="submit removeButton" name="clearall" value="<TMPL_VAR NAME="Localize_History_RemoveAll"> (<TMPL_VAR NAME="History_Count">)" />
            </td>
            <td>
                <input type="submit" class="submit reclassifyButton" name="change" value="<TMPL_VAR NAME="Localize_Reclassify">" />
            </td>
        </tr>
        <tr>
            <td colspan="<TMPL_VAR NAME="History_Colspan">">
                <br />
                <span class="historyLabel">
                    <TMPL_VAR NAME="Localize_History_Column_Characters">:
                </span>
                <input type="submit" class="submit" name="increase" value="<TMPL_VAR NAME="Localize_History_Increase">" />
                <input type="submit" class="submit" name="decrease" value="<TMPL_VAR NAME="Localize_History_Decrease">" />
                <input type="submit" class="submit" name="automatic" value="<TMPL_VAR NAME="Localize_History_Automatic">" />
            </td>
            <td></td>
        </tr>
    </table>
</form>

<TMPL_IF "History_If_MultiPage">

<table width="100%" summary="">
    <tr>
        <td class="historyNavigatorBottom">
            <TMPL_INCLUDE NAME="history-navigator-widget.thtml">
        </td>
    </tr>
</table>

</TMPL_IF>

<TMPL_ELSE> <!-- if some messages -->

<table width="100%" summary="">
    <tr>
        <td align="left">
            <h2 class="history" style="margin-top: 0pt;"><TMPL_VAR NAME="Localize_History_Title"></h2>
        </td>
        <td class="historyNavigatorTop" style="vertical-align: top;" align="right">

 (<a class="history" href="/history?session=<TMPL_VAR NAME="Session_Key">"><TMPL_VAR NAME="Localize_Refresh"></a>)

       </td>
    </tr>
    <tr>
       <td>
            <!-- the following html was history-search-filter-widget.thtml -->
            <TMPL_INCLUDE NAME="history-search-filter-widget.thtml">
            <!-- end of history-search-filter-widget.thtml content -->
            <br />
            <span class="bucketsLabel">
                <TMPL_VAR NAME="Localize_History_NoMessages">.
            </span>
       </td>
    </tr>
</table>

</TMPL_IF> <!-- if some messages -->

<TMPL_INCLUDE NAME="common-bottom.thtml">
