<%@ 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" %>
<%@ page import="wenrgise.common.utility.ReportReader" %>
<%@ page import="wenrgise.ejb.common.utility.ParamUtil" %>
<html:html>
<head>
  <html:base />
  <TITLE><bean:message key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
  <meta http-equiv=pragma content=no-cache>
</head>

<BODY  scroll="auto" onkeydown="hotKeys(event);">
<html:form name="HrmLvApplnForm" action="HrmLvApplnBaseAction" type="wenrgise.hrms.webtier.form.HrmLvApplnForm">
<bean:define id="ParentForm" name="HrmLvApplnForm" toScope="request" />
<logic:equal property="workListId" name="HrmLvApplnForm" value="" >
  <jsp:include page="GenIconMenu.jsp" flush="true" />
</logic:equal>
<logic:notEqual property="workListId" name="HrmLvApplnForm" value="" >
  <TABLE  cellspacing="0" cellpadding="0" border=0>
        <tr height="25">
            <td colspan="6" bgColor=#4682b4></td>
         </TR>
  </table>
  <bean:define id="left" name="ParentForm" property="positionRequested"/>
  <bean:define id="right" name="ParentForm" property="totalCount"/>
  <table cellSpacing=0 bgColor=#bdd0ef>
    <tr height=12>
      <td colSpan=11></td>
    </tr>
    <TR > 
        <TD ><enrgise:img name="ParentForm" property="butQuery" onmouseover='this.src="../includes/images/query_act.jpg"' onmouseout='this.src="../includes/images/query.jpg"' alt="Query (Ctrl+Q)" src="../includes/images/query.jpg" onclick="doBaseQueryMode()" /><enrgise:img name="ParentForm" property="butInsert" onmouseover='this.src="../includes/images/insert_act.jpg"' onmouseout='this.src="../includes/images/insert.jpg"' alt="Insert (Alt+N)" src="../includes/images/insert.jpg"  onclick="doBaseInsertMode()"/></TD>
        <TD width="2%"></TD>
        <TD ><enrgise:img name="ParentForm" property="butExecute" onmouseover='this.src="../includes/images/execute_act.jpg"' onmouseout='this.src="../includes/images/execute.jpg"' alt="Execute (Ctrl+U)" src="../includes/images/execute.jpg" onclick="doBaseExecute()" /><enrgise:img name="ParentForm" property="butSave" onmouseover='this.src="../includes/images/save_act.jpg"' onmouseout='this.src="../includes/images/save.jpg"' alt="Save (Ctrl+S)" src="../includes/images/save.jpg" 
        onclick="doBaseSave()" />
        <enrgise:img name="ParentForm" property="butDelete" onmouseover='this.src="../includes/images/delete_act.jpg"' onmouseout='this.src="../includes/images/delete.jpg"' alt="Delete (Ctrl+D)" src="../includes/images/delete.jpg" onclick="doBaseDelete()" /><enrgise:img name="ParentForm" property="butRefresh" onmouseover='this.src="../includes/images/refresh_act.jpg"' onmouseout='this.src="../includes/images/refresh.jpg"' alt="Refresh (Ctrl+R)"  src="../includes/images/refresh.jpg" onclick="doBaseRefresh()" />
        <enrgise:img name="ParentForm" property="butPrint" onmouseover='this.src="../includes/images/print_act.jpg"' onmouseout='this.src="../includes/images/print.jpg"' alt="Print (Ctrl+P)"  src="../includes/images/print.jpg" /></TD>
        <TD width="2%" bgColor=#bdd0ef></TD>
        <TD><enrgise:img name="ParentForm" property="butExit" onmouseover='this.src="../includes/images/exit_act.jpg"' onmouseout='this.src="../includes/images/exit.jpg"' alt="Exit (Alt+X)"  src="../includes/images/exit.jpg"   onclick="doBaseExit()" />
        <enrgise:img name="ParentForm" property="butHelp" onmouseover='this.src="../includes/images/help_act.jpg"' onmouseout='this.src="../includes/images/help.jpg"' alt="Help (Ctrl+?)" src="../includes/images/help.jpg" onclick="doBaseHelp()" /></TD>
        <TD width="50%"></TD>
        <TD ><enrgise:img name="ParentForm" property="butPrevHeader" src='../includes/images/butn_prev.jpg' onmouseover='this.src="../includes/images/butn_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_prev.jpg"' alt="Butn_prev (Ctrl+<)" onclick="doBasePrevHeader()" /></td>
        <td class=dtlNavText><bean:write  name="left" /> of 
        <bean:write name="right" /></td>
        <td align=right><enrgise:img name="ParentForm" property="butNextHeader" src="../includes/images/butn_next.jpg" onmouseover='this.src="../includes/images/butn_next_act.jpg"' onmouseout='this.src="../includes/images/butn_next.jpg"' alt="Butn_next (Ctrl+>)" onclick="doBaseNextHeader()" /></td>
        <td align=right><enrgise:text property="newPositionRequested" size="1"  maxlength="3" onkeydown="isInteger(event)" title="wenrgise.common.jumpDetail" alt="N" disabledClass="locked" styleClass="optional" /></td>
        <td ><enrgise:img name="ParentForm" property="butJumpHeader" alt="Go (Ctrl+G)" src="../includes/images/go.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpHeader()" /></td>
        <td > </td>
     
    </TR>
    </table>
    <table>
    <tr>
      <td colspan="11" class="userText"></td>
    </tr>
    <enrgise:checkSession/>
    </TABLE>
