<%@ 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="HrmATDDptnApplForm" action="HrmATDDptnApplBaseAction" type="wenrgise.hrms.webtier.form.HrmATDDptnApplForm">
<bean:define id="ParentForm" name="HrmATDDptnApplForm" 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.HrmDeputationApplicn.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.HrmDeputationApplicn.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.HrmDeputationApplicn.employeeNo" /></td>
                <td colspan="3"><enrgise:text  property="employeeNo" titleKey="hrm.HrmDeputationApplicn.employeeNo" maxlength="10" alt="N" size="23" styleClass="required" disabledClass="required" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDDptnApplForm" src="../includes/images/lov.jpg" property="butEmployeeNo" onclick=" return ShowEmployeeNo()" />
                <enrgise:text  property="empName" titleKey="hrm.HrmDeputationApplicn.empName" maxlength="20" size="62" styleClass="optional" alt="AN" disabledClass="locked" onchange="doChangeHeader();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.deputType" /></td>
                <td><enrgise:select property="deputType" alt="deputType"  styleClass="required" disabledClass="locked" onchange="doChangeHeader(); doBaseValidate();" >
                    <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                    <enrgise:option value="F" > <bean:message key="hrm.HrmDeputationApplicn.F" /></enrgise:option>
                    <enrgise:option value="O" > <bean:message key="hrm.HrmDeputationApplicn.O" /></enrgise:option>
                    <enrgise:option value="W" > <bean:message key="hrm.HrmDeputationApplicn.W" /></enrgise:option>
                  </enrgise:select></td> 
            </tr>
            
              <tr>
                 <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.applnNo" /></td>
                <td ><enrgise:text  property="applnNo" titleKey="hrm.HrmDeputationApplicn.applnNo" maxlength="20" size="23" alt="N" styleClass="required" disabledClass="required" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" styleClass="icon"  name="HrmATDDptnApplForm" src="../includes/images/lov.jpg" property="butApplnNo" onclick=" return ShowApplnNo()" /></td>
                <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.applnDate" /></td>
                <td><enrgise:text  property="applnDate" titleKey="hrm.HrmDeputationApplicn.applnDate" maxlength="11" size="23" alt="D" styleClass="locked"  disabledClass="required" onchange="doChangeHeader();" /><enrgise:img width="16" height="19" align="top" styleClass="icon" name="HrmATDDptnApplForm" src="../includes/images/cal.gif" property="butApplnDate"   onclick="showCalendar('applnDate',this)" /></td>              
                <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.deputStatus" /></td>
                <td><enrgise:select property="deputStatus" alt="deputStatus"  styleClass="optional" disabledClass="locked" >
                    <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                    <enrgise:option value="N" > <bean:message key="hrm.HrmDeputationApplicn.new" /></enrgise:option>
                    <enrgise:option value="P" > <bean:message key="hrm.HrmDeputationApplicn.pending" /></enrgise:option>
                    <enrgise:option value="A" > <bean:message key="hrm.HrmDeputationApplicn.approved" /></enrgise:option>
                    <enrgise:option value="R" > <bean:message key="hrm.HrmDeputationApplicn.rejected" /></enrgise:option>
                    </enrgise:select></td> 
            </tr>
            <tr height="10">
                  <td colspan="6"></td>
            </tr>

            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>
            <tr height="10">
                  <td colspan="6"></td>
            </tr>

            <tr>
                <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.advtNo" /></td>
                <td ><enrgise:text  property="advtNo" titleKey="hrm.HrmDeputationApplicn.advtNo" maxlength="40" size="23" alt="N" styleClass="optional" disabledClass="locked" onchange="doChangeHeader(); doBaseValidate()" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDDptnApplForm" src="../includes/images/lov.jpg" property="butAdvtNo" onclick=" return ShowAdvtNo()" /></td>

                <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.advtDate" /></td>
                <td><enrgise:text  property="advtDate" titleKey="hrm.HrmDeputationApplicn.advtDate" maxlength="11" size="23" alt="D" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /><enrgise:img width="16" height="19" align="top" styleClass="icon" name="HrmATDDptnApplForm" src="../includes/images/cal.gif" property="butAdvtDate"   onclick="showCalendar('AdvtDate',this)" /></td>              
                <td colspan="2"></td>
           </tr>
            
            <tr>
                  <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.orgName" /></td>
                  <td><enrgise:text  property="orgName" titleKey="hrm.HrmDeputationApplicn.orgName" maxlength="40" size="26" alt="AN" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.postCode" /></td>
                  <td colspan="3"><enrgise:text  property="postCode" titleKey="hrm.HrmDeputationApplicn.postCode" alt="N" maxlength="15" size="23" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDDptnApplForm" src="../includes/images/lov.jpg" property="butPostName" onclick=" return ShowPostName()" />
                  <enrgise:text  property="postName" titleKey="hrm.HrmDeputationApplicn.postName" maxlength="40" alt="AN" size="62" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" /></td>
             
            </tr>
            <tr>
                  <td class="labelText"><bean:message key="hrm.HrmDeputationApplicn.reason" /></td>
                  <td colspan="3"><enrgise:textarea  property="reason" titleKey="hrm.HrmDeputationApplicn.reason" cols="67" rows="3" alt="AN" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" />
                  <td colspan="2"></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="HrmATDDptnApplForm" property="screenName" value="HrmATDDptnAppl" />
