<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/enrgise-html.tld" prefix="enrgise" %>


<html:html>
<html:base />
<head>
  <TITLE><bean:message  key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
  <meta http-equiv=pragma content=no-cache>
</head>


<BODY   onkeydown="hotKeys(event);"; scroll=auto>

<html:form name="HrmLvMstForm" action="HrmLeaveMasterBaseAction" type="wenrgise.hrms.webtier.form.HrmLvMstForm">
<bean:define id="ParentForm" name="HrmLvMstForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.HrmLeaveMaster.mainHeader" /></TD>
    </TR>
</TABLE>
<!--//  Display Errors -->
<enrgise:errors/>
<logic:messagesPresent message="true">
<Table>
    <html:messages id="message" message="true">
    <TR><TD>
      <bean:write name="message"/>
    </TD></TR>
    </html:messages>      
</Table>
</logic:messagesPresent>
<!--//  Display Errors --> 

<TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TR>
        <TD>
        
        <TABLE cellSpacing=0 cellPadding=0 >
        <!-- Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmLeaveMaster.subHeader1" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <TR>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.leaveCode" /></td>
                  <td><enrgise:text  property="leaveCode" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.leaveCode" alt="A" maxlength="10" size="23" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon"  property="butLeaveCode" name="HrmLvMstForm" onclick="return ShowLeaveCode()"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.description" /></td>
                  <td colspan="3"><enrgise:text  property="description" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.description" alt="A" maxlength="40" size="84" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();"  /></td>              
                  
            </TR>
            <TR>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.evidenceRequired" /></td>
                  <td><enrgise:checkbox property="evidenceRequired" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.evidenceRequired" styleClass="optional" disabledClass="locked" onclick="doHeaderCheckBox(this); doBaseValidate(this);"  onchange="doChangeHeader();" /><html:hidden property="evidenceRequired" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.evidenceDescription" /></td>
                  <td colspan="3"><enrgise:textarea  property="evidenceDescription" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.evidenceDescription" alt="A" cols="86" rows="2" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /></td>
               
                   
            </TR>  
            <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmLeaveMaster.subHeader2" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <TR>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.prefixSuffix" /></td>
                  <td><enrgise:checkbox property="prefixSuffix" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.prefixSuffix" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" onclick="doHeaderCheckBox(this);"  /><html:hidden property="prefixSuffix" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.suffix" /></td>
                  <td><enrgise:checkbox property="suffix" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.suffix" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" onclick="doHeaderCheckBox(this);"  /><html:hidden property="suffix" /></td>
             </TR>
             <TR>     
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.leaveObsolete" /></td>
                  <td><enrgise:checkbox property="leaveObsolete" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.leaveObsolete"  styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" onclick="doHeaderCheckBox(this);"  /><html:hidden property="leaveObsolete" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.intermediateHoliday" /></td>
                  <td><enrgise:checkbox property="intermediateHoliday" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.intermediateHoliday" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" onclick="doHeaderCheckBox(this);"  /><html:hidden property="intermediateHoliday" /></td>
                  
            </TR>
            <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmLeaveMaster.subHeader3" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <TR>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.encashable" /></td>
                  <td><enrgise:checkbox property="encashable" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.encashable" styleClass="optional" disabledClass="locked" onclick="doHeaderCheckBox(this);doBaseValidate(this)"    onchange="doChangeHeader(); " /><html:hidden property="encashable" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.encashableLimit" /></td>
                  <td><enrgise:text  property="encashableLimit" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.encashableLimit" onkeypress="isFloat(event)" maxlength="3" alt="N" size="17" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /> <bean:message key="hrm.HrmLeaveMaster.days" /></td>
                  
            </TR>
            <TR>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.calendar" /></td>
                  <td><html:text  property="calendar" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.calendar" maxlength="10" alt="A" size="23" readonly="true" styleClass="required" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon"  property="butCalendar" name="HrmLvMstForm" onclick="return ShowCalendarType()"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.periodicity" /></td>
                  <td ><enrgise:text  property="periodicity" name="HrmLvMstForm" titleKey="hrm.HrmLeaveMaster.periodicity" alt="N" maxlength="3" onkeypress="isInteger(event)" size="23" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /></td>
            </TR>
            <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmLeaveMaster.subHeader4" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <TR>
              <td class="labelText"><bean:message key="hrm.HrmLeaveMaster.applicableTo" /></td>
              <td><enrgise:select property="applicableTo" titleKey="hrm.HrmLeaveMaster.applicableTo" styleClass="required" disabledClass="locked" onchange="doChangeHeader();"  >
                  <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                  <enrgise:option value="M" > <bean:message key="hrm.HrmLeaveMaster.male" /></enrgise:option>
                  <enrgise:option value="F" > <bean:message key="hrm.HrmLeaveMaster.female" /></enrgise:option>
                  <enrgise:option value="B" > <bean:message key="hrm.HrmLeaveMaster.both" /></enrgise:option>
                </enrgise:select></td> 
            </TR>
               <tr height="10">
            <td colspan="6"></td> 
          </tr>
      </table>
      
         <table cellspacing=0 cellpadding=0 border=0>
         <!-- Detail Information Row starts -->
 	 <TR>
       <TD colspan=6>
        <!-- Table Starts -->
         <TABLE cellSpacing=0 cellPadding=0 >
           <tr>
                <td bgcolor="#4682B4" ></td>
                <enrgise:tab name="HrmLvMstForm" property="butLeaveMasterTab" styleClass="actTabText" disabledClass="lockedTab" src="../includes/images/formtab_r.gif" ><bean:message key="hrm.HrmLeaveMaster.subHeader5" /></enrgise:tab>
                <td width="85%"> </td>
            </tr>   
          <TR >
 <!-- Detail table Container starts -->
              <TD colspan=11>
                <TABLE cellSpacing=0 cellPadding=0 border=0>
                  <TBODY>
                   <TR>
                     <TD >
                       <DIV id=divDtlTable style="height:150px;width:1015px" >
  			<!-- Detail table starts -->
                        <TABLE cellSpacing=0 cellPadding=0>
                         <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><input type="checkbox" name="selectAll"  onclick="toggleCheckBox('checked')"  /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.leaveDescription" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.applicableFor" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.state" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.effectiveFrom" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.effectiveTo" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.minimumServicePeriod" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.maximumAccumulationLimit" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.totalAvailableLimit" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.advanceLimit" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.maxTxn" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.minLeavePerTxn" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.dependantOnWorkingDays" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.unit" /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLeaveMaster.creditFrequency" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLeaveMaster.maxCreditLimit" /></td>
                              <TD class=tableHeader width="3%"><bean:message key="hrm.HrmLeaveMaster.leavesCredited" /></td>
                              <TD class=tableHeader width="3%"><bean:message key="hrm.HrmLeaveMaster.applicableToAll" /></td>
                              <TD class=tableHeader width="3%"><bean:message key="hrm.HrmLeaveMaster.lapsable" /></td>
                       
                         </tr>  
                            <logic:notEmpty name="HrmLvMstForm" property="arylstLvMst">
                            <logic:iterate id="HrmLeave" name="HrmLvMstForm" property="arylstLvMst" type="wenrgise.hrms.bean.HrmLvMstDtlBean" indexId="idx" >
                                      <logic:notEqual name="HrmLeave" property="status" value="D" >
                                         <tr class='<bean:write name="HrmLvMstForm" property="listRowClass"/>'  >
                                             
                                              <td align="center" width="1%"><html:hidden property="status"  name="HrmLeave" /><html:hidden property="txtStateCode"  name="HrmLeave" /><html:hidden property="txtStateId"  name="HrmLeave" /><html:hidden property="detailId"  name="HrmLeave" /><html:hidden property="itemChecked" name="HrmLeave" /><html:checkbox property="checked" value="check" name="HrmLvMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /></td>
                                              <TD class=tableText ><enrgise:text property="txtLeaveDescription" size="23" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.leaveDescription" styleClass="required" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>   
                                              <td><enrgise:select property="txtApplicableFor" name="HrmLeave"  style="width:100%" alt="A" onchange='<%="doChangeDetail("+idx.toString()+");doBaseValidate()"%>' styleClass="required" disabledClass="locked"  >
                                                  <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                                                  <enrgise:option value="A" > <bean:message key="hrm.HrmLeaveMaster.all" /></enrgise:option>
                                                  <enrgise:option value="S" > <bean:message key="hrm.HrmLeaveMaster.state" /></enrgise:option>
                                              </enrgise:select></td> 
                                              <logic:equal property="txtApplicableFor" name="HrmLeave" value="A">
                                                  <TD class=tableText><html:text property="txtState" size="23" name="HrmLeave" onkeypress="isInteger(event)" titleKey="hrm.HrmLeaveMaster.state" styleClass="locked" readonly="true" onchange='<%="doChangeDetail("+idx.toString()+")"%>' value="" /><img height="16" align="center" styleClass="icon"  src="../includes/images/lov_dis.jpg" property="butState" alt="<%=idx.toString()%>" /></td>                                                          
                                              </logic:equal>
                                              <logic:equal property="txtApplicableFor" name="HrmLeave" value="S">
                                                  <TD class=tableText><html:text property="txtState" size="23" name="HrmLeave" onkeypress="isInteger(event)" titleKey="hrm.HrmLeaveMaster.state" styleClass="required" readonly="true" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><enrgise:img height="16" align="center" styleClass="icon" name="HrmLeave" src="../includes/images/lov.jpg" property="butState" alt="<%=idx.toString()%>" onclick="return ShowState(this.alt)" /></td>                                                          
                                              </logic:equal>
                                              <logic:equal property="txtApplicableFor" name="HrmLeave" value="">
                                                  <TD class=tableText><html:text property="txtState" size="23" name="HrmLeave" onkeypress="isInteger(event)" titleKey="hrm.HrmLeaveMaster.state" styleClass="locked" readonly="true" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img height="16" align="center" styleClass="icon"  src="../includes/images/lov_dis.jpg" property="butState" alt="<%=idx.toString()%>" /></td>                                                          
                                              </logic:equal>
                                            
                                              <TD class=tableText><enrgise:text property="txtEffectiveFrom" size="23" name="HrmLeave" onkeypress="isInteger(event)" maxlength="6"  titleKey="hrm.HrmLeaveMaster.effectiveFrom" styleClass="required" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                                                               
                                              <TD class=tableText ><enrgise:text property="txtEffectiveTo" size="23" name="HrmLeave" onkeypress="isInteger(event)" maxlength="6"  titleKey="hrm.HrmLeaveMaster.effectiveTo" styleClass="required" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>    
                                              <TD class=tableText><enrgise:text property="txtMinimumServicePeriod" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="2"  titleKey="hrm.HrmLeaveMaster.minimumServicePeriod" styleClass="optional" disabledClass="locked"  alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                                
                                              <TD class=tableText ><enrgise:text property="txtMaximumAccumulationLimit" size="15" name="HrmLeave" onkeypress="isFloat(event)"  maxlength="9" titleKey="hrm.HrmLeaveMaster.maximumAccumulationLimit" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>   
                                              <TD class=tableText><enrgise:text property="txtTotalAvailableLimit" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.totalAvailableLimit" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                                
                                              <TD class=tableText ><enrgise:text property="txtAdvanceLimit" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.advanceLimit" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>   
                                              <TD class=tableText><enrgise:text property="txtMaxTxn" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.maxTxn" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                                
                                              <TD class=tableText ><enrgise:text property="txtMinLeavePerTxn" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.minLeavePerTxn" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>   
                                              <TD class=tableText ><enrgise:checkbox property="txtDependantOnWorkingDays" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.dependantOnWorkingDays" styleClass="optional" disabledClass="locked"  onclick='<%="doDetailCheckBox(this," + idx.toString() + ");"%>' onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><html:hidden property="txtDependantOnWorkingDays"  name="HrmLeave"  /></td> 
                                              <TD class=tableText ><enrgise:text property="txtUnit" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.unit" styleClass="optional" disabledClass="locked"  alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>   
                                              <TD class=tableText><enrgise:text property="txtCreditFrequency" size="15" name="HrmLeave" onkeypress="isInteger(event)" maxlength="2" titleKey="hrm.HrmLeaveMaster.creditFrequency" styleClass="optional" disabledClass="locked"  alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                                
                                              <TD class=tableText ><enrgise:text property="txtMaxCreditLimit" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.maxCreditLimit" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>   
                                              <TD class=tableText><enrgise:text property="txtLeavesCredited" size="15" name="HrmLeave" onkeypress="isFloat(event)" maxlength="9" titleKey="hrm.HrmLeaveMaster.leavesCredited" styleClass="optional" disabledClass="locked"  alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>                                
                                              <TD class=tableText ><enrgise:checkbox property="txtApplicableToAll" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.applicableToAll" styleClass="optional" disabledClass="locked"  onclick='<%="doDetailCheckBox(this," + idx.toString() + ");"%>' onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><html:hidden property="txtApplicableToAll"  name="HrmLeave"  /></td> 
                                              <TD class=tableText ><enrgise:checkbox property="txtLapsable" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.lapsable" styleClass="optional" disabledClass="locked"  onclick='<%="doDetailCheckBox(this," + idx.toString() + ");"%>' onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><html:hidden property="txtLapsable"  name="HrmLeave"  /></td> 
                                           </tr>
                            </logic:notEqual>
                            <logic:equal name="HrmLeave" property="status" value="D"  >
                                           <tr class='<bean:write name="HrmLvMstForm" property="listRowClass"/>'  >
                                             <td align="center" width="1%"><html:hidden property="status"  name="HrmLeave" /><html:hidden property="txtStateCode"  name="HrmLeave" /><html:hidden property="txtStateId"  name="HrmLeave" /><html:hidden property="detailId"  name="HrmLeave" /><html:hidden property="itemChecked" name="HrmLeave" /><html:checkbox property="checked" value="check" disabled="true" name="HrmLvMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"  /></td>
                                              <TD class=tableText ><html:text property="txtLeaveDescription" size="23" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.leaveDescription" styleClass="deletedRow" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>   
                                               <td><html:select property="txtApplicableFor" name="HrmLeave"  style="width:100%" alt="A" onchange='<%="doChangeDetail("+idx.toString()+")"%>' styleClass="locked" disabled="true"  >
                                                  <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>      
                                                  <html:option value="A" > <bean:message key="hrm.HrmLeaveMaster.all" /></html:option>
                                                  <html:option value="S" > <bean:message key="hrm.HrmLeaveMaster.state" /></html:option>
                                              </html:select><html:hidden property="txtApplicableFor" name="HrmLeave" /></td> 
                                              <TD class=tableText><html:text property="txtState" size="23" name="HrmLeave" titleKey="hrm.HrmLeaveMaster.state" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /><img height="16" align="center" styleClass="icon" src="../includes/images/lov_dis.jpg" property="butState" alt="<%=idx.toString()%>"  /></td>                                                                                                                     
                                              <TD class=tableText><html:text property="txtEffectiveFrom" size="23" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.effectiveFrom" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>                                 
                                              <TD class=tableText ><html:text property="txtEffectiveTo" size="23" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.effectiveTo" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>    
                                              <TD class=tableText><html:text property="txtMinimumServicePeriod" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.minimumServicePeriod" styleClass="deletedRow"   alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>                                
                                              <TD class=tableText ><html:text property="txtMaximumAccumulationLimit" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.maximumAccumulationLimit" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  readonly="true" /></td>   
                                              <TD class=tableText><html:text property="txtTotalAvailableLimit" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.totalAvailableLimit" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>                                
                                              <TD class=tableText ><html:text property="txtAdvanceLimit" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.advanceLimit" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>   
                                              <TD class=tableText><html:text property="txtMaxTxn" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.maxTxn" styleClass="deletedRow"   alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>                                
                                              <TD class=tableText ><html:text property="txtMinLeavePerTxn" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.minLeavePerTxn" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>   
                                              <TD class=tableText ><html:checkbox property="txtDependantOnWorkingDays" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.dependantOnWorkingDays" styleClass="deletedRow"   onclick='<%="doDetailCheckBox(this," + idx.toString() + ");"%>' onchange='<%="doChangeDetail("+idx.toString()+")"%>' disabled="true" /><html:hidden property="txtDependantOnWorkingDays"  name="HrmLeave"  /></td> 
                                              <TD class=tableText ><html:text property="txtUnit" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.unit" styleClass="deletedRow"   alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>   
                                              <TD class=tableText><html:text property="txtCreditFrequency" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.creditFrequency" styleClass="deletedRow"   alt="N" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>                                
                                              <TD class=tableText ><html:text property="txtMaxCreditLimit" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.maxCreditLimit" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>   
                                              <TD class=tableText><html:text property="txtLeavesCredited" size="15" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.leavesCredited" styleClass="deletedRow"   alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  readonly="true" /></td>                                
                                              <TD class=tableText ><html:checkbox property="txtApplicableToAll" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.applicableToAll" styleClass="deletedRow" onchange='<%="doChangeDetail("+idx.toString()+")"%>' disabled="true"  /><html:hidden property="txtApplicableToAll"  name="HrmLeave"  /></td> 
                                              <TD class=tableText ><html:checkbox property="txtLapsable" name="HrmLeave"  titleKey="hrm.HrmLeaveMaster.lapsable" styleClass="deletedRow" onchange='<%="doChangeDetail("+idx.toString()+")"%>' disabled="true" /><html:hidden property="txtLapsable"  name="HrmLeave"  /></td> 
                                           </tr>
                            </logic:equal>
                         </logic:iterate>
                         </logic:notEmpty>
                  
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
                 <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		            <td> </td>
                 
               </tr>
        </TABLE>
      </td>
     </tr>
     
  </TABLE>
