<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>
<jato:hidden name="hasRecurrenceChanged" defaultValue=""/>

<script language=JavaScript type=text/javascript>

  function handleFrequencySelection() {
      document.forms[0].elements["HiddenButtonForFrequencySelection"].click();
  }

  function handleRecurrenceChange() {
      document.forms[0].elements["<%= getServletInfo() %>.RecurrencePane.hasRecurrenceChanged"].value="true";
  }


</script>


<!-- Sub-Section Header -->  
<table width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <tr> 
   <td colspan="3"><img src="../uwc//images/spacer.gif" width="1" height="20" alt=""></td>
  </tr>
  <tr> 
  <td><img src="../uwc/images/spacer.gif" width="10" height="5" alt=""></td>
  <td class="SectionDivider" width="100%"><img src="../uwc/images/spacer.gif" width="1" height="5" alt=""></td>
   <td><img src="../uwc/images/spacer.gif" width="10" height="5" alt=""></td>
   </tr>
   <tr> 
	<td colspan="3" class="SectionHeader"><span class="SectionHeader"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-headerLabel" defaultValue="Recurrence"/></span></td>
  </tr>
</table>

<!-- Recurrence Properties -->

<table class="FormInputTable" width="100%" border="0" cellspacing="0" cellpadding="0" title="">
 <tr> 
      <td class="PropLabel"><span class="Lbl2"><label for="eventFrequency"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-frequencyLabel" defaultValue="Frequency:"/></label></span></td>
	  <td class="PropInput" width="100%"> 
	  <jato:combobox name="select_frequency" elementId="eventFrequency" onChange="handleFrequencySelection(); return false;"/>
     </td>
	  
        <!-- Define a hidden button called 'frequency' which enables to carry some form actions or submittions upon frequency value change.  This frequencySelection button will *always* be *hidden* because it is put inside a non-visible div tag. -->
        <div class="PropInput" style="visibility: hidden;">
		          <jato:button styleClass="Btn1" name="FrequencySelection" elementId="HiddenButtonForFrequencySelection" defaultValue=" "/>
		</div>
 </tr>
 <tr>
    <td colspan="2"><img alt="" width="1" height="6" src="../uwc/images/spacer.gif"></td>
  </tr>

 <tr> 
<!-- Daily Frequency -->
<jato:content name="DailyRecurring">
      <td valign="top" class="PropLabel"><span class="Lbl2"><label for="recurrencePattern"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-patternLabel" defaultValue="Pattern:"/></label></span></td>
    <td class="PropInput" valign="top"> 
	 <table border="0" cellspacing="0" cellpadding="0" elementId="RepeatPatternDaily">
	   <tr>
		<td width="10">
           <input tabindex="18" value="1" type="radio" onchange="handleRecurrenceChange(); return true;"  <jato:content name="DailyRecurringPatternOpt1" /> />
		</td>
		<td>
      <label for="recurrenceEvery"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-every" defaultValue="Every"/></label>
	<jato:textField name="day_interval_value" size="2" maxLength="2" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
    <label for="recurrenceDay"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-days" defaultValue="day(s)"/></label>
      </td>
      </tr>
	  <tr>
         <td class="PropInput" width="10">
             <input onchange="handleRecurrenceChange(); return true;" tabindex="18" value="2" type="radio"  <jato:content name="DailyRecurringPatternOpt2" />/>
         </td>
         <td class="PropInput">
      <label for="recurrenceEveryWeekDay"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-everyWeekDay" defaultValue="Every Week Day"/></label>
		</td>
	   </tr>
	  </table>
	</td>
</jato:content>
 </tr>


 <tr> 
<!-- Weekly Frequency -->

