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


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


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

<html:form name="HrmSepApplnForm" action="HrmSepApplnBaseAction" type="wenrgise.hrms.webtier.form.HrmSepApplnForm">
<bean:define id="ParentForm" name="HrmSepApplnForm" 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.HrmSepApplication.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.HrmSepApplication.subHeader2" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <TR height="6">
                  <TD colspan=6 ></TD>
            </TR>
           
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.employeeNo" /></td>
                <td ><html:text  property="employeeNo" altKey="hrm.HrmSepApplication.employeeNo" maxlength="40" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmSepApplnForm" align="center"  src="../includes/images/lov.jpg" property="butEmployeeNo" onclick="return ShowEmployeeNo();" /></td>
            </TR>
           <tr> 
                 <td  class="labelText"   ><bean:message key="hrm.HrmSepApplication.employeeName" /></td>
                 <td colspan="4"><html:text  property="firstName"  titleKey="hrm.HrmSepApplication.firstName" maxlength="30" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /><html:text  property="middleName"  titleKey="hrm.HrmSepApplication.middleName" maxlength="30" size="32" styleClass="locked" readonly="true" onchange="doChangeHeader();"   /><html:text  property="lastName"  titleKey="hrm.HrmSepApplication.lastName" maxlength="30" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>              
                    
                         
           </tr>
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.grade" /></td>
                <td ><html:text  property="grade" altKey="hrm.HrmSepApplication.grade" maxlength="40" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.designation" /></td>
                <td ><html:text  property="designation" altKey="hrm.HrmSepApplication.designation" maxlength="40" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.location" /></td>
                <td ><html:text  property="location" altKey="hrm.HrmSepApplication.location" maxlength="40" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>
            </TR>
        
        
            <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmSepApplication.subHeader1" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <TR height="6">
                  <TD colspan=6 ></TD>
            </TR>
            
            
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.applicationNo" /></td>
                <td ><enrgise:text  property="applicationNo" altKey="hrm.HrmSepApplication.applicationNo" maxlength="40" size="23" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmSepApplnForm" align="center"  src="../includes/images/lov.jpg" property="butApplicationNo" onclick="return ShowApplicationNo();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.dateApplied" /></td>
                <td><html:text  property="dateApplied" titleKey="hrm.HrmSepApplication.dateApplied" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img  width="15" height="19" align="top" styleClass="icon" name="HrmSepApplnForm" src="../includes/images/cal.gif"  property="butDateApplied" onclick="showCalendar('dateApplied',this)"  /></td>             
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.initiatedBy" /></td>
                <td><enrgise:select property="initiatedBy" alt="initiatedBy"  styleClass="required" name="HrmSepApplnForm" disabledClass="locked" onchange="doBaseValidate();" >
                    <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                    <enrgise:option value="S" > <bean:message key="hrm.HrmSepApplication.self" /></enrgise:option>
                    <enrgise:option value="O" > <bean:message key="hrm.HrmSepApplication.office" /></enrgise:option>
                   </enrgise:select></td> 
                    
            </tr>
            
            
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.sepCat" /></td>
                <td ><html:text  property="sepCat" altKey="hrm.HrmSepApplication.sepCat" maxlength="40" size="23" styleClass="locked" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmSepApplnForm" align="center"  src="../includes/images/lov.jpg" property="butSepCat" onclick="return ShowSeparationCode();" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmSepApplication.imEffect" /></td>
                  <td><enrgise:checkbox property="imEffect"  name="HrmSepApplnForm"  styleClass="optional" disabledClass="locked" onclick="doHeaderCheckBox(this);" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmEmpPersonalDetails.withFlag" /></td>
                  <td><enrgise:checkbox property="withFlag"  name="HrmSepApplnForm"  styleClass="optional" disabledClass="locked" onclick="doHeaderCheckBox(this);" /></td>
                    
            </tr>

            <tr>
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.reqSepDate" /></td>
                <td><html:text  property="reqSepDate" titleKey="hrm.HrmSepApplication.reqSepDate" size="23" styleClass="locked" readonly="true" onchange="doChangeHeader();" /><enrgise:img  width="15" height="19" align="top" styleClass="icon" name="HrmSepApplnForm" src="../includes/images/cal.gif"  property="butReqSepDate" onclick="showCalendar('reqSepDate',this)"  /></td>             
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.actSepDate" /></td>
                <td><html:text  property="actSepDate" titleKey="hrm.HrmSepApplication.actSepDate" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>             
                <td class="labelText"><bean:message key="hrm.HrmSepApplication.reason" /></td>
                <td><enrgise:textarea  property="reason" titleKey="hrm.HrmSepApplication.reason" cols="28"  rows="2" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" /></td>             
                    
            </tr>
            
              <tr height="10">
                  <td colspan="6"></td>
            </tr>

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

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