</td>
</tr>
              <!-- Tab Table Ends -->

      <!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr>
                        <td width=40% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>                
                        <td bgColor=#4682b4></td>
                        <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
                           
                   </TR>
                </table>
            </td>
          </tr>
	
<!-- Container Table Ending Columns Starts-->
  </TD>
    
</TR>
</TABLE>

<!-- Container Table Ends -->
<html:hidden property="criteria" />
<html:hidden property="screenName" name="HrmLvMstForm" value="HrmLeaveMaster" />
<html:hidden name="HrmLvMstForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmLvMstForm" />
<html:hidden property="screenMode" name="HrmLvMstForm"  />

<html:hidden property="userPageRequested" name="HrmLvMstForm" />
<html:hidden property="userPositionRequested" name="HrmLvMstForm" />
<html:hidden property="pageRequested" name="HrmLvMstForm" />

<html:hidden property="headerPrimaryKey" name="HrmLvMstForm" />
<html:hidden property="headerDataChanged" name="HrmLvMstForm" />
<html:hidden property="detailDataChanged" name="HrmLvMstForm" />

<!-- addded for LOV -->

<html:hidden property="lovKey" name="HrmLvMstForm"  />
<html:hidden property="firstLoad" name="HrmLvMstForm"  />
<html:hidden property="txtSearchFields" name="HrmLvMstForm"  />
<html:hidden property="txtDisplayFields" name="HrmLvMstForm"  />
<html:hidden property="txtIndex" name="HrmLvMstForm"  />

