<%@ 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="HrmATDTransApplForm" action="HrmATDTransApplBaseAction" type="wenrgise.hrms.webtier.form.HrmATDTransApplForm">
<bean:define id="ParentForm" name="HrmATDTransApplForm" 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.HrmTransferApplcn.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.HrmTransferApplcn.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.HrmTransferApplcn.applnNo" /></td>
                <td ><enrgise:text  property="applnNo" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.applnNo" maxlength="20" size="23" styleClass="required" disabledClass="required" onchange="doChangeHeader()" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/lov.jpg" property="butApplnNo" onclick=" return ShowApplnNo()" /></td>
                <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.applnDate" /></td>
                <td><enrgise:text  property="applnDate" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.applnDate" size="23" styleClass="required" disabledClass="required" onchange="doChangeHeader()" /><enrgise:img width="16" height="19" align="top" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/cal.gif" property="butApplnDate"   onclick="showCalendar('applnDate',this)" /></td>              
                <!--<td class="labelText"><bean:message key="hrm.HrmTransferApplcn.trnsStatus" /></td>
                <td><enrgise:select property="trnsStatus" name="HrmATDTransApplForm" alt="trnsStatus"  styleClass="optional" disabledClass="locked" onchange="doChangeHeader(); doBaseValidate();"  >
                    <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                    <enrgise:option value="N" > <bean:message key="hrm.HrmTransferApplcn.new" /></enrgise:option>
                    <enrgise:option value="P" > <bean:message key="hrm.HrmTransferApplcn.pending" /></enrgise:option>
                    <enrgise:option value="A" > <bean:message key="hrm.HrmTransferApplcn.approved" /></enrgise:option>
                    <enrgise:option value="R" > <bean:message key="hrm.HrmTransferApplcn.rejected" /></enrgise:option>
                  </enrgise:select></td>--> 
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.applnType" /></td>
                  <td><enrgise:select property="applnType" name="HrmATDTransApplForm" alt="applnType"  styleClass="required" disabledClass="required" onchange="doChangeHeader(); doBaseValidate();" >
                    <enrgise:option value="" ><bean:message   key="hrm.pleaseSelect" /></enrgise:option>      
                    <enrgise:option value="L" > <bean:message key="hrm.HrmTransferApplcn.locational" /></enrgise:option>
                    <enrgise:option value="S" > <bean:message key="hrm.HrmTransferApplcn.sectional" /></enrgise:option>
                  </enrgise:select></td> 
            </tr>
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.employeeNo"  /></td>
                <td  colspan="3"><enrgise:text  property="employeeNo" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.employeeNo" maxlength="10" size="23" styleClass="required" disabledClass="required" onchange="doChangeHeader()" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/lov.jpg" property="butEmployeeNo" onclick="return ShowEmployeeNo()" />
                <enrgise:text  property="empName" titleKey="hrm.HrmEmployeeDependantDetails.employeeName" size="62" styleClass="optional" disabledClass="locked" /></td>
                
            </tr>
            
              <TR>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.ofcNoteNo" /></td>
                  <td><enrgise:text  property="ofcNoteNo" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.ofcNoteNo" maxlength="10" size="26" styleClass="optional" disabledClass="locked" onchange="doChangeHeader()" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.ofcNoteDate" /></td>
                  <td><html:text  property="ofcNoteDate" titleKey="hrm.HrmTransferApplcn.ofcNoteDate" maxlength="10" size="23" styleClass="optional"  readonly="true" onchange="doChangeHeader()" /><enrgise:img width="16" height="19" align="top" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/cal.gif" property="butOfcNoteDate"   onclick="showCalendar('ofcNoteDate',this)" /></td>              
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.generatedBy"  /></td>
                  <td><html:select property="selfOffice" styleClass="required"  onchange="doChangeHeader()" > 
                      <html:option value="O" ><bean:message key="hrm.HrmTransferApplcn.office" /></html:option>
                      <html:option value="S" ><bean:message key="hrm.HrmTransferApplcn.self" /></html:option>
                      </html: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>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.fromDesignation" /></td>
                  <td><html:text property="fromDesignation" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.fromDesignation" size="26" styleClass="locked" onchange="doChangeHeader()" readonly="true" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.toDesignation" /></td>
                  <td colspan="3"><html:text property="toDesignation" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.toDesignation" size="23" styleClass="optional" onchange="doChangeHeader()" readonly="true" />
                  <enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm"  src="../includes/images/lov.jpg" property="butToDesignation" onclick=" return ShowToDesignation()" />
                  </td>
         </tr>
         <tr>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.fromWorkGroup" /></td>
                  <td><html:text property="fromWorkGroup" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.fromWorkGroup" size="26" styleClass="locked" onchange="doChangeHeader()" readonly="true" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.toWorkGroup" /></td>
                  <td colspan="3"><html:text property="toWorkGroup" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.toWorkGroup" size="23" styleClass="optional" onchange="doChangeHeader()" readonly="true" />
                  <enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm"  src="../includes/images/lov.jpg" property="butToWorkGroup" onclick=" return ShowToWorkGroup()" />
                  </td>
         
         </tr>
          <tr height="10">
                  <td colspan="6"></td>
          </tr>

          <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmTransferApplcn.subHeader2" /></TD>
            </TR>
            <TR>
                  <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
            </TR>

            <tr>   
                   <td colspan="2"></td>
                   <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.transferSite" /></td>
                   <td colspan="3"></td>
            </tr>
            <tr>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.fromSite" /></td>
                  <td><enrgise:text property="fromSite" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.fromSite" size="26" styleClass="optional" readonly="true" disabledClass="locked" onchange="doChangeHeader()" /></td>
          
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.siteCode1" /></td>
                  <td colspan="2"><html:text property="siteCode1" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.siteCode1" size="23" styleClass="locked" onchange="doChangeHeader()" readonly="true" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/lov.jpg" property="butSite1" onclick=" return ShowSite1()" />
                  <html:text property="site1" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.siteCode1" size="30" styleClass="locked" onchange="doChangeHeader()" readonly="true" /></td>
      
            </tr>
            <tr>
                  <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.reason" /></td>
                  <td><enrgise:textarea  property="reason" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.reason" cols="28" rows="2" styleClass="required" disabledClass="locked" onchange="doChangeHeader()" ></enrgise:textarea></td>                 
                   <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.siteCode2" /></td>
                  <td colspan="2"><html:text property="siteCode2" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.siteCode2" size="23" styleClass="locked" onchange="doChangeHeader()" readonly="true" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/lov.jpg" property="butSite2" onclick=" return ShowSite2()" />
                  <html:text property="site2" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.siteCode2" size="30" styleClass="locked" onchange="doChangeHeader()" readonly="true" /></td>
             
            </tr>
            <tr>
                  <td colspan="2"></td>                
                 <td class="labelText"><bean:message key="hrm.HrmTransferApplcn.siteCode3" /></td>
                  <td colspan="2"><html:text property="siteCode3" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.siteCode3" size="23" styleClass="locked" onchange="doChangeHeader()" readonly="true" /><enrgise:img height="16" align="center" styleClass="icon" name="HrmATDTransApplForm" src="../includes/images/lov.jpg" property="butSite3" onclick=" return ShowSite3()" />
                  <html:text property="site3" name="HrmATDTransApplForm" titleKey="hrm.HrmTransferApplcn.siteCode3" size="30" styleClass="locked" onchange="doChangeHeader()" readonly="true" /></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="HrmATDTransApplForm" property="screenName" value="HrmATDTransAppl" />
