<%@ 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" />
</HEAD>

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

<html:form name="HrmAprslSpcTmplForm" action="HrmAppSpcEmpBaseAction" type="wenrgise.hrms.webtier.form.HrmAprslSpcTmplForm">
<bean:define id="ParentForm" name="HrmAprslSpcTmplForm" toScope="request" />
<jsp:include page="GenIconMenu.jsp" flush="true" />


<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader ><bean:message  key="hrm.ApprslSpcTemp.heading" /></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 >
        <!--Master Information Starts -->
        
         <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.ApprslSpcTemp.splTemplateName" /></td>
            <td>
            <logic:equal property="screenMode" name="HrmAprslSpcTmplForm" value="N" >
            <html:text  property="splTemplateName"  maxlength="15" size="23" styleClass="required" onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov_dis.jpg" height="16" align="center" property="butSplTemplateName" name="HrmAprslSpcTmplForm" />
            </logic:equal>
            <logic:equal property="screenMode" name="HrmAprslSpcTmplForm" value="U" >
            <html:text  property="splTemplateName"  maxlength="15" size="23" styleClass="locked" readonly="true" /><enrgise:img src="../includes/images/lov_dis.jpg" height="16" align="center" property="butSplTemplateName" name="HrmAprslSpcTmplForm" />
            </logic:equal>
            <logic:equal property="screenMode" name="HrmAprslSpcTmplForm" value="Q" >
            <html:text  property="splTemplateName"  maxlength="15" size="23" styleClass="optional" readonly="true" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butSplTemplateName" name="HrmAprslSpcTmplForm" onclick="ShowSplTemplateName();" />
            </logic:equal>
            </td>
         
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.templateName" /></td>
            <td><html:text  property="templateName"  maxlength="15" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butTemplateName" name="HrmAprslSpcTmplForm" onclick="ShowTemplateName();" /></td>
           
           </tr>
            <tr>
            
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.classHdr" /></td>
            <td><html:text  property="classHdr" altKey="hrm.ApprslSpcTemp.classHdr" maxlength="25" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butClassHdr" name="HrmAprslSpcTmplForm" onclick="ShowClassHdr();" />
            <html:text  property="classHdrDesc" titleKey="hrm.ApprslSpcTemp.classHdrDesc" maxlength="10" size="35" styleClass="locked" readonly="true" /></td>
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.classDtl" /></td>
            <td><html:text  property="classDtl" altKey="hrm.ApprslSpcTemp.classDtl" maxlength="25" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butClassDtl" name="HrmAprslSpcTmplForm" onclick="ShowClassDtl();" />
            <html:text  property="classDtlDesc" titleKey="hrm.ApprslSpcTemp.classDtlDesc" maxlength="10" size="35" styleClass="locked" readonly="true" /></td>
            
          </tr>
           <tr>
            
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.siteCode" /></td>
            <td><html:text  property="siteCode" altKey="hrm.ApprslSpcTemp.siteCode" maxlength="25" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butSiteCode" name="HrmAprslSpcTmplForm" onclick="ShowSiteCode();" />
            <html:text  property="siteDesc" titleKey="hrm.ApprslSpcTemp.siteDesc" maxlength="10" size="35" styleClass="locked"  readonly="true"  /></td>
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.deptCode" /></td>
            <td><html:text  property="deptCode" altKey="hrm.ApprslSpcTemp.deptCode" maxlength="15" size="23" styleClass="optional" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butDeptCode" name="HrmAprslSpcTmplForm" onclick="ShowDeptCode();" />
            <html:text  property="deptDesc" titleKey="hrm.ApprslSpcTemp.deptDesc" maxlength="10" size="35" styleClass="locked"  readonly="true" /></td>
            
          </tr>
          <tr>
            
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.empNo" /></td>
            <td ><html:text  property="empNo" altKey="hrm.ApprslSpcTemp.empNo" maxlength="25" size="23" styleClass="optional" readonly="true" onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butEmpNo" name="HrmAprslSpcTmplForm" onclick="ShowEmpNo();" />
            <html:text  property="empName" titleKey="hrm.ApprslSpcTemp.empName" maxlength="10" size="35" styleClass="locked"  readonly="true"  /></td>
             <td class=labelText><bean:message key="hrm.ApprslSpcTemp.stOrderNo" /></td>
            <td ><html:text  property="stOrderNo" altKey="hrm.ApprslSpcTemp.stOrderNo" maxlength="25" size="23" styleClass="required" readonly="true"  onchange="doChangeHeader();" /><enrgise:img src="../includes/images/lov.jpg" height="16" align="center" property="butStOrderNo" name="HrmAprslSpcTmplForm" onclick="ShowStOrderNo();" /></td>
          
          </tr>
          <tr>
            <td class=labelText><bean:message key="hrm.ApprslSpcTemp.fromDate" /></td>
            <td ><html:text  property="fromDate"  altKey="hrm.ApprslSpcTemp.fromDate" maxlength="15" size="23" styleClass="optional" readonly="true" onchange="doChangeHeader();"  /><enrgise:img src="../includes/images/cal.gif"  width="15" height="19" align="top" styleClass="icon" name="HrmAprslSpcTmplForm" property="butFromDate" onclick="showCalendar('fromDate',this)" /></td>
            
          <td class=labelText><bean:message key="hrm.ApprslSpcTemp.toDate" /></td>
            <td ><html:text  property="toDate" altKey="hrm.ApprslSpcTemp.toDate"  maxlength="15" size="23"  styleClass="optional" readonly="true" onchange="doChangeHeader();"  /><enrgise:img src="../includes/images/cal.gif"  width="15" height="19" align="top" styleClass="icon" name="HrmAprslSpcTmplForm" property="butToDate" onclick="showCalendar('toDate',this)" /></td>
            
          </tr>
          
          
          <tr height=10>
            <td colspan=6></td>
          </tr>
          </table>  
          <table cellspacing=0 cellpadding=0 border=0>
          <!-- Detail Information Row starts -->
          <TR>
            <TD colspan=6>
            <TABLE cellSpacing=0 cellPadding=0 >
              <tr>
                   <enrgise:tab name="HrmAprslSpcTmplForm" property="butKPATab" styleClass="disTabText" disabledClass="lockedTab" src="../includes/images/formtab_lb.gif"  onclick="doGetTab('HrmAprslSpcTmpl','HrmAppSpcEmpGetTabAction.do');"  ><bean:message key="hrm.ApprslSpcTemp.kpa" /></enrgise:tab>
                   <enrgise:tab name="HrmAprslSpcTmplForm" property="butGoalsTab" styleClass="disTabText" disabledClass="lockedTab" src="../includes/images/formtab_lb.gif" onclick="doGetTab('HrmAprslSpcTmplGoals','HrmAppSpcEmpGetTabAction.do');" ><bean:message key="hrm.ApprslSpcTemp.goals" /></enrgise:tab>
                   <enrgise:tab name="HrmAprslSpcTmplForm" property="butEmpEligTab" styleClass="actTabText" disabledClass="lockedTab" src="../includes/images/formtab_r.gif" ><bean:message key="hrm.ApprslSpcTemp.empElig" /></enrgise:tab>
                   <td width="71%">&nbsp;</td>
            </tr> 
              <!-- Detail table Container starts -->
              <TD colSpan=11>
              <TABLE cellSpacing=0 cellPadding=0 border=0>
                <TBODY>
                 <TR>
                  <TD >
                  <DIV id=divDtlTable style="height:250px">
                    <TABLE  border="0" cellSpacing=0 cellPadding=0>
                     <TBODY>
                        <tr>
                       <TD class=tableHeader width="1%"><html:checkbox property="selectAll" onclick="toggleCheckBox('checked')" /></TD>
                                 <TD class=tableHeader width="45%"><bean:message key="hrm.ApprslSpcTemp.txtEmpNo" /></td>
                          <TD class=tableHeader width="54%"><bean:message key="hrm.ApprslSpcTemp.txtEmpName" /></td>
                         
                        </tr> 
                        
                       <logic:iterate id="apprslspc" name="HrmAprslSpcTmplForm" property="arylstAprslSpcTempEmpElig" type="wenrgise.hrms.bean.HrmAprslSpcTmplEmpEligDtlBean" indexId="idx">
                                
                            <logic:notEqual name="apprslspc" property="status" value="D" >                                                        
                                <tr>
                                  <td align="center" ><html:checkbox property="checked" name="HrmAprslSpcTmplForm"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"/></td>                                  
                                 
                                  <td ><html:text property="txtEmpNo" name="apprslspc" readonly="true" styleClass="locked"  size="26" style="width:80%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img src="../includes/images/lov_dis.jpg" name="apprslspc"  styleClass="icon" height="16" align="center" property="butTxtEmpNameLOV"  alt="<%=idx.toString()%>" /> </td>
                                  <td><html:text property="txtEmpName" name="apprslspc" readonly="true" styleClass="locked" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>
                                 
                                  
                                  
                               </tr>
                        </logic:notEqual>
                       
                        <logic:equal name="apprslspc" property="status" value="D" >
                                
                                 <tr>
                                  <td align="center" ><html:checkbox property="checked" name="HrmAprslSpcTmplForm"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);"/></td>                                  
                                 
                                  <td ><html:text property="txtEmpNo" name="apprslspc"  styleClass="locked"  size="26" style="width:80%" onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><enrgise:img src="../includes/images/lov.jpg" name="HrmAprslSpcTmplForm"  styleClass="icon" height="15" align="center" property="butTxtEmpNameLOV"  alt="<%=idx.toString()%>" onclick=" return ShowEmpName(this.alt);" /> </td>
                                  <td><html:text property="txtEmpName" name="apprslspc"  styleClass="locked" style="width:100%"  size="26"  onchange='<%="doChangeDetail("+idx.toString()+");"%>'  />  </td>
                                 
                                  
                                  
                               </tr>
                          </logic:equal>                                    
                    </logic:iterate>              
                                       

                      </TBODY>
                      </TABLE>
                      </DIV>
                      </TD>
                    </TR>
               <tr>
                <td>	
                <!--<jsp:include page="GenDetailMenu.jsp" flush="true" />-->
                <bean:define id="pageNo" name="ParentForm" property="pageRequested" toScope="request" />
                <bean:define id="maxPage" name="ParentForm" property="totalPageCount" toScope="request" />
                <TABLE border=0>
                  <tbody>
                  <TR>
                    <TD ><enrgise:button altKey="wenrgise.common.getDetail"  onclick="doBaseGetDetail()" property="butGetDetail" name="ParentForm" styleClass="bottomBarText">&nbsp;Get De<u>t</u>ail&nbsp;</enrgise:button> <button altKey="wenrgise.common.addRow" styleClass="bottomBarText" disabled="true">&nbsp;&nbsp;Add <u>R</u>ow&nbsp;&nbsp;</button><button altKey="wenrgise.common.delRow" styleClass="bottomBarText" disabled="true" ><u>D</u>elete Row</button></TD>
                    <td width=50%></td>	
                    <TD ><enrgise:img name="ParentForm" property="butPrevDetail" src="../includes/images/butn_dtl_prev.jpg" onmouseover='this.src="../includes/images/butn_dtl_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_dtl_prev.jpg"' alt="Butn_prev (Alt+<)"  onclick="doBasePrevDetail()"/></td>
                    <td class=dtlNavText><bean:write  name="pageNo" /> of <bean:write name="maxPage" /></td>
                    <td  align=right><enrgise:img name="ParentForm" property="butNextDetail" src="../includes/images/butn_dtl_next.jpg" onmouseover='this.src="../includes/images/butn_dtl_next_act.jpg"' onmouseout='this.src="../includes/images/butn_dtl_next.jpg"' alt="Butn_next (Alt+>)" onclick="doBaseNextDetail()"/></td>
                    <td  align=right><enrgise:text property="newPageRequested" size="1" onkeydown="isInteger(event)" styleClass="optional" disabledClass="locked" alt="N" titleKey="wenrgise.common.jumpDetail" /></td>
                    <td ><enrgise:img name="ParentForm" property="butJumpDetail" altKey="wenrgise.common.go" src="../includes/images/go_dtl.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpDetail()" /></td>		     
                  </TR>
                
                  </tbody>
                </TABLE>
		            </TD>
		            <td> </td>
               </tr>
        </TABLE>
      </td>
     </tr>
      <TR>
        <TD background="../includes/images/line_r.gif"><IMG src="../includes/images/pixel.gif" border=0></TD>
      </TR>
      
  </TABLE>