<html:hidden property="leaveCodeId" name="HrmLvMstForm"  />
<html:hidden property="calendarTypeId" name="HrmLvMstForm"  />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >





</html:form>
</body>
</html:html>
       
<script language="javascript">
function doDetailCheckBox(elem, i)
{
  i=i*2;
   
  if(elem.checked){
    document.getElementsByName(elem.name)[i+1].value="on";
  }
  else{
    document.getElementsByName(elem.name)[i+1].value="off";
  }
}
function doHeaderCheckBox(elem)
{
  if(elem.checked){
    document.getElementsByName(elem.name)[1].value="on";
  }
  else{
    document.getElementsByName(elem.name)[1].value="off";
  }
}
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}

function doValidate(obj)
{

if(obj.name=="evidenceRequired")
 {
  obj.checked=false
 }
if(obj.name=="encashable") 
 {
  obj.checked=false
 }
 return "HrmLeaveMasterValidateAction.do";
}
function doChangeHeader()
{
 document.forms[0].headerDataChanged.value="true";
}
function doSetFlag(flag)
{
  
  document.forms[0].criteria.value=flag;

}

function doQueryMode()
{
 
  return "HrmLeaveMasterQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmLeaveMasterNewModeAction.do";
}


function doExecute()
{

  return "HrmLeaveMasterGetHeaderAction.do";
}