</logic:notEqual>


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.HrmLvAppln.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.HrmLvAppln.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.HrmEmpEncash.employeeNumber" /></td>
                  <td><html:text  property="employeeNumber" titleKey="hrm.HrmEmpEncash.employeeNumber" size="26" styleClass="locked"  readonly="true" alt="P"   /><!--<enrgise:img height="16" align="center" src="../includes/images/lov.jpg" property="butEmpNo" name="HrmLvApplnForm" styleClass="icon" onclick="return ShowEmployeeNo()" />--></td>              
                  <td class="labelText"><bean:message key="hrm.HrmEmpEncash.employeeName" /></td>
                  <td colspan="3"><html:text  property="firstName" titleKey="hrm.HrmEmpEncash.FirstName"  size="26" styleClass="locked"  readonly="true"   alt="A" /><html:text  property="middleName" titleKey="hrm.HrmEmpEncash.MiddleName"  size="28" styleClass="locked"  readonly="true"   alt="A" /><html:text  property="lastName" titleKey="hrm.HrmEmpEncash.LastName" size="26" styleClass="locked"  readonly="true"   alt="A" /></td> 
              </tr>
              <tr>
                  <td class="labelText"><bean:message key="hrm.HrmEmpEncash.grade" /></td>
                  <td><html:text  property="grade" titleKey="hrm.HrmEmpEncash.grade" size="26" styleClass="locked"  readonly="true" alt="P"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmEmpEncash.designation" /></td>
                  <td><html:text  property="designation" titleKey="hrm.HrmEmpEncash.designation" size="26" styleClass="locked"  readonly="true" alt="P"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmEmpEncash.location" /></td>
                  <td><html:text  property="location" titleKey="hrm.HrmEmpEncash.location"  size="26" styleClass="locked"  readonly="true" alt="C"  /></td>
                  
              </tr>
              
            </table> 
    <table cellspacing=0 cellpadding=0 border=0>
         
 	 <TR>
       <TD>
        <!-- Table Starts -->
         <TABLE cellSpacing=0 cellPadding=0 >
              <TR>
                    <TD class=subHeader colspan=6>Leave Information</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.HrmLvAppln.transId" /></td>
                              <td><html:text  property="transacId" titleKey="hrm.HrmLvAppln.transId" maxlength="10" size="23" styleClass="required" name="HrmLvApplnForm" readonly="true" onchange="doChangeHeader();" /></td>             
                          
                         </tr>-->
                         <tr>
                              <html:hidden property="transacId" name="HrmLvApplnForm" />
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.dateApplied" /></td>
                              <td><html:text  property="dateApplied" titleKey="hrm.HrmLvAppln.dateApplied" size="23" styleClass="required" name="HrmLvApplnForm" readonly="true" onchange="doChangeHeader();" /><enrgise:img  width="15" height="19" align="top" styleClass="icon" name="HrmLvApplnForm" src="../includes/images/cal.gif"  property="butDateApplied"   onclick="showCalendar('dateApplied',this)"  /></td>             
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.leaveCodes" /></td>
                              <td><html:text  property="leaveCodes" titleKey="hrm.HrmLvAppln.leaveCodes" maxlength="20" size="23" styleClass="required" name="HrmLvApplnForm" readonly="true" onchange="doChangeHeader();doBaseValidate();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" property="butLeaveCodes" name="HrmLvApplnForm" onclick=" return ShowLeaveCode()" /></td>              
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.description" /></td>
                              <td><html:text  property="description" titleKey="hrm.HrmLvAppln.description"  size="26" styleClass="locked" name="HrmLvApplnForm" readonly="true" /></td>  
                        </tr>
                          
                        <tr> 
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.fromAppDate" /></td>
                              <td><html:text  property="fromAppDate" titleKey="hrm.HrmLvAppln.fromAppDate" size="23" styleClass="required" name="HrmLvApplnForm" readonly="true" onchange="doChangeHeader();" /><enrgise:img width="16" height="19" align="top" styleClass="icon" name="HrmLvApplnForm" src="../includes/images/cal.gif" property="butFromAppDate"   onclick="showCalendar('fromAppDate',this)" /></td>        
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.toAppDate" /></td>
                              <td><html:text  property="toAppDate" titleKey="hrm.HrmLvAppln.toAppDate"  size="23" styleClass="required" name="HrmLvApplnForm" readonly="true" onchange="doChangeHeader();" /><enrgise:img width="16" height="19" align="top" styleClass="icon" name="HrmLvApplnForm" src="../includes/images/cal.gif" property="butToAppDate"   onclick="showCalendar('toAppDate',this)" /></td>
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.days" /></td>
                              <td><html:text  property="days" titleKey="hrm.HrmLvAppln.days" maxlength="4" size="26" styleClass="locked" name="HrmLvApplnForm" readonly="true" onchange="doChangeHeader();" /></td>
                        </tr> 
                        <tr> 
                              <td class="labelText" width="15%"><bean:message key="hrm.HrmLvAppln.address" /></td>
                              <td><enrgise:textarea  property="address" titleKey="hrm.HrmLvAppln.address" cols="28" rows="2" styleClass="optional" name="HrmLvApplnForm" disabledClass="locked" alt="AN" onchange="doChangeHeader();" />
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.phone" /></td>
                              <td><enrgise:text  property="phone" titleKey="hrm.HrmLvAppln.phone" maxlength="20" size="26" styleClass="optional" onkeypress="isInteger(event)" name="HrmLvApplnForm" disabledClass="locked" alt="AN" onchange="doChangeHeader();" /></td>
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.purpose" /></td>
                              <td><enrgise:textarea  property="purpose" titleKey="hrm.HrmLvAppln.purpose" cols="28" rows="2" styleClass="optional" name="HrmLvApplnForm" disabledClass="locked" alt="A" onchange="doChangeHeader();" />
                         </tr> 
                         <tr>
                                  <td class="labelText" ><bean:message key="hrm.HrmLvAppln.ltaFlag" /></td>
                                  <td><enrgise:checkbox property="ltaFlag" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" titleKey="hrm.HrmLvAppln.ltaFlag" /></td>
                                  <!--  FOR SHOWING YEAR INFORMATION TO PREVENT DUPLICATE ENTRY FOR LTA APPLICATION    -->
                                  <td class="labelText" ><bean:message key="hrm.HrmLvAppln.fromYear" /></td>  
                                  <td><enrgise:text property="fromYear" titleKey="hrm.HrmLvAppln.fromYear" maxlength="4" size="26" styleClass="optional" onkeypress="isInteger(event)" name="HrmLvApplnForm" disabledClass="locked" alt="AN" onchange="doChangeHeader();" /></td>                                
                                  <td class="labelText"><bean:message key="hrm.HrmLvAppln.optedFor" /></td>
                                  <td><enrgise:select property="optedFor" alt="optedFor"  styleClass="optional" disabledClass="locked" name="HrmLvApplnForm" onchange="doChangeHeader();" >
                                    <enrgise:option value="1" ><bean:message key="hrm.HrmLvAppln.one" /></enrgise:option>
                                    <enrgise:option value="2" ><bean:message key="hrm.HrmLvAppln.two" /></enrgise:option>
                                   </enrgise:select></td>            
                                  <!--td class="labelText"><bean:message key="hrm.HrmLvAppln.statusOfLeaves" /></td>
                                  <td><html:select disabled="true"  property="statusOfLeaves" alt="statusOfLeaves"  styleClass="locked" name="HrmLvApplnForm" onchange="doChangeHeader();" >
                                    <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>      
                                    <html:option value="N" > <bean:message key="hrm.HrmLvAppln.new" /></html:option>
                                    <html:option value="P" > <bean:message key="hrm.HrmLvAppln.pending" /></html:option>
                                    <html:option value="A" > <bean:message key="hrm.HrmLvAppln.approved" /></html:option>
                                    <html:option value="R" > <bean:message key="hrm.HrmLvAppln.rejected" /></html:option>
                                    <html:option value="V" > <bean:message key="hrm.HrmLvAppln.revised" /></html:option>
                                   </html:select></td> -->
                          </tr>
                          <tr>
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.eligAmount" /></td>
                              <td><html:text property="eligAmount" size="26" titleKey="hrm.HrmLvAppln.eligAmount" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.itPercentage" /></td>
                              <td><enrgise:text property="itPercentage" size="26" maxlength="8" onchange="doChangeHeader();" titleKey="hrm.HrmLvAppln.itPercentage" styleClass="optional" disabledClass="locked" onkeypress="isInteger(event)" /></td>
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.ltaAmount" /></td>
                              <td><html:text property="ltaAmount" size="26" onchange="doChangeHeader();" readonly="true" titleKey="hrm.HrmLvAppln.ltaAmount" styleClass="locked" /></td>
                         </tr>
                         
                         <tr>
                         <td class="labelText" ><bean:message key="hrm.HrmLvAppln.medFlag" /></td>
                         <td><enrgise:checkbox property="medFlag" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" titleKey="hrm.HrmLvAppln.medFlag" /></td>
                            <td class="labelText"><bean:message key="hrm.HrmLvAppln.statusOfLeaves" /></td>
                                  <td><html:select disabled="true"  property="statusOfLeaves" alt="statusOfLeaves"  styleClass="locked" name="HrmLvApplnForm" onchange="doChangeHeader();" >
                                    <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>      
                                    <html:option value="N" > <bean:message key="hrm.HrmLvAppln.new" /></html:option>
                                    <html:option value="P" > <bean:message key="hrm.HrmLvAppln.pending" /></html:option>
                                    <html:option value="A" > <bean:message key="hrm.HrmLvAppln.approved" /></html:option>
                                    <html:option value="R" > <bean:message key="hrm.HrmLvAppln.rejected" /></html:option>
                                    <html:option value="V" > <bean:message key="hrm.HrmLvAppln.revised" /></html:option>
                                   </html:select></td>                   
                         </tr>
                         <tr>
                              <td class="labelText"><bean:message key="hrm.HrmLvAppln.remarks" /></td>
                              <td><enrgise:textarea  property="remarks" titleKey="hrm.HrmLvAppln.remarks" cols="28" rows="2" styleClass="optional" name="HrmLvApplnForm" disabledClass="locked" alt="A" onchange="doChangeHeader();" />
 
                         </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="HrmLvApplnForm" property="butLeaveApplnTab" styleClass="actTabText" disabledClass="lockedTab" src="../includes/images/formtab_r.gif" >Leave Break-Up</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:120px" >
  			<!-- Detail table starts -->
                        <TABLE cellSpacing=0 cellPadding=0>
                         <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><input type="checkbox" name="selectAll"  disabled="true"  /></td>
                              <TD class=tableHeader width="5%"><bean:message key="hrm.HrmLvAppln.date" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLvAppln.holidayFlag" /></td>
                              <TD class=tableHeader width="5%"><bean:message  key="hrm.HrmLvAppln.halfDayFlag" /></td>
                          </tr>  
                           <logic:notEmpty name="HrmLvApplnForm" property="arylstLvAppln">
                            <logic:iterate id="HrmLvAppln" name="HrmLvApplnForm" property="arylstLvAppln" type="wenrgise.hrms.bean.HrmLvApplnDtlBean" indexId="idx" >
                                      
                                         <tr class='<bean:write name="HrmLvApplnForm" property="listRowClass"/>'  >
                                              <td align="center" width="1%"><html:hidden property="status"  name="HrmLvAppln" /><html:hidden property="detailId"  name="HrmLvAppln" /><html:hidden property="itemChecked" name="HrmLvAppln" /><html:checkbox property="checked" value="check" name="HrmLvApplnForm" alt="<%=idx.toString()%>" disabled="true" /></td>
                                              <TD class=tableText ><html:text property="txtDate" size="23" name="HrmLvAppln"  titleKey="hrm.HrmLvAppln.date" styleClass="locked"  readonly="true" /></td>   
                                              <TD class=tableText>
                                              <enrgise:select property="txtHolidayFlag" titleKey="hrm.HrmLvAppln.holidayFlag" styleClass="optional" name="HrmLvAppln" disabledClass="locked" disabled="true"  >
                                                                  <enrgise:option value="" ><bean:message  key="hrm.pleaseSelect" /></enrgise:option>      
                                                                  <enrgise:option value="W" ><bean:message key="hrm.HrmLvAppln.workingDay" /></enrgise:option>      
                                                                  <enrgise:option value="S" ><bean:message key="hrm.HrmLvAppln.suffix" /></enrgise:option>
                                                                  <enrgise:option value="P" ><bean:message key="hrm.HrmLvAppln.prefix" /></enrgise:option>
                                                                  <enrgise:option value="I" ><bean:message key="hrm.HrmLvAppln.intermediate" /></enrgise:option>
                                                                  <enrgise:option value="H" ><bean:message key="hrm.HrmLvAppln.holiday" /></enrgise:option>
                                                                 </enrgise:select></td> 
                                              <html:hidden property="txtHolidayFlag" />
                                              <logic:notEqual name="HrmLvApplnForm" property="leaveCodes" value="CL" >
                                              <TD class=tableText ><enrgise:select property="txtHalfDayFlag" titleKey="hrm.HrmLvAppln.halfDayFlag" styleClass="optional" name="HrmLvAppln" disabledClass="locked" onchange="doValidateDays()" >
                                                                  <enrgise:option value="" ><bean:message  key="hrm.pleaseSelect" /></enrgise:option>      
                                                                  <enrgise:option value="1" ><bean:message key="hrm.HrmLvAppln.firstHalf" /></enrgise:option>      
                                                                  <enrgise:option value="2" ><bean:message key="hrm.HrmLvAppln.secondHalf" /></enrgise:option>
                                                                  <enrgise:option value="3" ><bean:message key="hrm.HrmLvAppln.fullDay" /></enrgise:option>
                                                                 </enrgise:select></td>  
                                              </logic:notEqual>
                                              <logic:equal name="HrmLvApplnForm" property="leaveCodes" value="CL" >
                                              <TD class=tableText ><enrgise:select property="txtHalfDayFlag" titleKey="hrm.HrmLvAppln.halfDayFlag" styleClass="optional" name="HrmLvAppln" disabledClass="locked" onchange="doValidateDays()" >     
                                                                  <enrgise:option value="3" ><bean:message key="hrm.HrmLvAppln.fullDay" /></enrgise:option>  
                                                                  </enrgise:select></td>
                                              </logic:equal>
                                              <html:hidden property="txtHalfDayFlag" />
                                              
                                        </tr>
                           
                            
                         </logic:iterate>
                         </logic:notEmpty> 
                  
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
                <!--Detail Menu -->
                <bean:define id="pageNo" name="ParentForm" property="pageRequested" toScope="request" />
                <bean:define id="maxPage" name="ParentForm" property="totalPageCount" toScope="request" />
                <TABLE border=0>
                  <tbody>
                  <TR>
                    <TD >
                    <enrgise:button altKey="wenrgise.common.getDetail"  onclick="doBaseGetDetail()" property="butGetDetail" name="ParentForm" styleClass="bottomBarText">Show&nbsp;Breakup</enrgise:button> 
                    <enrgise:button altKey="wenrgise.common.addRow" name="ParentForm"  onclick="doBaseAddRow()" property="butAddRow"  styleClass="bottomBarText" disabled="true" >&nbsp;&nbsp;Add&nbsp;<u>R</u>ow&nbsp;&nbsp;</enrgise:button>
                    <enrgise:button altKey="wenrgise.common.delRow" name="ParentForm" onclick="doBaseDelRow()"
                    property="butDelRow" styleClass="bottomBarText" disabled="true" ><u>D</u>elete Row</enrgise:button></TD>
                    <td width=45%></td>	
                    <TD ><enrgise:img name="ParentForm" property="butPrevDetail" src="../includes/images/butn_dtl_prev.jpg" onmouseover='this.src="../includes/images/butn_dtl_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_dtl_prev.jpg"' alt="Butn_prev (Alt+<)"  onclick="doBasePrevDetail()"/></td>
                    <td class=dtlNavText><bean:write  name="pageNo" /> of 
                    <bean:write name="maxPage" /></td></td>
                    <td  align=right><enrgise:img name="ParentForm" property="butNextDetail" src="../includes/images/butn_dtl_next.jpg" onmouseover='this.src="../includes/images/butn_dtl_next_act.jpg"' onmouseout='this.src="../includes/images/butn_dtl_next.jpg"' alt="Butn_next (Alt+>)" onclick="doBaseNextDetail()"/></td>
                    <td  align=right><enrgise:text property="newPageRequested" size="1" onkeydown="isInteger(event)" styleClass="optional" disabledClass="locked" alt="N" titleKey="wenrgise.common.jumpDetail" /></td>
                    <td ><enrgise:img name="ParentForm" property="butJumpDetail" altKey="wenrgise.common.go" src="../includes/images/go_dtl.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpDetail()" /></td>		     
                  </TR>
                
                  </tbody>
                </TABLE>

                <!--Detail Menu -->
		            </TD>
		            <td> </td>
                 
               </tr>
        </TABLE>
      </td>
     </tr>
     
  </TABLE>