<html:hidden name="HrmATDDptnApplForm" property="forwardedPage" />
<html:hidden name="HrmATDDptnApplForm" property="positionRequested"  />
<html:hidden name="HrmATDDptnApplForm" property="screenMode" />

<html:hidden property="userPageRequested" name="HrmATDDptnApplForm" />
<html:hidden property="userPositionRequested" name="HrmATDDptnApplForm" />
<html:hidden property="pageRequested" name="HrmATDDptnApplForm" />
<html:hidden property="headerDataChanged" name="HrmATDDptnApplForm" />
<html:hidden property="detailDataChanged" name="HrmATDDptnApplForm" />

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

<html:hidden property="applnNoId" name="HrmATDDptnApplForm"  />
<html:hidden property="employeeNoId" name="HrmATDDptnApplForm"  />
<html:hidden property="advtNoId" name="HrmATDDptnApplForm"  />
<html:hidden property="postNameId" name="HrmATDDptnApplForm"  />
<html:hidden property="buttonName" name="HrmATDDptnApplForm"  />
<html:hidden property="firstLoad" name="HrmATDDptnApplForm"  />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >


</html:form>
</body>
</html:html>
 
<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 doValidate()
{
  
    return "HrmATDDptnApplValidateAction.do";
}

function doQueryMode()
{

  return "HrmATDDptnApplQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmATDDptnApplNewModeAction.do";
}


function doExecute()
{

  return "HrmATDDptnApplGetHeaderAction.do";
}

function doSave()
{

  return "HrmATDDptnApplSaveAction.do";
  
}

function doDelete()
{

  return "HrmATDDptnApplDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmATDDptnApplRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmATDDptnApplGetDetailAction.do";
}

function doAddRow()
{

  return "HrmATDDptnApplAddRowAction.do"; 
}

function doDelRow()
{
 return "HrmATDDptnApplDeleteRowAction.do";  
}
function doExit()
{
 return "HrmATDDptnApplExitAction.do";  
}
function doGetDetailTableName()
{
  return "HrmATDDptnAppl";
}

function doPrevDetail()
{

  return "HrmATDDptnApplGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmATDDptnApplGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmATDDptnApplGetDetailPageAction.do"; 
}
function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmATDDptnApplOnLoadAction.do"; 
  }
}
function ShowApplnNo()
{
        document.forms[0].lovKey.value = "DeputApplnNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmDeputationApplicn.applnNo";
        document.forms[0].txtDisplayFields.value = "applnNoId,applnNo";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/HRMS/JSP/CommonSearchScreen.jsp" />','HrmATDDptnApplForm');
        return true;
}

function ShowEmployeeNo()
{
        document.forms[0].lovKey.value = "DeputEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmDeputationApplicn.employeeNo,hrm.HrmDeputationApplicn.empName";
        document.forms[0].txtDisplayFields.value = "employeeNoId,employeeNo,empName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/HRMS/JSP/CommonSearchScreen.jsp" />','HrmATDDptnApplForm');
        return true;
        
}

function ShowAdvtNo()
{
        document.forms[0].lovKey.value = "DeputAdvtNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmDeputationApplicn.advtNo";
        document.forms[0].txtDisplayFields.value = "advtNoId,advtNo";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDDptnApplForm');
        return true;
}

function ShowPostName()
{
        document.forms[0].lovKey.value = "DeputPostNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmDeputationApplicn.postName";
        document.forms[0].txtDisplayFields.value = "postNameId,postCode,postName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDDptnApplForm');
        return true;
}
function doGetInsertData()
{
  
}
function doApprove()
{
  document.forms[0].buttonName.value="butApprove";
  return "HrmATDDptnApplGetButtonAction.do";
 
}
function doReject()
{
  document.forms[0].buttonName.value="butReject";
 return "HrmATDDptnApplGetButtonAction.do";
  
}
function doSubmit()
{
  document.forms[0].buttonName.value="butSubmit";
 return "HrmATDDptnApplGetButtonAction.do";
  
}

function doOnChangeLov(lovName)
{
   if((lovName=="DeputAdvtNoHrmATDDptnApplU")||(lovName=="DeputAdvtNoHrmATDDptnApplN"))
    {
    doBaseValidate();
    }
}
</script>