function doDelete()
{

  return "HrmLeaveMasterDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmLeaveMasterRefreshAction.do";
  
}

function doValidate()
{
  return  "HrmLeaveMasterValidateAction.do"; 
}
function doPrevHeader()
{
  return "HrmLeaveMasterGetNextHeaderAction.do"; 
}

function doNextHeader()
{
  return "HrmLeaveMasterGetNextHeaderAction.do"; 
}

function doJumpHeader()
{
  return "HrmLeaveMasterFirstGetNextHeaderAction.do"; 
}

function doGetDetail()
{

  return "HrmLeaveMasterGetDetailAction.do";
}

function doAddRow()
{

  return "HrmLeaveMasterAddRowAction.do"; 
}

function doDelRow()
{
 return "HrmLeaveMasterDeleteRowAction.do";  
}

function doGetDetailTableName()
{
  return "HrmLeaveMaster";
}

function doPrevDetail()
{

  return "HrmLeaveMasterGetDetailPageAction.do";  
}

function doExit()
{

  return "HrmLeaveMasterExitAction.do";  
}

function doNextDetail()
{

  return "HrmLeaveMasterGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmLeaveMasterGetDetailPageAction.do"; 
}
function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmLeaveMasterOnLoadAction.do"; 
  }
}

function ShowLeaveCode()
{
        document.forms[0].lovKey.value = "LvMstLeaveCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLeaveMaster.leaveCode,hrm.HrmLeaveMaster.description";
        document.forms[0].txtDisplayFields.value = "leaveCodeId,leaveCode,description";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLvMstForm');
        return true;
        
}