</td>
</tr>
<!-- Bottom Blue Bar -->

       <TR>
            <td>
               <TABLE  cellspacing="0" cellpadding="0" border=0>
                     <tr>
                        <td width=35% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <td  bgColor=#4682b4><enrgise:button  onclick="doBaseSave()" name="HrmLvApplnForm" property="butApply" styleClass="bottomBarText">A<u>p</u>ply Leave</enrgise:button>
                        <enrgise:button  alt="Approve (Alt+P)" onclick="doBaseApprove()" name="HrmLvApplnForm" property="butApprove" styleClass="bottomBarText">A<u>p</u>prove</enrgise:button><enrgise:button  alt="Reject (Alt+J)"  onclick="doBaseReject()"  name="HrmLvApplnForm" property="butReject" styleClass="bottomBarText">&nbsp;&nbsp;Re<u>j</u>ect&nbsp;</enrgise:button>
                        <!--<enrgise:button  onclick="doGetReport()"  name="HrmLvApplnForm" property="butLedger" styleClass="bottomBarText" >Show Ledger</enrgise:button></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>
</TBODY>
</TABLE>

<!-- Container Table Ends -->
<!--Common Hiddens -->
<html:hidden property="screenName" name="HrmLvApplnForm" value="HrmLvAppln" />
<html:hidden name="HrmLvApplnForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmLvApplnForm" />
<html:hidden property="screenMode" name="HrmLvApplnForm" />
<html:hidden property="userPageRequested" name="HrmLvApplnForm" />
<html:hidden property="userPositionRequested" name="HrmLvApplnForm" />
<html:hidden property="pageRequested" name="HrmLvApplnForm" />
<html:hidden property="hdnDetailId" name="HrmLvApplnForm" />
<html:hidden property="lovKey" name="HrmLvApplnForm"  />
<html:hidden property="txtSearchFields" name="HrmLvApplnForm"  />
<html:hidden property="txtDisplayFields" name="HrmLvApplnForm"  />
<html:hidden property="txtIndex" name="HrmLvApplnForm"  />
<html:hidden property="headerDataChanged" name="HrmLvApplnForm"  />
<html:hidden property="detailDataChanged" name="HrmLvApplnForm"  />
<html:hidden property="headerPrimaryKey" name="HrmLvApplnForm"  />
<html:hidden property="employeeId" name="HrmLvApplnForm"  />
<html:hidden property="buttonName" name="HrmLvApplnForm"  />
<html:hidden property="firstLoad" name="HrmLvApplnForm"  />
<html:hidden property="confirmKey" name="HrmLvApplnForm"  />
<html:hidden property="buttonKeys" name="HrmLvApplnForm"  />
<html:hidden property="workListId" name="HrmLvApplnForm"  />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >
<!--Common Hiddens -->
<%! String sTransId; %>
<%sTransId=request.getParameter("transId");%>

