<form method="post" name="search" action="<?php echo Horde::applicationUrl('search.php') ?>">
<input type="hidden" name="actionID" value="update_search" />
<input type="hidden" name="delete_field_id" value="" />
<?php if ($mbox_param): ?>
<input type="hidden" name="mailbox" value="<?php echo $mbox_param ?>" />
<?php endif; ?>
<div align="center">
<table border="0" cellspacing="0" cellpadding="2" align="center">
  <tr>
    <td align="left" class="header" colspan="2">
      <b><?php echo _("Search") . (($mbox_param) ? (' ' . htmlspecialchars($imp['mailbox'])) : '') ?></b>
    </td>
    <td align="right" class="header"><?php echo Help::link('imp', 'search') ?></td>
  </tr>

  <tr>
    <td>&nbsp;</td>
    <td valign="top" align="left">
      <input type="submit" class="button" value="<?php echo _("Search") ?>" onclick="return formCheck();" />
      <input type="button" class="button" value="<?php echo _("Reset") ?>" onclick="document.search.actionID.value = 'reset_search';document.search.submit();return true;" />
    </td>
  </tr>

  <tr>
    <td class="smallheader" colspan="2" align="left"><b><?php echo _("Message matches") ?></b></td>
  </tr>

  <tr>
    <td>&nbsp;</td>
    <td class="item">
      <table cellspacing="0" cellpadding="0" width="100%">
        <tr>
          <td class="item1" align="left">
            <input type="radio" name="search_match" value="or" <?php if ($search_field_end > 0) echo 'onchange="document.search.submit();return true;"'; ?> <?php if ($search_match == 'or') echo 'checked="checked" '; ?>/>
            <i><?php echo _("Match Any Query") ?></i>
          </td>
          <td class="item1" align="left">
            <input type="radio" name="search_match" value="and" <?php if ($search_field_end > 0) echo 'onchange="document.search.submit();return true;"'; ?> <?php if (($search_match == 'and') || is_null($search_match)) echo 'checked="checked" '; ?>/>
            <i><?php echo _("Match All Queries") ?></i>
          </td>
        </tr>
      </table>
    </td>
  </tr>

  <tr>
    <td class="smallheader" colspan="2" align="left"><b><?php echo _("Message fields") ?></b></td>
  </tr>

  <tr>
    <td>&nbsp;</td>
    <td class="item0" align="left">
      <table border="0" cellpadding="1" cellspacing="1" width="100%">

