<#Frame>
  <#Calendar />

<script language="JavaScript">
<!-- hide
var editorIsCancel = false;
var editorIsSearch = false;

function validateEditorContent() {
  var errorString = "";

  if (editorIsCancel) return true;
  if (editorIsSearch) return true;

  editorIsCancel = false;
  editorIsSearch = false;

  if (document.editform.startTimePopUp.selectedIndex > 
      document.editform.endTimePopUp.selectedIndex)
    errorString = errorString + " => End time before start time.\n";

  if (document.editform.title.value.length == 0)
    errorString = errorString + " => No title set.\n";

  if (errorString.length > 0) {
    alert("invalid input:\n" + errorString);
    return false;
  }
  else
    return true;
}

function searchFieldChanged() {
  editorIsSearch = true;
  document.editform.submit();
  return true;
}
// -->
</script>

<#Window>
  <p>
    <#TabView>
      <#SearchTab>
          <#ProposalForm>
            <table border="0" cellspacing="0" cellpadding="4" width="100%">
              <#MainButtonRow>
                <td colspan="2" align="left"><#Font><b><#Label /></b></#Font></td>
              </#MainButtonRow>
              <tr><td colspan="2"></td></tr>
              <tr>
                <#AttributeCell><#Font><#StartDateLabel />:</#Font></#AttributeCell>
                <#ValueCell><#EditFont><#StartDate />
                  <#CalendarPopupStartDateLink /></#EditFont></#ValueCell>
              </tr>
              <tr>
                <#AttributeCell><#Font><#EndDateLabel />:</#Font></#AttributeCell>
                <#ValueCell><#EditFont><#EndDate />
                  <#CalendarPopupEndDateLink /></#EditFont></#ValueCell>
              </tr>
              <tr>
                <#AttributeCell><#Font><#EarliestStartTimeLabel />:</#Font></#AttributeCell>
                <#ValueCell><#EditFont><#EarliestStartTimePopUp /></#EditFont></#ValueCell>
              </tr>   
              <tr>
                <#AttributeCell><#Font><#LatestFinishTimeLabel />:</#Font></#AttributeCell>
                <#ValueCell><#EditFont><#LatestFinishTimePopUp /></#EditFont></#ValueCell>
              </tr>   
              <tr>
                <#AttributeCell><#Font><#DurationLabel />:</#Font></#AttributeCell>
                <#ValueCell><#EditFont><#DurationPopUp /></#EditFont></#ValueCell>
              </tr>
              <tr><td colspan="2"></td></tr>

              <#ResourceSelection />
              <tr><td colspan="2"></td></tr>

              <#ParticipantsSelection />
              <tr>
                <td>&nbsp;</td>
                <td><#SearchSubmit /><#CancelSubmit /></td>
              </tr>
            </table>
          </#ProposalForm>

        <#HasSearched>
            <hr size="1" noshade="noshade" />
            <#NoDateFoundCond>
              <#FoundNoDate />
            </#NoDateFoundCond>
            <#NoDateFoundCondElse>
            <table border="0" cellpadding="0" width="100%" cellspacing="1">
              <tr>
                <#DayCaptionCell>&nbsp;</#DayCaptionCell>
                <#HourCaptionRepetition>
                  <#HourCaptionCell>
                    <#Font><#HourCaptionCellValue /></#Font>
                  </#HourCaptionCell>
                </#HourCaptionRepetition>
              </tr>
              <tr>
                <#MinuteCaptionRepetition>
                  <#MinuteCaptionCell>
                    <#Font><#MinuteCaptionCellValue /></#Font>
                  </#MinuteCaptionCell>
                </#MinuteCaptionRepetition>
              </tr>

              <#DayRepetition>
                <tr>
                  <#DayCell>
                    <#Font><#DayValue /></#Font>
                  </#DayCell>

                  <#DayValueRepetition>
                    <#IsStartTime>
                      <#DayValueFreeCell>
                        <#NewDateLink>
                          <#NewImage />
                        </#NewDateLink>
                      </#DayValueFreeCell>
                    </#IsStartTime>

                    <#IsFreeTime>
                      <#DayValueFreeCell>
                        &nbsp;
                      </#DayValueFreeCell>
                    </#IsFreeTime>

                    <#IsUnfreeTime>
                      <#DayValueUnfreeCell>
                        &nbsp;
                      </#DayValueUnfreeCell>
                    </#IsUnfreeTime>

                    <#IsStartOrEndTime>
                      <#DayValueStartOrEndCell>
                        &nbsp;
                      </#DayValueStartOrEndCell>
                    </#IsStartOrEndTime>
                  </#DayValueRepetition>
                </tr>
              </#DayRepetition>
             </table>
             </#NoDateFoundCondElse>
        </#HasSearched>
      </#SearchTab>
    </#TabView>
   </p>
 </#Window>

<script language="JavaScript">
<!-- hide
if (document.editform.search) {
  document.editform.search.focus();
  document.editform.search.select();
}
// -->
</script>
</#Frame>
