<script language="JavaScript" type="text/javascript">
<!--
function redirectSubmit()
{
    if (document.compose.to.value == '') {
        alert('<?php echo addslashes(_("You must specify a recipient.")) ?>');
        document.compose.to.focus();
        return false;
    }

    return true;
}
//-->
</script>

<form method="post" action="<?php echo Horde::addParameter(Horde::selfURL(), 'uniq', md5(mt_rand())) ?>" name="compose">
<input type="hidden" name="mailbox" value="<?php echo htmlspecialchars($mailbox) ?>" />
<input type="hidden" name="index" value="<?php echo htmlspecialchars($index) ?>" />
<input type="hidden" name="actionID" value="redirect_send" />
<input type="hidden" name="array_index" value="<?php echo Horde::getFormData('array_index') ?>" />

<table border="0" align="center" width="95%" cellpadding="3" cellspacing="2">
<tr class="header">
    <td colspan="2" class="header">
        <b><?php echo htmlspecialchars($title) ?></b>
    </td>
</tr>
<tr>
    <td class="light" align="right"><b><?php echo _("To") ?></b>&nbsp;</td>
    <td class="item"> <input type="text" size="70" class="fixed" tabindex="1" name="to" value="<?php echo $header['to'] ?>"
    <?php if ($browser->hasFeature('iframes')): ?>
    onchange="expandField(this)" /><span id='expandingto' style='color:red;visibility:hidden;'><?php echo _("Expanding...") ?></span>
    <?php else: ?>
    />
    <?php endif; ?>
    </td>
</tr>

<tr>
    <td>&nbsp;</td>
    <td align="center" class="header">
        <input type="submit" class="button" onclick="return redirectSubmit();" value="<?php echo _("Redirect Message") ?>" />
        <input type="button" class="button" onclick="confirmCancel();" value="<?php echo _("Cancel Message") ?>" />
    </td>
</tr>
</table>

</form>

<br />

<?php if ($browser->hasFeature('javascript')): ?>
<script language="JavaScript" type="text/javascript">
<!--

document.compose.to.focus();

//-->
</script>
<?php endif; ?>

<?php if ($prefs->getValue('auto_expand')): ?>
<iframe id="autoexpand" name="autoexpand" style="width:0px;height:0px;border-width:0px" src="<?php echo Horde::applicationUrl('expand.php') ?>"></iframe>
<?php endif; ?>