<html:hidden name="HrmATDTransApplForm" property="forwardedPage" />
<html:hidden name="HrmATDTransApplForm" property="positionRequested"  />
<html:hidden name="HrmATDTransApplForm" property="screenMode" />

<html:hidden property="userPageRequested" name="HrmATDTransApplForm" />
<html:hidden property="userPositionRequested" name="HrmATDTransApplForm" />
<html:hidden property="pageRequested" name="HrmATDTransApplForm" />
<html:hidden property="headerDataChanged" name="HrmATDTransApplForm" />
<html:hidden property="firstLoad" name="HrmATDTransApplForm"  />
<html:hidden property="lovKey" name="HrmATDTransApplForm"  />
<html:hidden property="txtSearchFields" name="HrmATDTransApplForm"  />
<html:hidden property="txtDisplayFields" name="HrmATDTransApplForm"  />
<html:hidden property="txtIndex" name="HrmATDTransApplForm"  />

<html:hidden property="applnNoId" name="HrmATDTransApplForm"  />

<html:hidden property="employeeNoId" name="HrmATDTransApplForm"  />
<html:hidden property="siteId" name="HrmATDTransApplForm"  />
<html:hidden property="site1Id" name="HrmATDTransApplForm"  />
<html:hidden property="site2Id" name="HrmATDTransApplForm"  />
<html:hidden property="site3Id" name="HrmATDTransApplForm"  />
<html:hidden property="fromDesignationId" name="HrmATDTransApplForm"  />
<html:hidden property="toDesignationId" name="HrmATDTransApplForm"  />
<html:hidden property="fromWorkGroupId" name="HrmATDTransApplForm"  />
<html:hidden property="toWorkGroupId" name="HrmATDTransApplForm"  />