function ShowCalendarType()
{
        document.forms[0].lovKey.value = "LvMstCalendarType" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLeaveMaster.calendar";
        document.forms[0].txtDisplayFields.value = "calendarTypeId,calendar";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLvMstForm');
        return true;
        
}

function ShowState(i)
{
        document.forms[0].lovKey.value = "LeaveState" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLeaveMaster.stateCode,hrm.HrmLeaveMaster.state";
        document.forms[0].txtIndex.value = i;
        document.forms[0].txtDisplayFields.value = "txtStateId,txtStateCode,txtState";
        document.forms[0].multipleFlag.value = false;
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLvMstForm');
}
function doSave()
{
 if(document.forms[0].name=="evidenceRequired")
 {
  document.forms[0].evidenceRequired.checked=false
 }
if(document.forms[0].name=="encashable") 
 {
  document.forms[0].encashable.checked=false
 }
 if(document.forms[0].name=="intermediateHoliday") 
 {
  document.forms[0].intermediateHoliday.checked=false
 }
 if(document.forms[0].name=="leaveObsolete") 
 {
  document.forms[0].leaveObsolete.checked=false
 }
if(document.forms[0].name=="prefixSuffix") 
 {
  document.forms[0].prefixSuffix.checked=false
 } 
 if(document.forms[0].name=="suffix") 
 {
  document.forms[0].suffix.checked=false
 } 
 if (document.forms[0].detailDataChanged.value=="true")
  {
  preSaveDetail();
  }
  return "HrmLeaveMasterSaveAction.do";
  
}

