
<HTML>

<%@page info="calendarPreferences" language="java" pageEncoding="utf-8" contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/jato.tld" prefix="jato"%>

<%@include file="../../uwc/js/resourceBundleUtils.js"%>

<jato:useViewBean className="com.sun.uwc.CalendarPreferencesViewBean">

<HEAD>
<title><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-TitleLabel" defaultValue="Calendar Options - Communications Express" escape="false" /></title>


<SCRIPT language="JavaScript" src="../uwc/js/scripts.js"></SCRIPT>
<SCRIPT src="../uwc/js/browserVersion.js" type="text/javascript"></SCRIPT>
<SCRIPT src="../uwc/js/uwcUtils.js" type="text/javascript"></SCRIPT>
<SCRIPT type="text/javascript">
<!--
  if (is_ie5up) // IE5
  {
   document.write("<LINK href=<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="skinModel" lookInSession="true" name="Style-Sheet-IE" defaultValue="../uwc/css/css_ie5win.css"/> type=text/css rel=stylesheet>") 
  }
  else if (is_gecko) // Netscape 6/7 or Mozilla
  {
  document.write("<LINK href=<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="skinModel" lookInSession="true" name="Style-Sheet-NN" defaultValue="../uwc/css/css_ns6up.css"/> type=text/css rel=stylesheet>") 
  }
  else  // All others
  {
  document.write("<LINK href=<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="skinModel" lookInSession="true" name="Style-Sheet-NN" defaultValue="../uwc/css/css_ns6up.css"/> type=text/css rel=stylesheet>") 
  }
//-->

  var dirtyCache = 0;