<html:hidden property="transId" value="<%=sTransId%>" />

<!--Screen Specific Hiddens -->

<html:hidden property="leaveTypeId" name="HrmLvApplnForm"  />
<!--Screen Specific Hiddens -->
</html:form>
</body>
</html:html>
<% ReportReader oReportReader=new ReportReader(); %> 
<% ParamUtil oParamUtil=new ParamUtil(); %> 

<script language="javascript">

function doChangeHeader()
{

 if(document.forms[0].screenMode.value=="U" || document.forms[0].screenMode.value=="N")

 document.forms[0].headerDataChanged.value="true";
}

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


function doInsertMode()
{

  return "HrmLvApplnNewModeAction.do";
}


function doExecute()
{

  return "HrmLvApplnGetHeaderAction.do";
}

function doSave()
{
  if(document.forms[0].txtHalfDayFlag)
  {
    for(i=0;i<document.forms[0].txtHalfDayFlag.length;i=i+2)
    {
      document.forms[0].txtHalfDayFlag[i].disabled=true;
      document.forms[0].txtHalfDayFlag[i+1].value=document.forms[0].txtHalfDayFlag[i].value;
    }
    for(i=0;i<document.forms[0].txtHolidayFlag.length;i=i+2)
    {
      document.forms[0].txtHolidayFlag[i+1].value=document.forms[0].txtHolidayFlag[i].value;
    }
  }
  return "HrmLvApplnSaveAction.do";
}

