<%@page 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.MailPreferencesVacationViewBean">
<HTML>
<HEAD>
<TITLE><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-global-title" defaultValue="Sun&#153;ONE Affinity - Options - Mail"/></TITLE>
</HEAD>
<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 >
  if (is_ie5up) // IE5
  {
   document.write('<LINK href=<jato:getModelFieldValue escape="false"  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 escape="false"  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 escape="false"  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>')
  }

</script>
        <script>
        ///Javascript Alert strings
        var invalidDay_Err="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-error-invalid-date" defaultValue="Invalid Date Selection !"/>";
        var invalidStartDay_Err="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-error-invalid-start-date" defaultValue="Invalid Start Date Selection !"/>";
        var invalidStart_End_Day_Err="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-error-invalid-start-end-date" defaultValue="Start Date cannot be after end date"/>";
        var noReplyText_Err="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-error-no-reply-text" defaultValue="Reply text cannot be empty !"/>";
        var invalidTimeout="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-error-invalid-timeout" defaultValue="Enter the valid Number of days between replies to send the vacation message"/>";
        var EqualStart_End_Day_Err="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-error-equal-start-end-date" defaultValue="EndDate should be atleast one day later than the start date"/>";
 
        
   function isInteger(val) {
       var str = val.toString();
       if(str == null || str == "") return false;
       for (var i = 0; i < str.length; i++) {
           var oneChar = str.charAt(i);
           if (oneChar < "0" || oneChar > "9")
               return false;
       }
       return true;
   }

        function isLeapYear(year){
        var given_year=parseFloat(year);
        mod_four=given_year%4
	mod_hundred=given_year%100
	mod_fourhundred=given_year%400
	mod_fourthousand=given_year%4000
	
	/*The following if statement calculates whether the given year is or is
	not a leap year by comparing the above equations with the values below*/
	
	if(mod_four==0 && mod_hundred!=0 || mod_fourhundred==0 && mod_fourthousand!=0)
	return true;
	else return false;
	}
	
	
	function isValidDate(day ,month ,year){
    	day=parseInt(day);
    	month=parseInt(month);
   	 year=parseInt(year);       
        if(day <0 || day > 31 || month < 0 ||  month > 11 || year < 0)
            return false;
        
        //Check it is a 30 day month and we have a day that is within.
        if( ( month == 1 || month == 3 || month == 5 || month == 8 || month == 10 )
        && day >30 )
            return false;
        
        // check if it is a leap year and day is less than 29.
        
        var leapyear = isLeapYear(year);
        if( month == 1 && leapyear == false && day > 28)
            return false;
        
        return true;
    	}
    	
    	
	function checkValidFields(){
	
	var form=document.forms[0].elements;

    	var syear=form["MailPreferencesVacation.startYear"].value;
	var smonth=form["MailPreferencesVacation.startMonth"].value;
	var sday=form["MailPreferencesVacation.startDay"].value;
	var eyear=form["MailPreferencesVacation.endYear"].value;
	var emonth=form["MailPreferencesVacation.endMonth"].value;
	var eday=form["MailPreferencesVacation.endDay"].value;

	var delivery = form["MailPreferencesVacation.enableVac"];
	if(isValidDate(sday ,smonth ,syear)==false || isValidDate(eday ,emonth ,eyear)==false){
	UWCAlert(invalidDay_Err);
	return false;
	}

/*
 	var tempStart= new Date(syear,smonth,sday);
        var d = new Date();
 	var toDay = new Date(d.getYear(),d.getMonth(),d.getDate());
 	if(tempStart < toDay)   {
		UWCAlert (invalidStartDay_Err);
		return false; 
		}
 	
	var tempEnd = new Date(eyear,emonth,eday)
	if((tempStart > tempEnd) && delivery.checked)  {
		UWCAlert (invalidStart_End_Day_Err);
		return false; 
		}
        if((tempEnd.getYear() == tempStart.getYear()) && (tempEnd.getMonth() == tempStart.getMonth()) && (tempEnd.getDate() == tempStart.getDate()) && delivery.checked)  {
                UWCAlert (EqualStart_End_Day_Err);
                return false;
                }
  */ 
	
	if( delivery.checked ){
  	if(form["MailPreferencesVacation.textInternal"].value ==' '||
	   form["MailPreferencesVacation.textAll"].value==' ' ||
	   form["MailPreferencesVacation.textInternal"].value ==''||
	   form["MailPreferencesVacation.textAll"].value=='')	{
		UWCAlert(noReplyText_Err);
		return false;
	}
  	}
  
        var e = form["MailPreferencesVacation.deliverytimeout"].value;
        e = trim(e);
        l = e.length;
        if((l > 0 && !isInteger(e)) || (delivery.checked && l == 0)) {
	   UWCAlert(invalidTimeout);
 	   return false;
        }
 
 	e = form["MailPreferencesVacation.subject"];
   	e.value = trim(e.value);
	
  	e = form["MailPreferencesVacation.textInternal"];
  	e.value = encodeVacationText(trim(e.value))
  
  	e = form["MailPreferencesVacation.textAll"];
  	e.value = encodeVacationText(trim(e.value));
	return true;
  
	}

      function encodeVacationText(text) {
      var s = ""
      var c
    
      for (var i=0; i < text.length; i++) {
        c = text.charAt(i)
        if (c == '\n') {
          s += "$"
        } else {
          if (c != '\r') {
            if (c == '\\'){
              s += "\\"
            } else {
              if (c == '$') {
                if ((text.indexOf("SUBJECT", i) == i+1) ||
                    (text.indexOf("FROM", i) == i+1)) {
                  s += c 
                } else {
                  s += "\\$"
                }
              } else {
                s += c
              }
            }
          } else {
            s += "$"
            if (text.charAt(i+1) == '\n') {
              i++
            }
          }
        }
      }
      return s
    }

