<%@ 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="HrmPrmOrderForm" action="HrmPrmOrderBaseAction" type="wenrgise.hrms.webtier.form.HrmPrmOrderForm">
<bean:define id="ParentForm" name="HrmPrmOrderForm" 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.HrmPrmOrder.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.HrmPrmOrder.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.HrmPrmOrder.employeeNo" /></td>
                <td ><html:text  property="employeeNo" altKey="hrm.HrmPrmOrder.employeeNo" maxlength="40" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmPrmOrderForm" align="center"  src="../includes/images/lov.jpg" property="butEmpNo" onclick="return ShowEmployeeNo();" /></td>
                
                 <td  class="labelText"   ><bean:message key="hrm.HrmPrmOrder.employeeName" /></td>
                 <td colspan="4"><html:text  property="firstName"  titleKey="hrm.HrmPrmOrder.firstName" maxlength="30" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /><html:text  property="middleName"  titleKey="hrm.HrmPrmOrder.middleName" maxlength="30" size="24" styleClass="locked" readonly="true" onchange="doChangeHeader();"   /><html:text  property="lastName"  titleKey="hrm.HrmPrmOrder.lastName" maxlength="30" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>              
                    
            </tr>
            
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.grade" /></td>
                <td ><html:text  property="grade" altKey="hrm.HrmPrmOrder.grade" maxlength="40" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.designation" /></td>
                <td ><html:text  property="designation" altKey="hrm.HrmPrmOrder.designation" maxlength="40" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.location" /></td>
                <td ><html:text  property="location" altKey="hrm.HrmPrmOrder.location" maxlength="40" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>
            </TR>
            
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.pastExp" /></td>
                <td><html:text  property="pastExp" titleKey="hrm.HrmPrmOrder.pastExp" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>             
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.presExp" /></td>
                <td><html:text  property="presExp" titleKey="hrm.HrmPrmOrder.presExp" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();" /></td>             
            </TR>
            
            
            <TR>
                  <TD class=subHeader colspan=6><bean:message key="hrm.HrmPrmOrder.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.HrmPrmOrder.orderNo" /></td>
                <td ><enrgise:text  property="orderNo" titleKey="hrm.HrmPrmOrder.orderNo" maxlength="40" size="23" styleClass="required" disabledClass="locked" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmPrmOrderForm" align="center"  src="../includes/images/lov.jpg" property="butOrderNo" onclick="return ShowOrderNo();" /></td>
               
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.toGrade" /></td>
                <td ><html:text  property="toGrade" titleKey="hrm.HrmPrmOrder.toGrade" maxlength="40" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmPrmOrderForm" align="center"  src="../includes/images/lov.jpg" property="butToGrade" onclick="return ShowToGrade();" /></td>
                
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.toDesig" /></td>
                <td ><html:text  property="toDesig" titleKey="hrm.HrmPrmOrder.toDesig" maxlength="40" size="23" styleClass="locked" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmPrmOrderForm" align="center"  src="../includes/images/lov.jpg" property="butToDesig" onclick="return ShowToDesig();" /></td>
                
            </tr>
            
            <tr>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.effecDate" /></td>
                <td ><html:text  property="effecDate" altKey="hrm.HrmPrmOrder.effecDate" maxlength="40" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img  width="15" height="19" align="top" styleClass="icon" name="HrmPrmOrderForm" src="../includes/images/cal.gif"  property="butEffecDate" onclick="showCalendar('effecDate',this)"  /></td>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.approvedBy" /></td>
                <td ><html:text  property="approvedBy" altKey="hrm.HrmPrmOrder.approvedBy" maxlength="40" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" name="HrmPrmOrderForm" align="center"  src="../includes/images/lov.jpg" property="butApprovedBy" onclick="return ShowApproverNo();" /></td>
                <td class="labelText"><bean:message key="hrm.HrmPrmOrder.remarks" /></td>
                <td ><enrgise:textarea  property="remarks" altKey="hrm.HrmPrmOrder.remarks" cols="28" rows="2" styleClass="optional" disabledClass="locked" onchange="doChangeHeader();" /></td>
            </TR>
            
            
            <tr height="15">
                <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="HrmPrmOrderForm" property="screenName" value="HrmPrmOrder" />
<html:hidden name="HrmPrmOrderForm" property="forwardedPage" />
<html:hidden name="HrmPrmOrderForm" property="positionRequested"  />
<html:hidden name="HrmPrmOrderForm" property="screenMode" />


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

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