function doDelete()
{
  return "HrmLvApplnDeleteAction.do";
}

function doRefresh()
{
  return "HrmLvApplnRefreshAction.do";
}

function doPrevHeader()
{
  return "HrmLvApplnGetNextHeaderAction.do"; 
}

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

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

<!-- Leave breakup -->
function doGetDetail()
{
  if(document.forms[0].fromAppDate.value=="" || document.forms[0].toAppDate.value=="" )
  {
   // document.forms[0].buttonKeys.value="wenrgise.common.ok,wenrgise.common.cancel";
   // document.forms[0].confirmKey.value="hrm.HrmLvAppln.selectDates";
   // showConfirm('<html:rewrite page="/hrms/jsp/GenConfirmScreen.jsp" />','HrmLvApplnForm');
    
  }
  else
  {
  return "HrmLvApplnGetDetailAction.do";
  }
}
<!-- Leave breakup -->


function doAddRow()
{

  return "HrmLvApplnAddRowAction.do"; 
}
function doExit()
{

  return "HrmLvApplnExitAction.do"; 
}

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

function doGetDetailTableName()
{
  return "arylstLvAppln";
}

function doPrevDetail()
{

  return "HrmLvApplnGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmLvApplnGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmLvApplnGetDetailPageAction.do"; 
}