function decodeVacationText(text) {
  var s = ""
  var c

  if(text == '') return s;
  if(typeof(text) == "undefined") text = ""

  for (var i=0; i < text.length; i++) {
    c = text.charAt(i)
    if (c == '$') {
      if ((text.indexOf("SUBJECT", i) == i+1) ||
          (text.indexOf("FROM", i) == i+1)) {
        s += c
      } else {
        s += '\n'
      }
    } else {
      if (c == '\\') {
        if (text.indexOf("\\$", i) == i+1) {
          s += c
        } else {
          i++
          c = text.charAt(i)
          if (c == '$') {
            s += "$"
          } else {
            s += "\\" + c
          }
        }
      } else {
        s += c
      }
    }
  }
  return s
}


    
      var dirtyCache = 0;
    
      //Function to submit the form.
      function handleSave(){
      var subt = true;
      //Check if the user has done some new changes.
      //if( dirtyCache == 1)
      subt = checkValidFields();
      if(subt == true){
      document.forms[0].submit();
      dirtyCache=0;
      }
      return false;
      }
    
      function setDirtyCache() {
        dirtyCache = 1;
      }
      
    function unloadPage() {
        if(0 != dirtyCache) {
          if(UWCConfirm("<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-save-page" defaultValue="Save changes you made in this tabbed pane?"/>")) {
            handleSave();
          }
        }
      }

    function settext() {
          var form=document.forms[0].elements;
          if(form["MailPreferencesVacation.textInternal"] != null)
             form["MailPreferencesVacation.textInternal"].value = decodeVacationText('<jato:getDisplayFieldValue name="textInternal"/>') 
          if(form["MailPreferencesVacation.textAll"] != null)
             form["MailPreferencesVacation.textAll"].value = decodeVacationText('<jato:getDisplayFieldValue name="textAll"/>'); 
    }    

</SCRIPT>
</HEAD>

<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" class="Page" onUnload="unloadPage()" onLoad="settext();">
<jato:form name="MailPreferencesVacation" method="post" defaultCommandChild="/Save">
<!-- Pagelet for branding -->
   <jato:containerView name="MasterHead">
    <%@include file="/uwc/common/MasterHeadNormal.jsp"%>
  </jato:containerView>

  <%@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="13"><img src="../uwc/images/spacer.gif" width="1" height="10" alt=""></td>
  </tr>
  <tr>
    <td colspan="3"><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="5"><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='<%=getLocalizedLabel(session, "uwc-common-tooltip-global", "Global Option")%>' href="<%= getContextURI(request) %>/base/UserPreferencesSettings" class="TabLblNormal" onMouseOver="return true;" onMouseOut="status=';'" target="_parent"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-global" defaultValue="Global"/></a> 
        </div>
    <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="1" 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 escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-tooltip-mail" defaultValue="Mail Options"/>"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-mail" defaultValue="Mail"/></span></div>
    </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="1" alt=""></td>
    <td><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
<jato:content name="CalendarTab">
      <td nowrap><div class="Tab2NotSel"><A title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-tooltip-calendar" defaultValue="Calendar Options"/>" href="<%= getContextURI(request) %>/base/CalendarPreferences" class="TabLblNormal" onMouseOver="status='Calendar Options'; return true;" onMouseOut="status=';'" target="_parent"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-calendar" defaultValue="Calendar"/></a></div></td>
      <td><img src="../uwc/images/dividerbar.gif" alt=""></td>
</jato:content>
    <td width="90%"> 
      <div class="Tab2NotSel"><A title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-tooltip-addressbook" defaultValue="Address Book Options"/>" href="<%= getContextURI(request) %>/base/ABPreferences" class="TabLblNormal" onMouseOver="status='Address Book Options'; return true;" onMouseOut="status=';'" target="_parent"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-common-addressbook" defaultValue="Address Book"/></a></div>
           </td>
  </tr>
  <tr> 
    <td class="Tab2LineBkgd"><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>
    <td colspan="3" class="Tab2Sel"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
    <td colspan="5" class="Tab2LineBkgd"><img src="../uwc/images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
</table>
</div>
<!-- Third Level of Tabs -->
<div class="Tab3"> 
<table class="Tab3Tbl" width="100%" border="0" cellspacing="0" cellpadding="0" title="">
  <tr>
    <td><img src="../uwc/images/spacer.gif" width=1 height=10 alt=""></td>
  </tr>
</table>
<table class="Tab3Tbl" border="0" cellspacing="0" cellpadding="0" title="">
  <tr> 
    <td><img src="../uwc/images/spacer.gif" width="10" height="1" alt=""></td>
      <td>
      <div class="Tab3"><a href="<%= getContextURI(request) %>/base/MailPreferencesPersonal" class="TabLblNormal" title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-tooltip-personal" defaultValue="Personal Information"/>"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-personal" defaultValue="Personal Information"/></a></div>
       </td>
    <td><img src="../uwc/images/dividerbar.gif" alt=""></td>
    <td>
    <div class="Tab3"><a href="<%= getContextURI(request) %>/base/MailPreferencesSettings" class="TabLblNormal" title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-tooltip-settings" defaultValue="Settings"/>"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-settings" defaultValue="Settings"/></a></div>
      </td>
    <td><img src="../uwc/images/dividerbar.gif" alt=""></td>
    <td> 
     <div class="Tab3"><a href="<%= getContextURI(request) %>/base/MailPreferencesLayout" class="TabLblNormal" title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-tooltip-layout" defaultValue="Layout"/>"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-layout" defaultValue="Layout"/></a></div>
    </td>
    <td><img src="../uwc/images/dividerbar.gif" alt=""></td>
     <td> 
      <div class="Tab3"><span class="TabLblSel" title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-tooltip-vacation" defaultValue="Vacation Message"/>"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation" defaultValue="Vacation Message"/></span></div>
	</td>
	<td><img src="../uwc/images/dividerbar.gif" alt=""></td>
     <td> 
      <div class="Tab3"><a href="<%= getContextURI(request) %>/base/MailPreferencesSieve" class="TabLblNormal" title="<jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-tooltip-seieve" defaultValue="Mail Filters"/>"><jato:getModelFieldValue escape="false" modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-sieve" defaultValue="Mail Filters"/></a></div> 
	</td>
  </tr>
</table>
</div>

<!-- Error pagelet -->
<jato:containerView name="errorPlugin">
    <%@include file="/uwc/common/error.jsp"%>
</jato:containerView>
<!-- Page Title with Save Button -->
   
<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 escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-title" defaultValue="Options - Vacation Message" /></SPAN></TD>
      <TD align="right">
<jato:button styleClass="Btn1"  name="savetop" defaultValue=" 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="14" extraHtml='<%= getTitleForExtraHtml(session, "uwc-mail-options-save-tooltip","Save Changes to  Mail 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 fill-in -->
  <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="PropCheckBox" colspan="2"> 
        <jato:checkbox name="enableVac" onChange="setDirtyCache()" />
      <label for="enableVac"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-vacation-enable" defaultValue="Enable Vacation Message for time period" />:</label></td>
    </tr>
    <tr> 
      <td class="PropLabel"><span class="Lbl2"><label for="startMonth"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-vacation-start-time" defaultValue="Start Time" />:</label></span></td>
      <td class="PropInput"> 
          	<jato:combobox name="startMonth" onChange="setDirtyCache()" />
		<jato:combobox name="startDay" onChange="setDirtyCache()" />
		<jato:combobox name="startYear" onChange="setDirtyCache()" />
         
      </td>
    </tr>
    <tr> 
      <td class="PropLabel" valign="top"><span class="Lbl2"><label for="endMonth"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-vacation-end-time" defaultValue="End Time" />:</label></span></td>
      <td class="PropInput"> 
         	<jato:combobox name="endMonth" onChange="setDirtyCache()" />
		<jato:combobox name="endDay" onChange="setDirtyCache()" />
		<jato:combobox name="endYear" onChange="setDirtyCache()"/>
       
      </td>
    </tr> 
    <tr> 
      <td colspan="2"><img src="../uwc/images/spacer.gif" width="1" height="10" alt=""></td>
    </tr>
    <tr> 
      <td class="PropLabel" colspan="2"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-comment" defaultValue="Send the following message to all incoming 
        mail senders when Vacation Message is enabled" />:</td>
    </tr>
    <tr> 
      <td class="PropLabel"><span class="Lbl2"><label for="subject"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-subject" defaultValue="Subject" />:</label></span></td>
      <td class="PropInput"> 
         <jato:textField name="subject" size="60" onChange="setDirtyCache()" />
      </td>
    </tr>
    <tr> 
      <td class="PropLabel"><span class="Lbl2"><label for="deliverytimeout"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-deliverytimeout" defaultValue="Number of days between replies to repeat senders" />:</label></span></td>
      <td class="PropInput"> 
         <jato:textField name="deliverytimeout" size="2" onChange="setDirtyCache()" />
      </td>
    </tr>
    <tr> 
      <td class="PropLabel"><span class="Lbl2"><label for="subject"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-message" defaultValue="Message" />:</label></span></td>
      <td class="PropInput"><label for="textAll"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-message-external" defaultValue="Text sent to all senders" />:</label></td>
    </tr>
    <tr> 
      <td class="PropInputWLblAbove">&nbsp;</td>
      <td class="PropInputWLblAbove"> 
        <jato:textArea name="textAll" elementId="textAll" cols="70" rows="7" tabIndex="11"  onChange="setDirtyCache()" />
      </td>
    </tr>
    <tr> 
      <td class="PropLabel">&nbsp;</td>
      <td class="PropInput"><label for="textInternal"><jato:getModelFieldValue escape="false"  modelClass="com.sun.uwc.common.model.UWCResourceBundleModel" modelName="i18nModel" lookInSession="true" name="uwc-mail-options-vacation-message-internal" defaultValue="Text sent only to internal senders" />:</label></td>
    </tr>
    <tr> 
      <td class="PropInputWLblAbove">&nbsp;</td>
      <td class="PropInputWLblAbove"> 
       <jato:textArea  name="textInternal" elementId="textInternal" tabIndex="12" cols="70" rows="7" onChange="setDirtyCache()"/>
      </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="savebottom" onClick="handleSave();return false;" defaultValue=" 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="13" extraHtml='<%= getTitleForExtraHtml(session, "uwc-mail-options-save-tooltip","Save Changes to  Mail 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:href name="Save"/>
</jato:form>
</BODY>
</HTML>
</jato:useViewBean>