<html:hidden property="headerPrimaryKey" name="HrmATDTransApplForm"  />

<html:hidden property="buttonName" name="HrmATDTransApplForm"  />

<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 "HrmATDTransApplValidateAction.do";
}
function doQueryMode()
{

  return "HrmATDTransApplQueryModeAction.do";
}


function doInsertMode()
{

  return "HrmATDTransApplNewModeAction.do";
}


function doExecute()
{

  return "HrmATDTransApplGetHeaderAction.do";
}

function doSave()
{

  return "HrmATDTransApplSaveAction.do";
  
}

function doDelete()
{

  return "HrmATDTransApplDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmATDTransApplRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmATDTransApplGetDetailAction.do";
}

function doAddRow()
{

  return "HrmATDTransApplAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "HrmATDTransAppl";
}

function doPrevDetail()
{

  return "HrmATDTransApplGetDetailPageAction.do";  
}

function doNextDetail()
{

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

  return "HrmATDTransApplExitAction.do";
}

function doJumpDetail()
{
  return  "HrmATDTransApplGetDetailPageAction.do"; 
}
function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmATDTransApplOnLoadAction.do"; 
  }
}
function ShowApplnNo()
{
        document.forms[0].lovKey.value = "TrnsfrApplnNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.applnNo";
        document.forms[0].txtDisplayFields.value = "applnNoId,applnNo,employeeNo,empName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
        return true;
}
 
function ShowOfcNoteNo()
{
        document.forms[0].lovKey.value = "TrnsfrOfcNoteNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.ofcNoteNo";
        document.forms[0].txtDisplayFields.value = "ofcNoteId,ofcNoteNo";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
        return true;
}   

function ShowToDesignation()
{
        document.forms[0].lovKey.value = "TrnsfrDesignation" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.toDesignation";
        document.forms[0].txtDisplayFields.value = "toDesignationId,toDesignation";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
        return true;
}
function ShowToWorkGroup()
{
        document.forms[0].lovKey.value = "TrnsfrWorkgroup" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.toWorkGroupCode,hrm.HrmTransferApplcn.toWorkGroup";
        document.forms[0].txtDisplayFields.value = "toWorkGroupId,toWorkGroup";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
        return true;
}

function ShowEmployeeNo()
{
        document.forms[0].lovKey.value = "TrnsfrEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.employeeNo,hrm.HrmTransferApplcn.employeeName";
        document.forms[0].txtDisplayFields.value = "employeeNoId,employeeNo,empName,fromDesignation,fromSite,siteId,fromDesignationId,fromWorkGroup,fromWorkGroupId";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
        return true;
        
}


function ShowSite1()
{ 
      document.forms[0].lovKey.value = "TrnsfrSite1" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
      document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.siteCode,hrm.HrmTransferApplcn.siteName";
      document.forms[0].txtDisplayFields.value = "site1Id,siteCode1,site1";
      document.forms[0].multipleFlag.value="false";
      document.forms[0].queryParam.value="siteId="+document.forms[0].siteId.value;
      showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
      return true;
}

function ShowSite2()
{ 
      document.forms[0].lovKey.value = "TrnsfrSite2" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
      document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.siteCode,hrm.HrmTransferApplcn.siteName";
      document.forms[0].txtDisplayFields.value = "site2Id,siteCode2,site2";
      document.forms[0].multipleFlag.value="false";
      document.forms[0].queryParam.value="siteId="+document.forms[0].siteId.value +" ,site1Id="+document.forms[0].site1Id.value ;
      showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
      return true;
}

function ShowSite3()
{ 
      document.forms[0].lovKey.value = "TrnsfrSite3" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
      document.forms[0].txtSearchFields.value = "hrm.HrmTransferApplcn.siteCode,hrm.HrmTransferApplcn.siteName";
      document.forms[0].txtDisplayFields.value = "site3Id,siteCode3,site3";
      document.forms[0].multipleFlag.value="false";
      document.forms[0].queryParam.value="siteId="+document.forms[0].siteId.value +" ,site1Id="+document.forms[0].site1Id.value+" ,site2Id="+document.forms[0].site2Id.value;
      showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmATDTransApplForm');
      return true;
}

function doGetInsertData()
{
  
}

function doApprove()
{
  document.forms[0].buttonName.value="butApprove";
  return "HrmATDTransApplGetButtonAction.do";
  }
function doReject()
{
  document.forms[0].buttonName.value="butReject";
 return  "HrmATDTransApplGetButtonAction.do";
  
}
function doSubmit()
{
  document.forms[0].buttonName.value="butSubmit";
 return  "HrmATDTransApplGetButtonAction.do";
  
}
</script>