<%@ 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>
	<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="HrmLvCreditForm" action="HrmLvCreditBaseAction" type="wenrgise.hrms.webtier.form.HrmLvCreditForm">
<bean:define id="ParentForm" name="HrmLvCreditForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />

<html:hidden property="headerDataChanged" name="HrmLvCreditForm" />
<html:hidden property="detailDataChanged" name="HrmLvCreditForm" />
<!--Top Most Blue Bar-->

<!--//  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>
<TR height=30>
  <TD  colSpan=12 class=mainHeader height=10>CREDIT LEAVES</TD>
</TR>
</TABLE>

  <TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TBODY>
    <TR>
    <TD>
	  <!-- Body table Starts -->
    <TABLE cellSpacing=0 cellPadding=0 >
      <!--Account  Header Row Starts -->
      <TR>
        <TD class=subHeader colspan=6> CREDIT LEAVES</TD>
      </TR>
      <TR>
        <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
      </TR>
      
      <tr height="15" >
        <td colspan="2"></td>
      </tr>
      
      <!--<tr>
        <td width="25%"></td>
        <td width="12%" align="right" class="labelText" ><bean:message key="hrm.HrmLvCredit.region"  />             
        <td  align="left"><html:text  property="txtRegionCode" maxlength="10" size="20" styleClass="required" onchange="doOnChangeLov();"  readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="buttxtRegion" name="HrmLvCreditForm" onclick="ShowLovRegion();"  /><html:text  property="txtRegionName" maxlength="10" size="26" styleClass="locked" readonly="true" />
        </td>
      </tr> -->
      <tr>
          <td class="labelText"><bean:message key="hrm.HrmLeaveLedger.employeeNo" /></td>
          <td><html:text  property="employeeNo" titleKey="hrm.HrmLeaveLedger.employeeNo" size="10"  styleClass="locked"  readonly="true" onkeypress="isInteger(event)" />
            <enrgise:img height="16" align="center"  src="../includes/images/lov.jpg" property="butEmpCode" name="HrmLvCreditForm" onclick="return ShowEmpCode()" /></td>            
          <td class="labelText"><bean:message key="hrm.HrmLeaveLedger.employeeName" /></td>
          <td><html:text  property="employeeName" titleKey="hrm.HrmLeaveLedger.employeeName" size="40" styleClass="locked" readonly="true"  /></td>              
          <td colspan="2" width="30%"></td>
      </TR>
      <tr>    
          <td class="labelText"><bean:message key="hrm.HrmLeaveLedger.leaveCode" /></td>
          <td colspan="4" ><html:text  property="leaveCode" titleKey="hrm.HrmLeaveLedger.leaveCode" size="23"  styleClass="required" readonly="true" />
            <enrgise:img height="16" align="center"  src="../includes/images/lov.jpg" property="butLeaveCode" name="HrmLvCreditForm" onclick="return ShowLeaveCode()" />
          <html:text  property="leaveDescription" titleKey="hrm.HrmLeaveLedger.leaveDescription" size="70" styleClass="locked"  readonly="true" /></td>              
      </tr>
      <tr>
        <td width="25%"></td>
        <td width="12%" align="right" class="labelText" ><bean:message key="hrm.HrmLvCredit.noOfDays"  />             
        <td  align="left"><html:text  property="txtNoOfDays" maxlength="2" size="20" styleClass="required" onchange="doBaseValidate();"  /></td>
      </tr>
    </table>


    <table cellspacing=0 cellpadding=0 border=0>
    <!-- Detail Information Row starts -->
    
    <TR height="100">
      <TD colspan=11>
      
      <!-- Account Config Detail Table Starts -->
      <TABLE cellspacing="0" cellPadding="0" >
        <TR height=10>
        <!-- Detail table Container starts -->
          <TD colspan="16">
          
          </td>
        </tr>
        <!-- Tab table Row 3 starts -->
        <tr>
        
        </TR>
        <TR>
          <TD align=right bgColor=#4682b4 colSpan=16><IMG height=1 src="../includes/images/pixel.gif" width=1  border=0></TD>
        </TR>
      
      </TABLE>
      </td>
    </tr>
              

    <!-- Bottom Blue Bar -->
    <TR>
      <td align=center bgcolor=#4682b4 width="42%"></td>
      <td  bgcolor=#4682b4><enrgise:button name="HrmLvCreditForm"   onclick="creditLeaves();" property="butCreditLeaves" styleClass="bottomBarText"> Credit Leaves </enrgise:button></td>
      <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
    </TR>
	
  </TABLE>
 
  <!-- Container Table Ending Columns Starts-->
  </TD>
    
  </TR>
  </TBODY>
</TABLE>

<!-- Container Table Ends -->


    <html:hidden name="HrmLvCreditForm"  property="screenMode"/>
    <html:hidden name="HrmLvCreditForm"  property="screenName" value="HrmLvCredit" />
    <html:hidden property="buttonName" name="HrmLvCreditForm"  />
    <html:hidden property="firstLoad" name="HrmLvCreditForm"  /> 
    <html:hidden property="lovKey" name="HrmLvCreditForm"  />
    <html:hidden property="txtSearchFields" name="HrmLvCreditForm"  />
    <html:hidden property="txtDisplayFields" name="HrmLvCreditForm"  />
    <html:hidden property="txtIndex" name="HrmLvCreditForm"  />
    <html:hidden property="hdrRegionId" name="HrmLvCreditForm"  />    
    <html:hidden property="employeeNoId" name="HrmLvCreditForm"  />
    <html:hidden property="leaveTypeId" name="HrmLvCreditForm"  />
    <input type="hidden" name="queryParam" >



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

 
<script language="javascript">

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

function doValidate()
{  
   return "HrmLvCreditValidateAction.do"; 
}


function doExit()
{
  return  "HrmLvCreditExitAction.do";
}
function creditLeaves()
{
    document.forms[0].buttonName.value="butCreditLeaves";
    document.forms[0].action = contextRoot+"HrmLvCreditGetButtonAction.do";
    document.forms[0].submit();
}

function ShowLovRegion()
{
   document.forms[0].lovKey.value = "CreditLeaveRegion" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
   document.forms[0].txtDisplayFields.value = "hdrRegionId,txtRegionCode,txtRegionName"; 
   document.forms[0].txtSearchFields.value = "hrm.HrmLvCredit.txtRegionCode,hrm.HrmLvCredit.txtRegionName";
   document.forms[0].txtIndex.value ="";   
   showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />', 'HrmLvCreditForm');
   return true;
}
function doOnChangeLov(lovName)
{
   if(lovName=="CreditLeaveRegionHrmLvCreditN" || lovName=="CreditLeaveRegionHrmLvCreditQ" || lovName=="CreditLeaveRegionHrmLvCreditU")
    {
      doBaseValidate();
    }
}
function ShowLeaveCode()
{
        document.forms[0].lovKey.value = "CreditLvLvType" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLvAppln.description";
        document.forms[0].txtDisplayFields.value = "leaveTypeId,leaveCode,leaveDescription";
        document.forms[0].queryParam.value="empId="+document.forms[0].employeeNoId.value;
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLvCreditForm');
        return true;
        
}
function ShowEmpCode()
{
        document.forms[0].lovKey.value = "CreditLvEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmLeaveLedger.employeeNo,hrm.HrmLeaveLedger.employeeName";
        document.forms[0].txtDisplayFields.value = "employeeNoId,employeeNo,employeeName";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmLvCreditForm');
        return true;
        
}
</script>
