<script language="JavaScript" type="text/javascript">
    function switchView(view)
    {
        document.meeting.view.value = view;
        document.meeting.submit();
        return false;
    }   

    function actionIDsubmit(id) 
    {
        document.meeting.actionID.value = id;
        document.meeting.submit();
        return false;
    }   

    function switchDate(date)
    {
        document.meeting.date.value = date;
        document.meeting.submit();
        return false;
    }
    
    function deleteAttendee(email)
    {
        document.meeting.email.value = email;
        actionIDsubmit(<?php echo MOMENT_DELETE_ATTENDEE ?>);
    }
</script>
<form method="post" name="meeting" action="<?php echo Horde::selfURL() ?>">
<?php Horde::pformInput() ?>
<input type='hidden' name='actionID' value='' />
<input type="hidden" name="view" value="<?php echo $view ?>" />
<input type="hidden" name="date" value="<?php echo Horde::getFormData('date', time()) ?>" />

<table style="width:100%" cellspacing="0" cellpadding="0" border="0">
<tr>
  <td align="left" colspan="<?php echo ($templates - 1) ?>" class="header"><b><?php echo $title ?></b></td>
  <td align="right" class="header"><span class="smallheader">
    <?php if ($view != 'attendees'): ?>
      <input type="button" class="button" value="<?php echo _("Attendees") ?>" onclick="return switchView('attendees');"> 
    <?php elseif ($view == 'attendees'): ?>
      <input type="button" class="button" value="<?php echo _("Attendee Availability") ?>" onclick="return switchView('day');"> 
    <?php endif; ?>
    <input type="submit" class="button" name="save" value="<?php echo _("Save Meeting") ?>" onclick="return actionIDsubmit(<?php echo MOMENT_SAVE_MEETING ?>);"> 
    <input type="submit" class="button" name="save" value="<?php echo _("Cancel") ?>"  onclick="return actionIDsubmit(<?php echo MOMENT_CANCEL ?>);">
  </span></td>
</tr>
<tr>