</td>
</tr>
              <!-- Tab Table Ends -->

      <!-- 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-->
    
</TBODY>
</TABLE>

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


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

<html:hidden property="detailDataChanged" name="HrmAprslSpcTmplForm"  />
<html:hidden property="headerDataChanged" name="HrmAprslSpcTmplForm"  />
<html:hidden property="firstLoad" name="HrmAprslSpcTmplForm"  />

<html:hidden property="userPageRequested" name="HrmAprslSpcTmplForm" />
<html:hidden property="userPositionRequested" name="HrmAprslSpcTmplForm" />
<html:hidden property="pageRequested" name="HrmAprslSpcTmplForm" />

<html:hidden property="templateNameId" name="HrmAprslSpcTmplForm" />
<html:hidden property="classHdrId" name="HrmAprslSpcTmplForm" />
<html:hidden property="classDtlId" name="HrmAprslSpcTmplForm" />
<html:hidden property="siteId" name="HrmAprslSpcTmplForm" />
<html:hidden property="deptId" name="HrmAprslSpcTmplForm" />
<html:hidden property="empId" name="HrmAprslSpcTmplForm" />
<html:hidden property="stOrderId" name="HrmAprslSpcTmplForm" />
<html:hidden property="txtEmpId" name="HrmAprslSpcTmplForm" />
<html:hidden property="buttonName" name="HrmAprslSpcTmplForm"  />
<html:hidden property="employeeId" name="HrmAprslSpcTmplForm" />
<html:hidden property="employeeName" name="HrmAprslSpcTmplForm" />
<html:hidden property="empLoyeeNumber" name="HrmAprslSpcTmplForm" />

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

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

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


