<%@ 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="HrmLCForm" action="HrmLCBaseAction" type="wenrgise.hrms.webtier.form.HrmLnChartForm">
<bean:define id="ParentForm" name="HrmLCForm" toScope="request" />
<jsp:include page="GenMenu.jsp" flush="true" />
<bean:define id="left" name="ParentForm" property="positionRequested"/>
<bean:define id="right" name="ParentForm" property="totalCount"/>
<table cellSpacing=0 bgColor=#bdd0ef>
<tr height=27>
  <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()" />
    <img name="ParentForm" property="butDelete" src="../includes/images/delete_dis.jpg" /><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="4" onkeypress="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>

<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message  key="hrm.HrmLC.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 >
        <!--Inspection Header Starts -->
            <TR>
                  <TD class=subHeader colspan=6><bean:message  key="hrm.HrmLC.subHeader" /></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.HrmLC.chartName" /></td>
                  <td><enrgise:text  property="chartName" titleKey="hrm.HrmLC.chartName" maxlength="15" size="23" name="HrmLCForm" styleClass="required"  disabledClass="required" onchange="doChangeHeader();" /><enrgise:img name="HrmLCForm" height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butChartName"  onclick="return ShowLoanChartName();" /></td>
                            
            </TR>
            <TR>
                  <td class=labelText><bean:message key="hrm.HrmLC.effectiveFromDate" /></td>
                  <td><html:text  property="effectiveFromDate" titleKey="hrm.HrmLC.effectiveFromDate" maxlength="15" size="23" name="HrmLCForm" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img name="HrmLCForm" width="15" height="19" align="top" src="../includes/images/cal.gif" styleClass="icon" property="butEffectiveFromDate"   onclick="showCalendar('effectiveFromDate',this)" /></td>
                  
                  <td class=labelText><bean:message key="hrm.HrmLC.effectiveToDate" /></td>
                  <td><html:text  property="effectiveToDate" titleKey="hrm.HrmLC.effectiveToDate" maxlength="15" size="23" name="HrmLCForm" styleClass="locked" readonly="true" onchange="doChangeHeader();" /><enrgise:img name="HrmLCForm" width="15" height="19" align="top" src="../includes/images/cal.gif" styleClass="icon" property="butEffectiveToDate" onclick="showCalendar('effectiveToDate',this)"  />
                  <html:hidden  property="interestRate" name="HrmLCForm" /></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>
            <!-- 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.HrmLC.tabHeader" /><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="100%" 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>
                <td bgcolor="#4682B4" ></td>
                <enrgise:tab name="HrmLCForm" property="butLoanChartTab" styleClass="actTabText" disabledClass="lockedTab" src="../includes/images/formtab_r.gif" ><bean:message key="hrm.HrmLC.tabHeader" /></enrgise:tab>
                <td width="85%"> </td>
             </tr>-->
              <!-- Detail table Container starts -->
              <TD colSpan=6>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:150px;width:1010px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0>
                     <TBODY>
                          <tr>
                            <TD class=tableHeader width="1%"><html:checkbox property="selectAll" onclick="toggleCheckBox('checked')" /></TD>
                            <TD class=tableHeader><bean:message key="hrm.HrmLC.txtLoanAmt" /></td>
                            <TD class=tableHeader><bean:message  key="hrm.HrmLC.txtNumberOfInstallments" /></td>
                            <TD class=tableHeader><bean:message  key="hrm.HrmLC.txtPrincipal" /></td>
                            <TD class=tableHeader><bean:message  key="hrm.HrmLC.txtInterest" /></td>
                            <TD class=tableHeader><bean:message  key="hrm.HrmLC.txtEqualMonthlyInstallment" /></td>
                                                      
                         </tr>
                         
                          <logic:notEmpty name="HrmLCForm" property="arrHrmLoanChartDtl" >
                      
                           <logic:iterate id="HrmLoanChart" name="HrmLCForm" property="arrHrmLoanChartDtl" type="wenrgise.hrms.bean.HrmLnChartDtlBean" indexId="idx" >
                                         <logic:notEqual name="HrmLoanChart" property="status" value="D" >
                                             <tr class='<bean:write name="HrmLCForm" property="listRowClass"/>'  >
                                                <td width="1%"><html:checkbox property="checked" value="check" name="HrmLCForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" />    
                                                <html:hidden property="itemChecked" name="HrmLoanChart" />
                                                <html:hidden property="status" name="HrmLoanChart" />
                                                <html:hidden property="detailId"  name="HrmLoanChart" />
                                                </td>            
                                                <TD class=tableText ><html:text property="txtLoanAmt" size="15" titleKey="hrm.HrmLC.txtLoanAmt" maxlength="8" name="HrmLoanChart" style="width:100%" styleClass="required" alt="P" onchange='<%="doChangeDetail("+idx.toString()+")"%>' onkeypress="isInteger(event);" /></td>
                                                <TD class=tableText ><html:text property="txtNumberOfInstallments" size="15" titleKey="hrm.HrmLC.txtNumberOfInstallments" name="HrmLoanChart" maxlength="3" style="width:100%" styleClass="required" onchange='<%="doChangeDetail("+idx.toString()+")"%>' onkeypress="isInteger(event);" /></td>
                                                <TD class=tableText ><html:text property="txtPrincipal" size="15" titleKey="hrm.HrmLC.txtPrincipal" name="HrmLoanChart" maxlength="6" style="width:100%" styleClass="required" onchange='<%="doChangeDetail("+idx.toString()+")"%>' onkeypress="isInteger(event);" /></td>
                                                <TD class=tableText ><html:text property="txtInterest" size="15" titleKey="hrm.HrmLC.txtInterest" name="HrmLoanChart" maxlength="5" style="width:100%" styleClass="required" onchange='<%="doChangeDetail("+idx.toString()+")"%>' onkeypress="isInteger(event);" /></td>
                                                <TD class=tableText ><html:text property="txtEqualMonthlyInstallment" size="15" titleKey="hrm.HrmLC.txtEqualMonthlyInstallment" name="HrmLoanChart" style="width:100%" styleClass="locked" onchange='<%="doChangeDetail("+idx.toString()+")"%>' readonly="true" /></td>
                                             </tr>
                     
                                        </logic:notEqual>
                                        <logic:equal name="HrmLoanChart" property="status" value="D"  >
                                              <tr class='<bean:write name="HrmLCForm" property="listRowClass"/>'  >
                                                  <td width="1%"><html:checkbox property="checked" value="check" disabled="true" name="HrmLCForm" alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" />    
                                                  <html:hidden property="itemChecked" name="HrmLoanChart" /><html:hidden property="status" name="HrmLoanChart" /><html:hidden property="detailId"  name="HrmLoanChart" /></td>            
                                                   <TD class=tableText ><html:text property="txtLoanAmt" size="15" titleKey="hrm.HrmLC.txtLoanAmt" name="HrmLoanChart" style="width:100%" styleClass="deletedRow" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" readonly="true" /></td>
                                                   <TD class=tableText ><html:text property="txtNumberOfInstallments" size="15" titleKey="hrm.HrmLC.txtNumberOfInstallments" name="HrmLoanChart" style="width:100%" styleClass="deletedRow" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" readonly="true" /></td>
                                                   <TD class=tableText ><html:text property="txtPrincipal" size="15" titleKey="hrm.HrmLC.txtPrincipal" name="HrmLoanChart" style="width:100%" styleClass="deletedRow" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" readonly="true" /></td>
                                                   <TD class=tableText ><html:text property="txtInterest" size="15" titleKey="hrm.HrmLC.txtInterest" name="HrmLoanChart" style="width:100%" styleClass="deletedRow" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" readonly="true" /></td>
                                                   <TD class=tableText ><html:text property="txtEqualMonthlyInstallment" size="15" titleKey="hrm.HrmLC.txtEqualMonthlyInstallment" name="HrmLoanChart" style="width:100%" styleClass="deletedRow" alt="<%=idx.toString()%>"  onchange="doChangeDetail(this.alt);" readonly="true" /></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>
                <td width="14%"></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>
                        <td width="10%"></td>
                   </TR>
                </table>
            </td>
          </tr>
	