<jato:content name="WeeklyRecurring">
   <td class="PropLabel"><span class="Lbl2"><label for="recurrencePattern"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-options-recurrencePatternLabel" defaultValue="Pattern:"/></label></span></td>
   <td valign="top">
     <table border="0" cellspacing="0" cellpadding="0" elementId="RepeatPatternWeekly" title="">
	 <tr>
		<td>
      <label for="recurrenceEvery"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-every" defaultValue="Every"/></label>
			<jato:textField name="week_interval_value" size="2" maxLength="2" elementId="repeatWeeks" tabIndex="18" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceWeekOn"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-weekOn" defaultValue="Week(s) On:"/></label>
			<br>
			<jato:checkbox name="sunday" elementId="repeatSunday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceSunday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Sunday" defaultValue="Sunday"/></label>
			<jato:checkbox name="monday" elementId="repeatMonday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceMonday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Monday" defaultValue="Monday"/></label>
			<jato:checkbox name="tuesday" elementId="repeatTuesday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceTuesday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Tuesday" defaultValue="Tuesday"/></label>
			<jato:checkbox name="wednesday" elementId="repeatWednesday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceWednesday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Wednesday" defaultValue="Wednesday"/></label>
			<jato:checkbox name="thursday" elementId="repeatThursday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceThursday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Thursday" defaultValue="Thursday"/></label>
			<jato:checkbox name="friday" elementId="repeatFriday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceFriday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Friday" defaultValue="Friday"/></label>
			<jato:checkbox name="saturday" elementId="repeatSaturday" tabIndex="19" onChange="handleRecurrenceChange(); return true;"/>
      <label for="recurrenceSaturday"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-common-Saturday" defaultValue="Saturday"/></label>
		  </td>
		</tr>
	  </table>
	</td>
</jato:content>

 </tr>

 <tr> 
<!-- Monthly Frequency -->
<jato:content name="MonthlyRecurring">
   <td colspan="2"><img alt="" width="1" height="6" src="../uwc/images/spacer.gif"></td>
    </tr>
 <tr>
   <td valign="top" class="PropLabel"><span class="Lbl2"><label for="recurrencePattern"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-patternLabel" defaultValue="Pattern:"/></label></span></td>

   <td>
     <table border="0" cellspacing="0" cellpadding="0" elementId="RepeatPatternMonthly" title="">
	  <tbody><tr>
       <td width="10">
          <input type="radio" tabIndex="18" onChange="handleRecurrenceChange(); return true;" value="1" <jato:content name="MonthlyRecurringPatternOpt1" /> />
		</td>
	   <td> <label for="recurrenceDay"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-day" defaultValue="Day"/></label>
			<jato:textField name="monthlydayvalue" size="2" maxLength="2" elementId="repeatOnDay" tabIndex="18" onChange="handleRecurrenceChange(); return true;"/>
	   <label for="recurrenceOfEvery"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-ofEvery" defaultValue="Of Every"/></label>
			<jato:textField name="monthlymonthvalue" size="2" maxLength="2" elementId="repeatOnMonth" tabIndex="18" onChange="handleRecurrenceChange(); return true;"/>
	   <label for="recurrenceMonths"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-months" defaultValue="Month(s)"/></label>
     </td>
     </tr>
     <tr>
      <td class="PropInput" width="10">
          <input type="radio" tabIndex="18" onChange="handleRecurrenceChange(); return true;" value="2" <jato:content name="MonthlyRecurringPatternOpt2" /> />
      </td>
      <td class="PropInput">
	   <label for="recurrenceThe"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-the" defaultValue="The"/></label>
			<jato:combobox name="select_monthpatternvalue" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
			<jato:combobox name="select_monthdayvalue" tabIndex="32" onChange="handleRecurrenceChange();return true;"/>
	   <label for="recurrenceofEvery"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-ofEvery" defaultValue="of Every"/></label>
			<jato:textField name="monthintervalvalue" size="2" maxLength="2" elementId="repeatOnMonth" tabIndex="18" onChange="handleRecurrenceChange(); return true;"/>
	   <label for="recurrenceMonths"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-months" defaultValue="Month(s)"/></label>
		</td>
	  </tr>
	</tbody></table>
   <td>
</jato:content>
 </tr>

 <tr> 