function doInsertMode()
{
  return "HrmAppSpcEmpNewModeAction.do";
}


function doExecute()
{
  return "HrmAppSpcEmpGetHeaderAction.do";
}

function doSave()
{
  return "HrmAppSpcEmpSaveAction.do";
  
}

function doDelete()
{
  return "HrmAppSpcEmpDeleteAction.do";
  
}

function doRefresh()
{
  return "HrmAppSpcEmpRefreshAction.do";
  
}

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

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

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

function doGetDetail()
{

  return "HrmAppSpcEmpGetDetailAction.do";
}

function doAddRow()
{
  return "HrmAppSpcEmpAddRowAction.do"; 
}

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


function doPrevDetail()
{

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

  return "HrmAppSpcEmpExitAction.do";  
}
function doNextDetail()
{

  return "HrmAppSpcEmpGetDetailPageAction.do";
}

function doJumpDetail()
{
  return  "HrmAppSpcEmpGetDetailPageAction.do"; 
}
/*function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmAppSpcEmpOnLoadAction.do"; 
  }
}*/

function ShowSplTemplateName()
{
        document.forms[0].lovKey.value = "AprslSplTempName" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.splTemplateName";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,splTemplateName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
        return true;
}

function ShowTemplateName()
{
        document.forms[0].lovKey.value = "AprslTempName" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.templateName";
        document.forms[0].txtDisplayFields.value = "templateNameId,templateName";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
        return true;
}
function ShowClassHdr()
{
    document.forms[0].lovKey.value = "AprslSpcClsHdr" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.classHdr";
    document.forms[0].txtDisplayFields.value = "classHdrId,classHdr,classHdrDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowClassDtl()
{
       
    document.forms[0].queryParam.value ="SelOpt="+ document.forms[0].classHdrId.value +" " ;
    document.forms[0].lovKey.value = "AprslSpcClsDtl" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.classDtl";
    document.forms[0].txtDisplayFields.value = "classDtlId,classDtl,classDtlDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;

}
function ShowSiteCode()
{
        document.forms[0].lovKey.value = "AprslSpcSiteCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.siteCode";
    document.forms[0].txtDisplayFields.value = "siteId,siteCode,siteDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowDeptCode()
{
    document.forms[0].queryParam.value ="SelOpt="+ document.forms[0].siteId.value +" " ;
    document.forms[0].lovKey.value = "AprslSpcDeptCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.deptCode";
    document.forms[0].txtDisplayFields.value = "deptId,deptCode,deptDesc";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowEmpNo()
{
    document.forms[0].lovKey.value = "AprslSpcEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.empNo";
    document.forms[0].txtDisplayFields.value = "empId,empNo,empName";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowStOrderNo()
{
    document.forms[0].lovKey.value = "AprslStartOrd" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
    document.forms[0].txtSearchFields.value = "hrm.ApprslSpcTemp.stOrderNo";
    document.forms[0].txtDisplayFields.value = "stOrderId,stOrderNo,fromDate,toDate";
    document.forms[0].multipleFlag.value = "false";
    showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
    return true;
}
function ShowEmpName(i)
{
        document.forms[0].lovKey.value = "AppraisalKPAGrpCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.document.forms[0].KPAGrpCode,hrm.document.forms[0].description";
        document.forms[0].txtDisplayFields.value = "kpaGrpId,kpaGroupCode,description";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/HRMS/JSP/CommonSearchScreen.jsp" />','HrmAprslSpcTmplForm');
        return true;
}

function doApprove()
{
    document.forms[0].buttonName.value="butApprove";
    document.forms[0].action="/enrgise/HrmAprslSpcTmplButtonAction.do";
    document.forms[0].submit();
}
function doReject()
{
    document.forms[0].buttonName.value="butReject";
    document.forms[0].action="/enrgise/HrmAprslSpcTmplButtonAction.do";
    document.forms[0].submit();
}

function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}

</script>