<!-- Container Table Ending Columns Starts-->
    
</TBODY>
</TABLE>
<html:hidden name="HrmLCForm"  property="screenMode"  />
<html:hidden name="HrmLCForm"  property="screenName" value="HrmLnChart" />
<html:hidden name="HrmLCForm"  property="forwardedPage" />

<html:hidden name="HrmLCForm"  property="firstLoad" />

<html:hidden property="positionRequested" name="HrmLCForm" />
<html:hidden property="headerDataChanged" name="HrmLCForm" />
<html:hidden property="detailDataChanged" name="HrmLCForm" />

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

<html:hidden property="lovKey" name="HrmLCForm"  />
<html:hidden property="txtSearchFields" name="HrmLCForm"  />
<html:hidden property="txtDisplayFields" name="HrmLCForm"  />
<html:hidden property="txtIndex" name="HrmLCForm"  />
<html:hidden property="headerPrimaryKey" name="HrmLCForm"  />

<html:hidden property="chartId" name="HrmLCForm" />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >

<!-- Container Table Ends -->

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

<script>
function doChangeHeader()
{
 document.forms[0].headerDataChanged.value="true";
}
function doQueryMode()
{

  return "HrmLCQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmLCNewModeAction.do";
}


function doExecute()
{

  return "HrmLCGetHeaderAction.do";
}

function doSave()
{

  return "HrmLCSaveAction.do";
  
}

function doDelete()
{

  return "HrmLCDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmLCRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmLCGetDetailAction.do";
}

function doAddRow()
{

  return "HrmLCAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "tableName";
}

function doPrevDetail()
{

  return "HrmLCGetDetailPageAction.do";  
}

function doNextDetail()
{

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

  return "HrmLCExitAction.do";
}

function doJumpDetail()
{
  return  "HrmLCGetDetailPageAction.do"; 
}
function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmLCOnLoadAction.do"; 
  }
}
function ShowLoanChartName()
{
        document.forms[0].lovKey.value = "HrmLCForm" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLC.chartName";
        document.forms[0].txtDisplayFields.value = "chartId,chartName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLCForm');
        return true;
}

function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}

function doGetInsertData()
{
  
}

</script>
              