function preSaveDetail()
{

 for(i=0 ; i < document.forms[0].txtDependantOnWorkingDays.length; i++)
  {
    document.forms[0].txtDependantOnWorkingDays[i].checked=false
  }
   for(i=0 ; i < document.forms[0].txtApplicableToAll.length; i++)
  {
    document.forms[0].txtApplicableToAll[i].checked=false
  }
  for(i=0 ; i < document.forms[0].txtLapsable.length; i++)
  {
    document.forms[0].txtLapsable[i].checked=false
  }
}
function preSaveHeader()
{
if(document.forms[0].name=="evidenceRequired")
 {
  document.forms[0].evidenceRequired.checked=false
 }
if(document.forms[0].name=="encashable") 
 {
  document.forms[0].encashable.checked=false
 }
 if(document.forms[0].name=="intermediateHoliday") 
 {
  document.forms[0].intermediateHoliday.checked=false
 }
 if(document.forms[0].name=="leaveObsolete") 
 {
  document.forms[0].leaveObsolete.checked=false
 }
if(document.forms[0].name=="prefixSuffix") 
 {
  document.forms[0].prefixSuffix.checked=false
 } 
 if(document.forms[0].name=="suffix") 
 {
  document.forms[0].suffix.checked=false
 } 
 
 }
</script>

