<%@ 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" />
</head>


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

<html:form name="HrmLoanMstForm" action="HrmLoanMstBaseAction" type="wenrgise.hrms.webtier.form.HrmLnMstForm">
<bean:define id="ParentForm" name="HrmLoanMstForm" 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.HrmLoanMstMainHeader" /></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 >
        <!--Inspection Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmLoanMstSubHeader" /></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.HrmLoanMst.loanCode" /></td>
                  <td colspan="3"><enrgise:text  property="loanCode" altKey="hrm.HrmLoanMst.loanCode" size="23" styleClass="required" disabledClass="required" onchange="doChangeHeader();" /><enrgise:img name="HrmLoanMstForm"  height="16" align="center" src="../includes/images/lov.jpg" property="butLoanCode"  onclick="return ShowLoanCode()" />
                  <enrgise:text property="loanName" altKey="hrm.HrmLoanMst.loanName" disabledClass="required" size="72" styleClass="locked" onchange="doChangeHeader();" /></td>
                  <td class="labelText"><bean:message  key="hrm.HrmLoanMst.typeOfInterest" /></td>
                  <td><enrgise:select property="typeOfInterest" altKey="hrm.HrmLoanMst.typeOfInterest" styleClass="required" disabledClass="optional" onchange="doChangeHeader();doBaseValidate();" >
                  <enrgise:option value="" ><bean:message key="hrm.pleaseSelect" /></enrgise:option>
                  <enrgise:option value="S" ><bean:message key="hrm.HrmLoanMst.simpleInterest" /></enrgise:option>
                  <enrgise:option value="A" ><bean:message key="hrm.HrmLoanMst.asPerChart" /></enrgise:option>
                  <enrgise:option value="R" ><bean:message key="hrm.HrmLoanMst.reducingBalance" /></enrgise:option>
                  </enrgise:select>
                
                 </td>                  
                           
            </TR>
           
            <tr>               
               <td class=labelText ><bean:message key="hrm.HrmLoanMst.chartName" /></td>
               
               <logic:notEqual property="typeOfInterest" name="HrmLoanMstForm" value="A" >
               <td><html:text  property="chartName" altKey="hrm.HrmLoanMst.chartName" maxlength="15" size="23" styleClass="locked" readonly="true" onchange="doChangeHeader();" /><img height="16" align="center" src="../includes/images/lov_dis.jpg" name="butChartName"   /></td>
                </logic:notEqual>
               <logic:equal property="typeOfInterest" name="HrmLoanMstForm" value="A" >
               <td><html:text  property="chartName" altKey="hrm.HrmLoanMst.chartName" maxlength="15" size="23" styleClass="required"  readonly="true" onchange="doChangeHeader();" /><img height="16" align="center" class="icon" src="../includes/images/lov.jpg" name="butChartName"  onclick="return ShowChartName();" /></td>
               </logic:equal>
              <td class="labelText"><bean:message  key="hrm.HrmLoanMst.natureOfPayment" /></td>
              <td><enrgise:select property="natureOfPayment" altKey="hrm.HrmLoanMst.natureOfPayment" styleClass="required" disabledClass="optional" onchange="doChangeHeader();" >
                  <enrgise:option value="" ><bean:message key="hrm.pleaseSelect" /></enrgise:option>
                  <enrgise:option value="P" styleClass="labelText" > <bean:message key="hrm.HrmLoanMst.principleFirst" /></enrgise:option>
                   <enrgise:option value="I" styleClass="labelText" > <bean:message key="hrm.HrmLoanMst.interestFirst" /></enrgise:option>
                  <enrgise:option value="B" styleClass="labelText" > <bean:message key="hrm.HrmLoanMst.both" /></enrgise:option>
                  </enrgise:select>
              </td>
              
            </tr>
            <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>
            <!-- Tab Table Starts -->
            <TABLE cellSpacing=0 cellPadding=0 >
            <tr>                                             
                          <td bgcolor="#4682B4"><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <td bgcolor="#4682B4" nowrap class=actTabText ><bean:message  key="hrm.HrmLoanMstTableHeader" /><img src="../includes/images/pixel.gif" width="10" height="1" border="0"></td>
                          <TD><IMG height=19  src="../includes/images/formtab_r.gif" width=10  border=0></TD>                              
                          <TD width="85%" background="../includes/images/line_t.gif">&nbsp;</TD>
                          <TD background="../includes/images/line_t.gif"><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
            </tr>
              <TR height=10>
              
            <!-- Detail table Container starts -->
              <TD colSpan=5>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:200px;width:1010px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0 id="HrmLoanMst">
                     <TBODY>
                          <tr>                            
                            <TD class=tableHeader width="1%"><html:checkbox property="selectAll"  onclick="toggleCheckBox('checked')" /></TD>
                            <TD class=tableHeader width="13%" ><bean:message key="hrm.HrmLoanMst.loanDetailCode" /></td>
                            <TD class=tableHeader width="13%" ><bean:message  key="hrm.HrmLoanMst.greaterLessNotApplicable" /></td>
                            <TD class=tableHeader  width="12%"><bean:message key="hrm.HrmLoanMst.maxLimit" /></td>
                            <TD class=tableHeader width="12%" ><bean:message  key="hrm.HrmLoanMst.maximumLoanPerc" /></td>
                            <TD class=tableHeader width="12%" ><bean:message key="hrm.HrmLoanMst.noOfMonthsSalary" /></td>
                            <TD class=tableHeader width="12%" ><bean:message key="hrm.HrmLoanMst.minYrsOfServiceToBeCompleted" /></td>
                            <TD class=tableHeader width="12%" ><bean:message key="hrm.HrmLoanMst.minYrsOfRemainingService" /></td>
                            <TD class=tableHeader width="14%" ><bean:message  key="hrm.HrmLoanMst.companyPolicyStDate" /></td>
                            <TD class=tableHeader width="14%" ><bean:message  key="hrm.HrmLoanMst.companyPolicyToDate" /></td>
                            <TD class=tableHeader width="9%" ><bean:message key="hrm.HrmLoanMst.appliedToAllEmployee" /></td>                                                                 
                        </tr>
                        
                         <logic:notEmpty name="HrmLoanMstForm" property="arrHrmLoanMstDtl" >
                            <logic:iterate id="HrmLoanMst" name="HrmLoanMstForm" property="arrHrmLoanMstDtl" type="wenrgise.hrms.bean.HrmLnMstDtlBean" indexId="idx" >
                                <logic:notEqual name="HrmLoanMst" property="status" value="D" >
                                            <tr>
                                              <td ><html:hidden property="allEmployeeApplicable"  name="HrmLoanMst" /><html:hidden property="status"  name="HrmLoanMst" /><html:hidden property="detailId"  name="HrmLoanMst"  /><html:hidden property="itemChecked" name="HrmLoanMst" /><html:checkbox property="checked"  name="HrmLoanMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /></td>
                                              <TD class=tableText ><html:text property="txtLoanDetailCode" name="HrmLoanMst" maxlength="60" size="25" alt="<%=idx.toString()%>"  styleClass="required" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD ><html:select property="txtGreaterLessNotApplicable" name="HrmLoanMst" styleClass="required" onchange='<%="doChangeDetail("+idx.toString()+");doBaseValidate()"%>' >
                                                   <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>
                                                    <html:option value="G" ><bean:message   key="hrm.HrmLoanMst.greater" /></html:option>
                                                     <html:option value="L" ><bean:message   key="hrm.HrmLoanMst.lesser" /></html:option>
                                                      <html:option value="F" ><bean:message   key="hrm.HrmLoanMst.flatAmount" /></html:option>
                                                      <html:option value="S" ><bean:message   key="hrm.HrmLoanMst.salery" /></html:option>
                                               </html:select>
                                              </td>                                              
                                              <logic:equal property="txtGreaterLessNotApplicable" name="HrmLoanMst" value="G">
                                              <TD class=tableText ><html:text property="txtMaxLimit" styleClass="required" onkeydown="isInteger(event)" maxlength="8" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtMaximumLoanPerc" styleClass="required" maxlength="6" onkeydown="isFloat(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>                                
                                              <TD class=tableText><html:text property="txtNoOfMonthsSalary" styleClass="required" maxlength="3" onkeydown="isInteger(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              </logic:equal>
                                              <logic:equal property="txtGreaterLessNotApplicable" name="HrmLoanMst" value="L">
                                              <TD class=tableText ><html:text property="txtMaxLimit" styleClass="required" onkeydown="isInteger(event)" maxlength="8" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtMaximumLoanPerc" styleClass="required" maxlength="6" onkeydown="isFloat(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>                                
                                              <TD class=tableText><html:text property="txtNoOfMonthsSalary" styleClass="required" maxlength="3" onkeydown="isInteger(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              </logic:equal>
                                              <logic:equal property="txtGreaterLessNotApplicable" name="HrmLoanMst" value="F">
                                              <TD class=tableText ><html:text property="txtMaxLimit" styleClass="required" onkeydown="isInteger(event)" maxlength="8" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtMaximumLoanPerc" styleClass="locked" value="" readonly="true" maxlength="6" onkeydown="isFloat(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>                                
                                              <TD class=tableText><html:text property="txtNoOfMonthsSalary" styleClass="locked" value="" readonly="true" maxlength="3" onkeydown="isInteger(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              </logic:equal>
                                              <logic:equal property="txtGreaterLessNotApplicable" name="HrmLoanMst" value="S">
                                              <TD class=tableText ><html:text property="txtMaxLimit" styleClass="locked" readonly="true" value="" onkeydown="isInteger(event)" maxlength="8" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtMaximumLoanPerc" styleClass="required" maxlength="6" onkeydown="isFloat(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>                                
                                              <TD class=tableText><html:text property="txtNoOfMonthsSalary" styleClass="required" maxlength="3" onkeydown="isInteger(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              </logic:equal>
                                              <logic:equal property="txtGreaterLessNotApplicable" name="HrmLoanMst" value="">
                                              <TD class=tableText ><html:text property="txtMaxLimit" styleClass="optional" readonly="true" onkeydown="isInteger(event)" maxlength="8" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtMaximumLoanPerc" styleClass="optional" readonly="true" maxlength="6" onkeydown="isFloat(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>                                
                                              <TD class=tableText><html:text property="txtNoOfMonthsSalary" styleClass="optional" readonly="true" maxlength="3" onkeydown="isInteger(event)" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              </logic:equal>
                                              
                                              <TD class=tableText ><html:text property="txtMinYrsOfServiceToBeCompleted" styleClass="optional" onkeypress="isNumber(event)" maxlength="2" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="txtMinYrsOfRemainingService" styleClass="optional" onkeypress="isNumber(event)" maxlength="2" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtCompanyPolicyStDate" styleClass="required" name="HrmLoanMst" readonly="true" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /><enrgise:img name="HrmLoanMstForm"   width="16" height="19" align="top" src="../includes/images/cal.gif" property="butTxtCompanyPolicyStDate"  alt="<%=idx.toString()%>"  onclick="showCalendar('txtCompanyPolicyStDate',this)"  /></td>                                
                                              <TD class=tableText><html:text property="txtCompanyPolicyToDate" styleClass="optional" name="HrmLoanMst" readonly="true" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /><enrgise:img name="HrmLoanMstForm"   width="16" height="19" align="top" src="../includes/images/cal.gif" property="butTxtCompanyPolicyToDate"  alt="<%=idx.toString()%>"  onclick="showCalendar('txtCompanyPolicyToDate',this)"  /></td>                                
                                              <TD class=tableText><html:checkbox property="txtAppliedToAllEmployee" styleClass="optional" name="HrmLoanMst" onchange='<%="doChangeDetail("+idx.toString()+")"%>'  /></td>                                
                                           </tr>
                                </logic:notEqual>
                                 <logic:equal name="HrmLoanMst" property="status" value="D"  >
                                           <tr>
                                              <td ><html:hidden property="allEmployeeApplicable"  name="HrmLoanMst" /><html:hidden property="status"  name="HrmLoanMst" /><html:hidden property="detailId"  name="HrmLoanMst"  /><html:hidden property="itemChecked" name="HrmLoanMst" /><html:checkbox property="checked"  name="HrmLoanMstForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /></td>
                                              <TD class=tableText ><html:text property="txtLoanDetailCode" name="HrmLoanMst"  alt="<%=idx.toString()%>"  styleClass="deletedRow" readonly="true"   onchange="doChangeDetail(this.alt);" /></td>   
                                             <html:hidden property="txtGreaterLessNotApplicable"  name="HrmLoanMst" />
                                              <TD ><html:select property="txtGreaterLessNotApplicable" name="HrmLoanMst" styleClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>' >
                                                   <html:option value="" ><bean:message   key="hrm.pleaseSelect" /></html:option>
                                                    <html:option value="G" ><bean:message   key="hrm.HrmLoanMst.greater" /></html:option>
                                                     <html:option value="L" ><bean:message   key="hrm.HrmLoanMst.lesser" /></html:option>
                                                     <html:option value="F" ><bean:message   key="hrm.HrmLoanMst.flatAmount" /></html:option>
                                               </html:select>
                                              </td>                                
                                              <TD class=tableText ><html:text property="txtMaxLimit" styleClass="deletedRow" readonly="true" name="HrmLoanMst"  alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtMaximumLoanPerc" styleClass="deletedRow" readonly="true" name="HrmLoanMst"  alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>                                
                                              <TD class=tableText ><html:text property="txtNoOfMonthsSalary" styleClass="deletedRow" readonly="true" name="HrmLoanMst"  alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="txtMinYrsOfServiceToBeCompleted" styleClass="deletedRow" readonly="true" maxlength="8" name="HrmLoanMst"  alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText ><html:text property="txtMinYrsOfRemainingService" styleClass="deletedRow" readonly="true" maxlength="8" name="HrmLoanMst"  alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /></td>   
                                              <TD class=tableText><html:text property="txtCompanyPolicyStDate" styleClass="deletedRow" readonly="true" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /><enrgise:img name="HrmLoanMstForm"   width="16" height="19" align="top" src="../includes/images/cal.gif" property="butTxtCompanyPolicyStDate"  alt="<%=idx.toString()%>"  onclick="showCalendar('txtCompanyPolicyStDate',this)"  /></td>                                
                                              <TD class=tableText><html:text property="txtCompanyPolicyToDate" styleClass="deletedRow" readonly="true" name="HrmLoanMst" alt="<%=idx.toString()%>" onchange="doChangeDetail(this.alt);" /><enrgise:img name="HrmLoanMstForm"   width="16" height="19" align="top" src="../includes/images/cal.gif" property="butTxtCompanyPolicyToDate"  alt="<%=idx.toString()%>"  onclick="showCalendar('txtCompanyPolicyToDate',this)"  /></td>                                
                                              <TD class=tableText><html:checkbox property="txtAppliedToAllEmployee" styleClass="deletedRow"  name="HrmLoanMst"  alt="<%=idx.toString()%>" onclick="doCheckInitialise(this,this.alt);" onchange="doChangeDetail(this.alt);"  /></td>                                
                                           </tr>
                                  </logic:equal>         
                          </logic:iterate>
                        </logic:notEmpty>
                        
                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td colspan="6">	
                <!--Buttons for Add Row and Save row-->
                   <jsp:include page="GenDetailMenu.jsp" flush="true" />
		            </TD>
		            <td> </td>
               </tr>
        </TABLE>
      </td>
     </tr>
      <TR>
        <TD background="../includes/images/line_r.gif"><IMG src="../includes/images/pixel.gif" border=0></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-->
    
</TBODY>
</TABLE>
<html:hidden name="HrmLoanMstForm"  property="screenMode" />
<html:hidden name="HrmLoanMstForm"  property="screenName" value="HrmLnMst" />
<html:hidden name="HrmLoanMstForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmLoanMstForm" />
<html:hidden property="lovKey" name="HrmLoanMstForm"  />
<html:hidden property="txtSearchFields" name="HrmLoanMstForm"  />
<html:hidden property="txtDisplayFields" name="HrmLoanMstForm"  />
<html:hidden property="txtIndex" name="HrmLoanMstForm"  />
<html:hidden property="userPageRequested"  />
<html:hidden property="userPositionRequested" />
<html:hidden property="pageRequested" />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >
<html:hidden property="loanCodeId" name="HrmLoanMstForm" />
<html:hidden property="headerPrimaryKey" name="HrmLoanMstForm" />
<html:hidden property="headerDataChanged" name="HrmLoanMstForm" />
<html:hidden property="detailDataChanged" name="HrmLoanMstForm" />
<html:hidden property="chartNameId" name="HrmLoanMstForm" />
<html:hidden property="firstLoad" name="HrmLoanMstForm"  />
<!-- Container Table Ends -->

</html:form>
</body>
</html:html>

<script>

function doCheckInitialise(elem, i)
{
  i=i*2;
  //alert(document.getElementsByName(elem.name).length +" " + elem.name+ " " + i);
  
  if(elem.checked){
    document.getElementsByName(elem.name)[i+1].value="on";
  }
  else{
    document.getElementsByName(elem.name)[i+1].value="off";
  }

  
}

function doChangeHeader()
{
 HrmLoanMstForm.headerDataChanged.value="true";
}
function doQueryMode()
{

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

  return "HrmLoanMstExitAction.do";
}

function doInsertMode()
{

  return "HrmLoanMstNewModeAction.do";
}


function doExecute()
{

  return "HrmLoanMstGetHeaderAction.do";
}

function doSave()
{  
   var oTable = document.getElementsByName(doGetDetailTableName())[0];
    if(oTable == null)
    {
      return;
    }
    var iTr2 = parseInt(oTable.rows.length)-1;  
for(i=0; i<iTr2; i++)
{
if(document.getElementsByName("txtAppliedToAllEmployee")[i].checked)
  {   
    document.getElementsByName("allEmployeeApplicable")[i].value = "Y";
   }
  else
  {  
  document.getElementsByName("allEmployeeApplicable")[i].value = "N";
  }
  } 
  return "HrmLoanMstSaveAction.do";  
}

function doDelete()
{

  return "HrmLoanMstDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmLoanMstRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmLoanMstGetDetailAction.do";
}

function doAddRow()
{

  return "HrmLoanMstAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "HrmLoanMst";
}

function doPrevDetail()
{

  return "HrmLoanMstGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmLoanMstGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmLoanMstGetDetailPageAction.do"; 
}
function doOnLoad()
{  
  if(HrmLoanMstForm.firstLoad.value!="false")
  {
    return  "HrmLoanMstOnLoadAction.do"; 
  }
}
function ShowLoanCode()
{
        document.forms[0].lovKey.value = "HrmLoanCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLoanMst.loanCode,hrm.HrmLoanMst.loanName";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,loanCode,loanName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLoanMstForm');
        return true;        
}


function ShowChartName()
{
        document.forms[0].lovKey.value = "HrmChartCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLoanMst.chartName";
        document.forms[0].txtDisplayFields.value = "chartNameId,chartName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLoanMstForm');
        return true;
        
}

function doGetInsertData()
{
}
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
function doValidate()
{
  return  "HrmLoanMstValidateAction.do"; 
}
function preSaveDetail()
{

 for(i=0 ; i < document.forms[0].txtAppliedToAllEmployee.length; i++)
  {
    document.forms[0].txtAppliedToAllEmployee[i].checked=false
  }
  
}

function doChangeText(val)
{
 //alert("in");
  if(document.getElementsByName("txtAppliedToAllEmployee")[val].checked)
  {  
    //alert("YES");
    document.getElementsByName("allEmployeeApplicable")[val].value = "Y";
   }
  else
  {
  //alert("No");
  document.getElementsByName("allEmployeeApplicable")[val].value = "N";
  }
}


</script>
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
              
      