<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >

<html:hidden property="lovKey" name="HrmSepApplnForm"  />
<html:hidden property="txtSearchFields" name="HrmSepApplnForm"  />
<html:hidden property="txtDisplayFields" name="HrmSepApplnForm"  />

<html:hidden property="applnId" name="HrmSepApplnForm"  />
<html:hidden property="empId" name="HrmSepApplnForm"  />
<html:hidden property="sepCatId" name="HrmSepApplnForm"  />

<html:hidden property="userPageRequested" name="HrmSepApplnForm" />
<html:hidden property="userPositionRequested" name="HrmSepApplnForm" />
<html:hidden property="pageRequested" name="HrmSepApplnForm" />
<html:hidden property="txtIndex" name="HrmSepApplnForm"  />
<html:hidden property="headerPrimaryKey" name="HrmSepApplnForm" />
<html:hidden property="buttonName" name="HrmSepApplnForm"  />
<html:hidden property="firstLoad"  name="HrmSepApplnForm" />
<html:hidden property="headerDataChanged" name="HrmSepApplnForm"  />
<html:hidden property="detailDataChanged" name="HrmSepApplnForm"  />


</html:form>
</body>
</html:html>
      
<script language="javascript">


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

function doHeaderCheckBox(elem)
{
  if(elem.checked)
  {
    document.getElementsByName(elem.name)[1].value="on";
  }
  else
  {
    document.getElementsByName(elem.name)[1].value="off";
  }
}

function doQueryMode()
{

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

  return "HrmSepApplnExitAction.do";
}


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

function doInsertMode()
{

  return "HrmSepApplnNewModeAction.do";
}


function doExecute()
{

  return "HrmSepApplnGetHeaderAction.do";
}


function doDelete()
{

  return "HrmSepApplnDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmSepApplnRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmSepApplnGetDetailAction.do";
}

function doAddRow()
{

   return "HrmSepApplnAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "HrmSepAppln";
}

function doPrevDetail()
{

  return "HrmSepApplnGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmSepApplnGetDetailPageAction.do";
}

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

function ShowApplicationNo()
{
  document.forms[0].lovKey.value = "SepApplnNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
  document.forms[0].txtSearchFields.value = "hrm.HrmSepApplication.applicationNo";
  document.forms[0].txtDisplayFields.value = "applnId,applicationNo";
  document.forms[0].multipleFlag.value = "false";
  showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmSepApplnForm');
  return true;
}

function ShowEmployeeNo()
{
  
  document.forms[0].lovKey.value = "SepEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
  document.forms[0].txtSearchFields.value = "hrm.HrmSepApplication.employeeNo,hrm.HrmSepApplication.employeeName";
  document.forms[0].multipleFlag.value = "false";
  document.forms[0].txtDisplayFields.value = "empId,employeeNo,firstName,middleName,lastName,grade,designation,location";
  showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmSepApplnForm');
  return true;
}
     
function ShowSeparationCode()
{
  document.forms[0].lovKey.value = "SepCategory" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
  document.forms[0].txtSearchFields.value = "hrm.HrmSepApplication.sepCode,hrm.HrmSepApplication.sepName";
  document.forms[0].txtDisplayFields.value = "sepCatId,sepCat";
  document.forms[0].queryParam.value="initiatedBy="+document.forms[0].initiatedBy.value;
  showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmSepApplnForm');
 }


function doSave()
{

  return "HrmSepApplnSaveAction.do";
  
}

</script>