<!-- Yearly Frequency -->
<jato:content name="YearlyRecurring">
   <td colspan="2"><img alt="" width="1" height="6" src="../uwc/images/spacer.gif"></td>
  </tr>

  <tr>
   <td  valign="top" class="PropLabel"><span class="Lbl2"><label for="recurrencePattern"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-patternLabel" defaultValue="Pattern:"/></label></span></td>

   <td>
     <table border="0" cellspacing="0" cellpadding="0" elementId="RepeatPatternYearly" title="">
	  <tbody><tr>
       <td width="10">
          <input type="radio" tabIndex="18" onChange="handleRecurrenceChange(); return true;" value="1" <jato:content name="YearlyRecurringPatternOpt1" /> />
	  </td>
   	<td>
	   <label for="recurrenceEvery"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-every" defaultValue="Every"/></label>
			<jato:combobox name="select_yearlymonthvalue" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
			<jato:combobox name="select_yearlydayvalue" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
       </td>
      </tr>
      <tr>
        <td class="PropInput" width="10">
          <input type="radio" tabIndex="18" onChange="handleRecurrenceChange(); return true;" value="2" <jato:content name="YearlyRecurringPatternOpt2" /> />
        </td>
     <td class="PropInput">
	   <label for="recurrenceThe"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-the" defaultValue="The"/></label>
			<jato:combobox name="select_yearpatternvalue" tabIndex="32" onChange="handleRecurrenceChange();return true;"/>
			<jato:combobox name="select_yeardayvalue" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
	   <label for="recurrenceOf"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-of" defaultValue="of"/></label>
			<jato:combobox name="select_yearmonthvalue" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
		</td>
	</tr>
	</tbody></table>
   </td>
</jato:content>
 </tr>

</tr>
  <td colspan="2"><img src="../uwc/images/spacer.gif" height="6" width="1" alt=""></td>
</tr>

<tr>
<jato:content name="showEnd">
   <td valign="top" class="PropLabel"><span class="Lbl2"><label for="recurrenceEnd"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-endLabel" defaultValue="End:"/></label></span></td>
  <td  class="PropInput">
    <table border="0" cellspacing="0" cellpadding="0" title="">
     <tbody><tr>
        <td width="10">
           <input tabindex="18" onChange="handleRecurrenceChange(); return true;" type="radio" value="1" <jato:content name="EndUntilRecurringPatternOpt1" /> />
	     </td>
		  <td>
	   <label for="recurrenceEndAfter"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-endAfter" defaultValue="End After"/></label>
		     <jato:textField name="countvalue" size="3" maxLength="3" elementId="eventOccurences" tabIndex="18" onChange="handleRecurrenceChange(); return true;"/>
	   <label for="recurrenceOccurences"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-occurences" defaultValue="Occurence(s)"/></label> </td>
       </tr>

       <tr>
       <td>&nbsp;</td>
       <td class="PropHelp"><span class="inlineHelpText"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-maxoccurences" defaultValue="Maximum of 60 occurrences may be created"/></span>
       </td>
       </tr>
       <tr>
       <td class="PropInput" width="10">
           <input tabindex="18" onChange="handleRecurrenceChange(); return true;" type="radio" value="2" <jato:content name="EndUntilRecurringPatternOpt2" /> />
       </td>
       <td class="PropInput">   
	   <label for="recurrenceEndBy"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-endBy" defaultValue="End By"/></label>
			    <jato:combobox name="select_untilmonth" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
			    <jato:combobox name="select_untilday" tabIndex="32" onChange="handleRecurrenceChange(); return true; "/>
			    <jato:combobox name="select_untilyear" tabIndex="32" onChange="handleRecurrenceChange(); return true;"/>
          </td>
      </tr>
      <tr>
	    <td class="PropInput" width="10">
           <input tabindex="18" onChange="handleRecurrenceChange(); return true;" type="radio" value="3" <jato:content name="EndUntilRecurringPatternOpt3" /> />
        </td>
       <td class="PropInput">
	   <label for="recurrenceNoEndDate"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" escape="false" name="uwc-calclient-recurrence-noEndDate" defaultValue="No End Date"/></label>
       </td> 
    </tr><tbody>
	</table>
  </td>
</jato:content>
 </tr>

</table>