function doValidate()
{
  return "HrmLvApplnValidateAction.do"; 
}
function doValidateDays()
{
  count=0.0;
  
  for(i=0; i< document.forms[0].txtHalfDayFlag.length; i=i+2)
  {
    if(document.forms[0].txtHolidayFlag[i].value!="H")
    {
      if(document.forms[0].txtHalfDayFlag[i].value=="3")
         count+=1.0;
      else
         count+=0.5;
    }   
  }
  document.forms[0].days.value=count;
  
  
  //document.forms[0].action= contextRoot + "HrmLvApplnHalfDayAction.do";
  //document.forms[0].submit();
}

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

function ShowNextPage()
{     
    window.open('<html:rewrite page="/hrms/jsp/HrmLeaveBreakUp.jsp" />','HrmLvApplnForm');
    return true;   
}

function ShowLeaveCode()
{
    document.forms[0].lovKey.value = "LvApplnLeaveCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmLvAppln.description";
    document.forms[0].txtDisplayFields.value = "leaveTypeId,leaveCodes,description";
    document.forms[0].multipleFlag.value = "false";
    document.forms[0].queryParam.value="empId="+document.forms[0].employeeId.value;
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLvApplnForm');
    return true;
}
function doOnChangeLov(lovName)
{
   if((lovName=="LvApplnLeaveCodeHrmLvApplnN"))
    {
      doBaseValidate();
    }
    if((lovName=="LvApplnEmpNoHrmLvApplnQ") || (lovName=="LvApplnEmpNoHrmLvApplnN"))
    {
      doBaseValidate();
    }
    if((lovName=="LvApplnLeaveCodeHrmLvApplnQ"))
    {
      doBaseValidate();
    }
}
function doSubmit()
{
  document.forms[0].buttonName.value="butSubmit";
  return "HrmLvApplnGetButtonAction.do";
}

function doApprove()
{
   document.forms[0].buttonName.value="butApprove";
   return "HrmLvApplnGetButtonAction.do";
}
function doReject()
{
  document.forms[0].buttonName.value="butReject";
  return "HrmLvApplnGetButtonAction.do";
}
function doCancel()
{
  document.forms[0].buttonName.value="butCancel";
  return "HrmLvApplnGetButtonAction.do";
}
function ShowEmployeeNo()
{
        document.forms[0].lovKey.value = "LvApplnEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmEmpLoanAppln.employeeNumber,hrm.HrmEmpLoanAppln.employeeName";
        document.forms[0].txtDisplayFields.value = "employeeId,employeeNumber,firstName,middleName,lastName,grade,designation,location";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAdvApplnForm');
        return true;
}

</script>