// JS validations here before submitting

  function setDirtyCache() {
    dirtyCache = 1;
  }


  function handleDayStartEnd()
  {
     //setDirtyCache();
     var dayStart = parseInt(document.CalendarPreferencesForm.elements["CalendarPreferences.startHour"].value);
     var dayEnd = parseInt(document.CalendarPreferencesForm.elements["CalendarPreferences.endHour"].value);

     // They cannot be same
     if (dayStart == dayEnd) {
        UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-same-startend-day" defaultValue="Day Start and End Times are the same. Select a valid time interval" escape="false" />");
        return false;
     }

     // End Day cannot be before Start Day
     if (dayEnd < dayStart) {
        UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-endday-before-startday" defaultValue="Day Start needs to be before Day End. Select a valid time interval" escape="false" />");
        return false;
     }
     return true;
  }

  function handleEnableSendReminder() 
  {
     //setDirtyCache();
     var reminderEnabled = document.CalendarPreferencesForm.elements["CalendarPreferences.sendReminder"].checked;
     var reminderEmail = document.CalendarPreferencesForm.elements["CalendarPreferences.reminderEmail"].value;
     var reminderTime = document.CalendarPreferencesForm.elements["CalendarPreferences.reminderTime"].value;

     if (reminderEnabled) {
        // Check if reminder e-mail address is provided
        if ((reminderEmail == null) || (reminderEmail == ""))
        {
           UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-empty-reminder-email" defaultValue="Enter an email address to send email reminders" escape="false" />");
           return false;
        }
        if ((reminderTime == null) || (reminderTime == ""))
        {
           UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-empty-reminder-time" defaultValue="Enter a valid email reminder time" escape="false" />");
           return false;
        }
     }
     return true;
   }

  function handleNotifyEnabled() 
  {
     //setDirtyCache();
     var notifyEnabled = document.CalendarPreferencesForm.elements["CalendarPreferences.sendNotification"].checked;
     var notifyEmail = document.CalendarPreferencesForm.elements["CalendarPreferences.notifyEmail"].value;

     if (notifyEnabled) {
        // Check if reminder e-mail address is provided
        if ((notifyEmail == null) || (notifyEmail == ""))
        {
           UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-empty-notify-email" defaultValue="Enter an email address to send event notifications" escape="false" />");
           return false;
        }
     }
     return true;
   }

   
   function handleReminderEmailChange()
   {
     var reminderEmail = document.CalendarPreferencesForm.elements["CalendarPreferences.reminderEmail"].value;
     var array = new Array();
     var isValid = true;

     if (reminderEmail == null || reminderEmail == "") {
        return true;
     }
     
     array = reminderEmail.split(",");
     var len = array.length;
     for (var count=0; count < len; count++) {
        if (!isValidEmailAddress(array[count])) {
           isValid = false;
           break;
        }
     }
     if (!isValid) {
           UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-invalid-reminder-email" defaultValue="Reminder Email address is not in correct format" escape="false" />");
           return false;
     }
     return true;
   }
   
   function handleReminderTimeChange()
   {
      var reminderTime = document.CalendarPreferencesForm.elements["CalendarPreferences.reminderTime"].value;
      if (reminderTime == null || reminderTime == "") {
         return true;
      }
      if (!isInteger(reminderTime)) {
           UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-invalid-reminder-time" defaultValue="Enter the Reminder time as a positive number" escape="false" />");
         return false;
      }
      return true;
   }

   function handleNotifyEmailChange()
   {
      var notifyEmail = document.CalendarPreferencesForm.elements["CalendarPreferences.notifyEmail"].value;
      if (notifyEmail == null || notifyEmail == "") {
         return true;
      }

      if (!isValidEmailAddress(notifyEmail)) {
           UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-invalid-notify-email" defaultValue="Notification Email address is not in correct format" escape="false" />");
           return false;
      }
      return true;
   }

   function handleCalEventFilter()
   {
     var acpt = document.CalendarPreferencesForm.elements["CalendarPreferences.AcceptedStatusFilter"].checked;
     var tent = document.CalendarPreferencesForm.elements["CalendarPreferences.TentativeStatusFilter"].checked;
     var decl = document.CalendarPreferencesForm.elements["CalendarPreferences.DeclinedStatusFilter"].checked;
     var norsp = document.CalendarPreferencesForm.elements["CalendarPreferences.NoResponseStatusFilter"].checked;

     if(acpt || tent || decl || norsp) {
       return true;
     }

     UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-NoEventFilter-Alert" defaultValue="Please select atleast one event status filter" escape="false" />");

     return false;
   }
   
   function handleWeekendValues()
   {
      var donotShowWeekends = document.CalendarPreferencesForm.elements["CalendarPreferences.noDisplayWeekend"].checked;
      if (donotShowWeekends) {
         var sun = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendSun"].checked;
         var mon = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendMon"].checked;
         var tue = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendTue"].checked;
         var wed = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendWed"].checked;
         var thu = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendThur"].checked;
         var fri = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendFri"].checked;
         var sat = document.CalendarPreferencesForm.elements["CalendarPreferences.weekendSat"].checked;

         if (sun && mon && tue && wed && thu && fri && sat) {
            UWCAlert("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-error-option-no-weekday-to-display" defaultValue="There are no week days to be displayed !" escape="false" />");
            return false;
         }
         else {
            return true;
         }
      }
      else {
         return true;
      }
   }
   

   function isValidEmailAddress(mailaddress) {

   var invalidChars = "()<>@,;:\\\"[] \t!%/={}#$&*?|~";
   var validDomainChars = "0123456789-abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

    // check syntax
    var array = mailaddress.split("@");
    if (array.length != 2) {
        return false;
    }

    var localPart = array[0] ;
    var domain = array[1] ;

    // check valid local part
    var i = 0;
    var localPart = array[0];
    for (i = 0; i < localPart.length; i++) {
        if (localPart.charCodeAt(i) < 33 ) {
            return false;
        }
        if (localPart.charCodeAt(i) > 126) {
            return false;
        }
        if (invalidChars.indexOf(localPart.charAt(i)) >= 0) {
            return false;
        }
    }
    // check valid domain part
    var domain = array[1];
    var domainArray = domain.split(".");

    // If the domain does not contain a ".", then it is not valid 
    if ( domainArray.length < 2 )
    {
       return false ;
    }

    var j = 0;
    for (j = 0; j < domainArray.length; j++) {
        var domainPart = domainArray[j].toString();
        // subdomain can not start or end with hyphen
        if (domainPart.charAt(0) == '-') {
            return false;
        }
        if (domainPart.charAt(domainPart.length - 1) == '-') {
            return false;
        }
        for (i = 0; i < domainPart.length; i++) {
            if (validDomainChars.indexOf(domainPart.charAt(i)) < 0) {
                return false;
            }
        }
    }

    return true;
   }

   function isInteger(val) {
       var str = val.toString();
       for (var i = 0; i < str.length; i++) {
           var oneChar = str.charAt(i);
           if (oneChar < "0" || oneChar > "9")
               return false;
       }
       return true;
   }
      

   function isValidated() 
   {
      if (!handleDayStartEnd()) {
         return false;
      }
      if (!handleCalEventFilter()) {
         return false;
      }
      if (!handleWeekendValues()) {
         return false;
      }
      if (!handleEnableSendReminder()) {
         return false;
      }
      if (!handleNotifyEnabled()) {
         return false;
      }
      if (!handleReminderEmailChange()) {
         return false;
      }
      if (!handleReminderTimeChange()) {
         return false;
      }
      if (!handleNotifyEmailChange()) {
         return false;
      }
      return true;
   }
   

  function handleSave()
  {
    if (dirtyCache == 1) {
       if (isValidated()) {
          dirtyCache = 0;
          document.CalendarPreferencesForm.submit();
       }
    }
  }

  function unloadPage() {
    if(dirtyCache == 1) {
      if( UWCConfirm("<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-save-page" defaultValue="Do you want to save the changes?" escape="false" />") )
      {
         handleSave();
      }
    }        
  }

 
</SCRIPT>
</HEAD>

<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="Page" onUnload="unloadPage(); return false" >

<!-- Pagelet for branding -->
   <jato:containerView name="MasterHead"> 
       <%@include file="/uwc/common/MasterHeadNormal.jsp"%>
   </jato:containerView> 

<!-- JSP include for application toolbar -->
   <%@include file="/uwc/common/OptionsApplBarPagelet.jsp"%>

<!-- Secondary Row of Tabs -->
<DIV class="Tab2"> 
  <TABLE border="0" cellspacing="0" cellpadding="0" class="Tab2Tbl" width="100%" summary="Table that contains the Calendar View Tabs">
    <TR> 
      <TD colspan="12"><IMG src="../uwc/images/spacer.gif" width="1" height="10" alt=""></TD>
    </TR>
    <TR> 
      <TD colspan="5"><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD colspan="5" class="Tab2LineBkgd"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
      <TD colspan="2"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
    </TR>
    <TR> 
      <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD class="Tab2NotSel"> 
        <div class="Tab2NotSel"><a title="<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-tooltip-global" defaultValue="Global Options" escape="false"/>" href="<%= getContextURI(request) %>/base/UserPreferencesSettings" class="TabLblNormal" ><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-global" defaultValue="Global" escape="false"/></a>
        </div>
      </TD>
      <TD><IMG src="../uwc/images/dividerbar.gif" alt="" width="24" height="20"></TD>

      <TD class="Tab2NotSel"> 
       <jato:content name="MailTab">
        <div class="Tab2NotSel"><a title="<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-tooltip-mail" defaultValue="Mail Options" escape="false"/>" href="<%= getContextURI(request) %>/base/MailOptions" class="TabLblNormal" ><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-mail" defaultValue="Mail" escape="false"/></a>
        </div>
       </jato:content>
      </TD>
      <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD class="Tab2LineBkgd"><IMG src="../uwc/images/spacer.gif" width="1" height="12" alt=""></TD>
      <TD class="Tab2Sel"><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD class="Tab2Sel"> 
        <div class="Tab2Sel"><span class="TabLblSel" title="<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-calendar" defaultValue="Calendar" escape="false" />"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-calendar" defaultValue="Calendar" escape="false" /></span>
      </TD>
      <TD class="Tab2Sel"><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD class="Tab2LineBkgd"><IMG src="../uwc/images/spacer.gif" width="1" height="12" alt=""></TD>
      <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD class="Tab2NotSel" nowrap width="90%"> 
          <div class="Tab2NotSel"><a title="<jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-tooltip-addressbook" defaultValue="Address Book Options" escape="false" />" href="<%= getContextURI(request) %>/base/ABPreferences" class="TabLblNormal" ><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-addressbook" defaultValue="Address Book" escape="false" /></a></div>
      </TD>
    </TR>
    <TR> 
      <TD class="Tab2LineBkgd"><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
      <TD colspan="5" class="Tab2LineBkgd"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
      <TD colspan="3"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
      <TD colspan="3" class="Tab2LineBkgd"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
    </TR>
  </TABLE>
</DIV>
<!-- Page Title with Save Button -->

<!-- Error information pagelet -->
   <jato:containerView name="errorPlugin">
      <%@include file="/uwc/common/error.jsp"%>
   </jato:containerView>

<jato:form name="CalendarPreferencesForm" method="post" defaultCommandChild="/Save">

<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD colspan="4">&nbsp;</TD>
  </TR>
  <TR> 
    <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
    <TD width="100%"><SPAN class="TtlTxt">
       <jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-TitleLabel" defaultValue="Options - Calendar"  escape="false" />
      </SPAN>
    </TD>
    <TD align="right"> 
      <jato:button styleClass="Btn1" name="Save" onClick="handleSave(); return false" defaultValue='<%= getLocalizedLabel(session, "uwc-common-save", "Save") %>' onFocus="if (this.disabled==0) this.className='Btn1Hov'" onMouseOver="if (this.disabled==0) this.className='Btn1Hov'" onMouseOut="if (this.disabled==0) this.className='Btn1'" onBlur="if (this.disabled==0) this.className='Btn1'" tabIndex="30" extraHtml='<%= getTitleForExtraHtml(session, "uwc-calclient-options-tooltip-Save", "Save Changes to Calendar Options") %>' />
    </TD>
    <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
  </TR>
</TABLE>
<!-- Horizontal Top/Bottom of Page Line -->
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
    <TD class="TtlLin" width="100%"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
  </TR>
</TABLE>
<!-- Form Input -->
<TABLE class="FormInputTableOptions" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD colspan="2"><IMG src="../uwc/images/spacer.gif" width="1" height="15" alt=""></TD>
  </TR>
  <TR> 
    <TD class="PropLabel"><SPAN class="Lbl2"><label for="defaultCalView"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-defaultCalViewLabel" defaultValue="Default Calendar View:" escape="false" /></label></SPAN></TD>
    <TD class="PropInput"> 
      <jato:combobox name="defaultCalView" elementId="defaultCalView" tabIndex="1" onChange="setDirtyCache()" />
    </TD>
  </TR>
  <TR> 

    <TD class="PropLabel"><SPAN class="Lbl2"><label for="defaultCompType">
    <jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-defaultCalTypeLabel" defaultValue="Default Type:" escape="false" />
    </label></SPAN></TD>

    <!-- Listing of all the supported categories -->

    <TD class="PropInputWHelp"> 
      <jato:combobox name="defaultCompType" elementId="defaultCompType" tabIndex="2" onChange="setDirtyCache()" />
    </TD>
  </TR>
  <TR> 
    <TD class="PropHelp">&nbsp;</TD>
    <TD class="PropHelp"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-defaultTypeInfoLabel" defaultValue="Type assigned to a new event or task." escape="false" /></TD>
  </TR>

  <TR> 
    <TD colspan="2" class="PropCheckBox"> 
      <jato:checkbox name="showCompletedTasks" elementId="showCompletedTasks" tabIndex="3" onClick="setDirtyCache()" />
      <label for="showCompletedTasks"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-showCompletedTasksLabel" defaultValue="Always show completed tasks wherever tasks are shown." escape="false" /></label></TD>
  </TR>
    <tr>
      <td class="PropLabel"><SPAN class="Lbl2"><label for="defaultEventFilter"><%= getLocalizedLabel(session, "uwc-calclient-options-EventFilterLabel", "Default event status filter:  ") %></label></SPAN></td>
      <td>&nbsp;</td>
      <td>
        <jato:checkbox name="AcceptedStatusFilter" elementId="defaultEventFilter" tabIndex="3" onClick="setDirtyCache()"/>
            <label for="acceptedEvents"><%= getLocalizedLabel(session, "uwc-calclient-options-EventFilter-Accepted", "Accepted") %></label>
        <jato:checkbox name="TentativeStatusFilter" elementId="defaultEventFilter" tabIndex="3" onClick="setDirtyCache()"/>
            <label for="undecidedEvents"><%= getLocalizedLabel(session, "uwc-calclient-options-EventFilter-Tentative", "Tentative") %></label>
        <jato:checkbox name="DeclinedStatusFilter" elementId="defaultEventFilter" tabIndex="3" onClick="setDirtyCache()"/>
            <label for="declinedEvents"><%= getLocalizedLabel(session, "uwc-calclient-options-EventFilter-Declined", "Declined") %> </label>
        <jato:checkbox name="NoResponseStatusFilter" elementId="defaultEventFilter" tabIndex="3" onClick="setDirtyCache()"/>
            <label for="noAction"><%= getLocalizedLabel(session, "uwc-calclient-options-EventFilter-NoResponse", "No Response") %></label>
      </td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td><%= getLocalizedLabel(session, "uwc-calclient-options-EventFilter-Intro", "Only events with the selected status will be displayed.") %></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>

</TABLE>
<!-- Sub-section Title with 5 pixel gray bar -->
<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" name="uwc-calclient-options-dailyTimeScaleHeaderLabel" defaultValue="Calendar Daily Time Scale" escape="false" /></SPAN></TD>
  </TR>
</TABLE>
<!-- Form fill-in -->
  <TABLE class="FormInputTableOptions" border="0" cellpadding="0" cellspacing="0" title="">
    <TR> 

      <TD class="PropLabel"><SPAN class="Lbl2"><label for="startHour"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-dayStartLabel" defaultValue="Day Starts:" escape="false" /></label></SPAN></TD>

      <TD class="PropInput" nowrap> 
        <jato:combobox name="startHour" elementId="startHour" tabIndex="5" onChange="setDirtyCache(); handleDayStartEnd()"/>
      </TD>

      <TD class="PropLabel">&nbsp;&nbsp;<SPAN class="Lbl2"><label for="endHour"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-dayEndsLabel" defaultValue="Day Ends:" escape="false" /></label></SPAN> </TD>

      <TD class="PropInput" nowrap> 
        <jato:combobox name="endHour" elementId="endHour" tabIndex="7" onChange="setDirtyCache(); handleDayStartEnd()"/>
      </TD>
    </TR>
    <TR> 
      <TD class="PropLabel"><SPAN class="Lbl2"><label for="splitDay"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-splitDayLabel" defaultValue="Split Day Every:" escape="false" /></label></SPAN></TD>

      <TD class="PropInput" colspan="3"> 
        <jato:combobox name="splitDay" elementId="splitDay" tabIndex="9" onChange="setDirtyCache()" />
      </TD>

    </TR>
  </TABLE>
<!-- Sub-section Title with 5 pixel gray bar -->
<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" name="uwc-calclient-options-workWeekWeekendLabel" defaultValue="Calendar Work Week and Weekend" escape="false" /></SPAN></TD>
  </TR>

</TABLE>
<!-- Form Fill-In -->
<TABLE class="FormInputTableOptions" border="0" cellpadding="0" cellspacing="0" title="">
  <TR> 

    <TD class="PropLabel"><SPAN class="Lbl2"><label for="firstDay"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-firstDayLabel" defaultValue="First Day of Week:" escape="false" /></label></SPAN></TD>

    <TD class="PropInput" nowrap> 
      <jato:combobox name="firstDay" elementId="firstDay" tabIndex="10" onChange="setDirtyCache()" />
    </TD>
  </TR>
  <TR> 

<!-- Weekend Days Label -->
    <TD class="PropLabel"><SPAN class="Lbl2"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendDaysLabel" defaultValue="Weekend Days:" escape="false" /></SPAN></TD>

    <TD class="PropInput" nowrap> 
      <jato:checkbox name="weekendSun" elementId="weekendSun" tabIndex="11"  onClick="setDirtyCache()" /> <label for="weekendSun"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendSundayLabel" defaultValue="Sun" escape="false" /></label> 

     <jato:checkbox name="weekendMon" elementId="weekendMon" tabIndex="11"  onClick="setDirtyCache()" /><label for="weekendMon"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendMondayLabel" defaultValue="Mon" escape="false" /></label>

     <jato:checkbox name="weekendTue" elementId="weekendTue" tabIndex="11"  onClick="setDirtyCache()" /><label for="weekendTue"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendTuesdayLabel" defaultValue="Tue" escape="false" /></label>

     <jato:checkbox name="weekendWed" elementId="weekendWed" tabIndex="11"  onClick="setDirtyCache()" /><label for="weekendWed"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendWednesdayLabel" defaultValue="Wed" escape="false" /></label>

     <jato:checkbox name="weekendThur" elementId="weekendThur" tabIndex="11"  onClick="setDirtyCache()" /><label for="weekendThur"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendThursdayLabel" defaultValue="Thur" escape="false" /></label> 

      <jato:checkbox name="weekendFri" elementId="weekendFri" tabIndex="11"  onClick="setDirtyCache()" /><label for="weekendFri"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendFridayLabel" defaultValue="Fri" escape="false" /></label>

      <jato:checkbox name="weekendSat" elementId="weekendSat" tabIndex="11"  onClick="setDirtyCache()" /><label for="weekendSat"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-weekendSaturdayLabel" defaultValue="Sat" escape="false" /></label>

	</TD>
  </TR>
  <TR> 
    <TD class="PropCheckbox" colspan="2"> 
      <jato:checkbox  name="noDisplayWeekend" elementId="noDisplayWeekend" tabIndex="18" onClick="setDirtyCache()" />
     <label for="noDisplayWeekend">
        <jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-noDisplayWeekendLabel" defaultValue="Do not display weekend days in the Calendar Week and Month views." escape="false" />
     </label>
    </TD>
  </TR>
</TABLE>
<!-- Sub-section Title with 5 pixel gray bar -->
<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" name="uwc-calclient-options-calendarTimezoneHeaderLabel" defaultValue="Calendar Time Zone" escape="false" /></SPAN></TD>

  </TR>

</TABLE>
<!-- Form Fill-In -->
<TABLE class="FormInputTableOptions" border="0" cellspacing="0" cellpadding="2" title="">
  <TR> 

    <TD class="PropCheckBox"> 
      <jato:checkbox name="useCalZone" elementId="useCalZone" tabIndex="21" onClick="setDirtyCache()" />
      <label for="useCalZone"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-useCalZoneLabel" defaultValue="When displaying a single calendar use its time zone." escape="false" /></label></TD>
  </TR>


</TABLE>

<!-- Sub-section Title with 5 pixel gray bar -->
<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" name="uwc-calclient-options-remindersHeaderLabel" defaultValue="Reminders" escape="false" /></SPAN></TD>
  </TR>

</TABLE>
<!-- Form Fill-In -->
<TABLE class="FormInputTableOptions" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD colspan="2" class="PropCheckBox"> 
      <jato:checkbox name="sendReminder" elementId="sendReminder" tabIndex="23" onClick="setDirtyCache(); handleEnableSendReminder()" />
      <label for="sendReminder"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-sendReminderLabel" defaultValue="Send an email reminder message for all events and tasks." escape="false" /></label></TD>
  </TR>

  <TR> 
    <TD class="PropLabelWHelp"><SPAN class="Lbl2"><label for="reminderEmail"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-reminderEmailLabel" defaultValue="Email Address:" escape="false" /></label></SPAN></TD>
    <TD class="PropInputWHelp"> 
      <jato:textField name="reminderEmail" elementId="reminderEmail" size="60" tabIndex="24" onChange="setDirtyCache(); handleReminderEmailChange()" />
    </TD>
  </TR>
  <TR> 
    <TD class="PropHelp">&nbsp;</TD>
    <TD class="PropHelp"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-reminderEmailInfoLabel" defaultValue="Separate multiple email addresses with a comma." escape="false" /></TD>
  </TR>
  <TR> 
    <TD class="PropLabel"><SPAN class="Lbl2"><label for="reminderNumber"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-reminderNumberLabel" defaultValue="Send Reminder:" escape="false" /></label></SPAN></TD>
    <TD class="PropInput"> 
      <jato:textField name="reminderTime" elementId="reminderTime" size="4" maxLength="4" defaultValue="15" tabIndex="25" onChange="setDirtyCache(); handleReminderTimeChange()" />
      <jato:combobox name="reminderHour" elementId="reminderHour" tabIndex="26" onChange="setDirtyCache()" /> <jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-reminderNumberInfoLabel" defaultValue="before the event." escape="false" /></TD>
  </TR>

</TABLE>
<!-- Sub-section Title with 5 pixel gray bar -->
<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" name="uwc-calclient-options-eventNotificationsHeaderLabel" defaultValue="Event Notifications" escape="false" /></SPAN></TD>
  </TR>
</TABLE>
<!-- Form Fill-In -->
<TABLE class="FormInputTableOptions" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 

    <TD class="PropCheckBox" colspan="2"> 
      <jato:checkbox name="sendNotification" elementId="sendNotification" tabIndex="27" onClick="setDirtyCache(); handleNotifyEnabled()"/>
      <label for="sendNotification"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-sendNotificationLabel" defaultValue="Send notification whenever somebody invites me to an event" escape="false" /></label></TD>
  </TR>

  <TR> 
    <TD class="PropLabelWHelp"><SPAN class="Lbl2"><label for="notifyEmail"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-notifyEmailLabel" defaultValue="Email Address:" escape="false" /></label></SPAN></TD>

    <TD class="PropInputWHelp">
      <jato:textField name="notifyEmail" elementId="notifyEmail" size="60" tabIndex="28" onChange="setDirtyCache(); handleNotifyEmailChange()" />
    </TD>
  </TR>

  <TR> 
    <TD class="PropHelp">&nbsp;</TD>
    <TD class="PropHelp"><jato:getModelFieldValue modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-calclient-options-notifyEmailInfoLabel" defaultValue="Only one email address may be entered." escape="false" /></TD>
  </TR>
</TABLE>
<!-- Spacer -->
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD><IMG src="../uwc/images/spacer.gif" width="1" height="20" alt=""></TD>
  </TR>
</TABLE>
<!-- Horizontal Top/Bottom of Page Line -->
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
    <TD class="TtlLin" width="100%"><IMG src="../uwc/images/spacer.gif" width="1" height="1" alt=""></TD>
  </TR>
</TABLE>
<!-- Bottom of Page Buttons -->
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD colspan="3"><IMG src="../uwc/images/spacer.gif" width="1" height="5" alt=""></TD>
  </TR>
  <TR> 
    <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
    <TD align="right" width="100%"> 
      <jato:button styleClass="Btn1"  name="Save" defaultValue='<%= getLocalizedLabel(session, "uwc-common-save", "Save") %>' onClick="handleSave(); return false;" onFocus="if (this.disabled==0) this.className='Btn1Hov'" onMouseOver="if (this.disabled==0) this.className='Btn1Hov'" onMouseOut="if (this.disabled==0) this.className='Btn1'" onBlur="if (this.disabled==0) this.className='Btn1'" tabIndex="29"  extraHtml='<%= getTitleForExtraHtml(session, "uwc-calclient-options-tooltip-Save", "Save Changes to Calendar Options") %>' />
    </TD>
    <TD><IMG src="../uwc/images/spacer.gif" width="10" height="1" alt=""></TD>
  </TR>
</TABLE>
<!-- Spacer -->
<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <TR> 
    <TD><IMG src="../uwc/images/spacer.gif" width="1" height="20" alt=""></TD>
  </TR>
</TABLE>

</jato:form>

</body>

</jato:useViewBean>

</HTML>