<html:hidden property="orderNoId" name="HrmPrmOrderForm"  />
<html:hidden property="empId" name="HrmPrmOrderForm"  />
<html:hidden property="approverId" name="HrmPrmOrderForm"  />
<html:hidden property="toGradeId" name="HrmPrmOrderForm"  />
<html:hidden property="toDesigId" name="HrmPrmOrderForm"  />
<html:hidden property="gradeSeq" name="HrmPrmOrderForm"  />
<html:hidden property="desigSeq" name="HrmPrmOrderForm"  />

<html:hidden property="userPageRequested" name="HrmPrmOrderForm" />
<html:hidden property="userPositionRequested" name="HrmPrmOrderForm" />
<html:hidden property="pageRequested" name="HrmPrmOrderForm" />
<html:hidden property="txtIndex" name="HrmPrmOrderForm"  />
<html:hidden property="headerPrimaryKey" name="HrmPrmOrderForm" />

<html:hidden property="headerDataChanged" name="HrmPrmOrderForm"  />
<html:hidden property="detailDataChanged" name="HrmPrmOrderForm"  />
<html:hidden property="buttonName" name="HrmPrmOrderForm"  />
<html:hidden property="firstLoad" name="HrmPrmOrderForm"  />
</html:form>
</body>
</html:html>
      
<script language="javascript">


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


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

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

function doInsertMode()
{

  return "HrmPrmOrderNewModeAction.do";
}


function doExecute()
{
  return "HrmPrmOrderGetHeaderAction.do";
}
function doRefresh()
{
  return "HrmPrmOrderRefreshAction.do";
}
function doPrevHeader()
{
  return "HrmPrmOrderGetNextHeaderAction.do"; 
}
function doNextHeader()
{
  return "HrmPrmOrderGetNextHeaderAction.do"; 
}
function doJumpHeader()
{
  return "HrmPrmOrderFirstGetNextHeaderAction.do"; 
}
function doExit()
{
   return "HrmPrmOrderExitAction.do";  
}
function doGetDetailTableName()
{
  return "HrmPrmOrder";
}
function doSave()
{
  return "HrmPrmOrderSaveAction.do";
}
function ShowEmployeeNo()
{
  document.forms[0].lovKey.value = "PromOrdEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
  document.forms[0].txtSearchFields.value = "hrm.HrmPrmOrder.employeeNo,hrm.HrmPrmOrder.employeeName";
  
  if(document.forms[0].screenMode.value=="N")
  {
   document.forms[0].txtDisplayFields.value = "empId,employeeNo,firstName,middleName,lastName,gradeSeq,grade,desigSeq,designation,location,pastExp,presExp";
  }
  if(document.forms[0].screenMode.value=="Q")
  {
   document.forms[0].txtDisplayFields.value = "empId,employeeNo,firstName,middleName,lastName,grade,designation,location";
  }
  showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmOrderForm');
  return true;
}


function ShowOrderNo()
{
    document.forms[0].lovKey.value = "PromOrdOrderNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmPrmOrder.orderNo";
    document.forms[0].txtDisplayFields.value = "orderNo,effecDate";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmOrderForm');
    return true;
}

function ShowApproverNo()
{
    document.forms[0].lovKey.value = "PromOrdApprNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmPrmOrder.employeeNo,hrm.HrmPrmOrder.employeeName";
    document.forms[0].txtDisplayFields.value = "approverId,approvedBy";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmOrderForm');
    return true;
}

function ShowToGrade()
{
    document.forms[0].queryParam.value ="gradeSeq="+ document.forms[0].gradeSeq.value +" " ;
    document.forms[0].lovKey.value = "PromOrdToGrade" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmPrmOrder.gradeCode,hrm.HrmPrmOrder.gradeName";
    document.forms[0].txtDisplayFields.value = "toGradeId,toGrade";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmOrderForm');
    return true;
}

function ShowToDesig()
{
    document.forms[0].queryParam.value ="desigSeq="+ document.forms[0].desigSeq.value +" " ;
    document.forms[0].lovKey.value = "PromOrdToDesig" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.HrmPrmOrder.desigCode,hrm.HrmPrmOrder.desigName";
    document.forms[0].txtDisplayFields.value = "toDesigId,toDesig";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmPrmOrderForm');
    return true;
}

 function doOnChangeLov(lovName)
{
   if((lovName=="PromOrdEmpNoHrmPrmOrderN") )
    {
    doBaseValidate();
    }
}


</script>