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


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

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

<table>
<tr height="10">
<td colspan=12></td>
</tr>
</table>
<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.HrmAdvertisementAttribute.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>
    <tr>
        <td height=10>    
    </tr>
</TABLE>

<!--container table starts -->
<TABLE cellSpacing=0 cellPadding=0 border=0 >
 <TBODY>
  <TR>
    <TD>
     <!-- Body table Starts -->
      <TABLE cellSpacing=0 cellPadding=0 >
        <!--General Informationrmation Row Starts -->
       <tr>
        <td  class="subHeader" colspan=6 >Advertisement Attributes</td>
       </tr>
        <tr>
                 <td bgcolor="#4682B4"  align="right"  colspan=8 ><img src="../includes/images/pixel.gif" width="" height="1" border="0"></td>
       </tr>
        
        
        <tr>
                     <td  class="labelText"   ><bean:message key="hrm.HrmAdvertisementAttribute.refNo" /></td>
                     <td  ><html:text  property="refNo" titleKey="hrm.HrmAdvertisementAttribute.refNo" alt="AN" maxlength="25" size="23" styleClass="required" readonly="true"  /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butrefNo"  name="HrmRecAdvAttrForm" onclick="ShowRefNo();" /><html:hidden property="refId" name="HrmRecAdvAttrForm" /></td>
                     <td  class="labelText"   ><bean:message key="hrm.HrmAdvertisementAttribute.position" /></td>
                     <td  ><html:text  property="desgn" titleKey="hrm.HrmAdvertisementAttribute.position" alt="AN" maxlength="25" size="23"  styleClass="required"  readonly="true" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" styleClass="icon" property="butPosition"  name="HrmRecAdvAttrForm" onclick="ShowPositionNo();" />
                     <html:text  property="category" titleKey="hrm.HrmAdvertisementAttribute.position" alt="AN" maxlength="25" size="40"  styleClass="required"  readonly="true" /></td>
                      <td width="20%"></td>
         </tr> 
               
               <!--User Information Row Starts -->
        <tr height="10" >
               <td colspan="6"></td>
                <td width="14%"></td>
         </tr>
               
      </table>
        
      
         <table cellspacing=0 cellpadding=0 border=0>
         <!-- Detail Information Row starts -->
 	 <TR>
       <TD colspan=6>
        <!--  Details Table Starts -->
         <TABLE cellSpacing=0 cellPadding=0 >
           <tr>
                <TD  bgColor=#76A2C7><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7  onclick="doGetTab('HrmRecAdvAttrQualReqDtl','AdvWorkExpGetTabAction.do')">Qualification Requirement<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_lb.gif" width=10  border=0></TD>                  
                                
                <TD  bgColor=#76A2C7><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7  onclick="doGetTab('HrmRecAdvAttrLocVacencyDtl','AdvWorkExpGetTabAction.do')">Location Wise Vacancy<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_lb.gif" width=10  border=0></TD>    
                
                <TD  bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif"  border=0></TD>
                <TD class=actTabText noWrap bgColor=#4682b4>Work Experience<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_r.gif" width=10  border=0></TD>     
                
                <TD  bgColor=#76A2C7><IMG height=1 src="../includes/images/pixel.gif"  border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7  onclick="doGetTab('HrmRecAdvAttrJobDesc','AdvWorkExpGetTabAction.do')">Job Description<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_lb.gif" width=10  border=0></TD>         
                                                
                <TD  bgColor=#76A2C7><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7  onclick="doGetTab('HrmRecAdvAttrSkillReqDtl','AdvWorkExpGetTabAction.do')">General Skill Requirement<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_lb.gif" width=10  border=0></TD>     
                                
                <TD width=10 bgColor=#76A2C7><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7  onclick="doGetTab('HrmRecAdvAttrLngReqDtl','AdvWorkExpGetTabAction.do')">Language Requirement<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_lb.gif" width=10  border=0></TD>                              
                                
                <td width="45%"></td>
                

          </tr>                  
          <TR >
 <!-- Detail table Container starts -->
              <TD colspan=19>
                <TABLE cellSpacing=0 cellPadding=0 border=0>
                  <TBODY>
                   <TR>
                     <TD >
                       <DIV id=divDtlTable style="height:250px;width:1010px" >
  			<!-- Detail table starts -->
                        <TABLE cellSpacing=0 cellPadding=0 id="advWorkExp">
                         <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><html:checkbox  property="selectAll"  onclick="toggleCheckBox('checked')"  /></td>
                              <TD class=tableHeader ><bean:message key="hrm.HrmAdvertisementAttribute.reqExp" /></td>
                              <TD class=tableHeader ><bean:message key="hrm.HrmAdvertisementAttribute.desc" /></td>
                              <TD class=tableHeader ><bean:message  key="hrm.HrmAdvertisementAttribute.expArea" /></td>
                              <TD class=tableHeader ><bean:message  key="hrm.HrmAdvertisementAttribute.exposureIn" /></td>
                              <TD class=tableHeader ><bean:message  key="hrm.HrmAdvertisementAttribute.minWrkExp" /></td>
                              <TD class=tableHeader ><bean:message  key="hrm.HrmAdvertisementAttribute.maxWrkExp" /></td>
                              
                         </tr>
                         <logic:iterate id="workExp" name="HrmRecAdvAttrForm" property="arylstHrmAdvWorkExpDtl" type="wenrgise.hrms.bean.HrmRecAdvAttrWorkExpDtlBean" indexId="idx" >
                      <logic:notEqual name="workExp" property="status" value="D" >           
                       <tr>
                           <td ><html:checkbox property="checked"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /><html:hidden property="detailId" name="workExp" /><html:hidden property="itemChecked" name="workExp" /><html:hidden property="status"  name="workExp" /><html:hidden property="workId"  name="workExp" /><html:hidden property="hdnPrevDtlId"  name="workExp" /></td>
                           <td ><html:text  property="txtReqExp" readonly="true"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.reqExp" size="30" styleClass="required"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img src="../includes/images/lov.jpg" height="15" class="icon" align="center" name="butAdvAttrWorkExp"  alt="<%=idx.toString()%>"  onclick=" return ShowWorkExpCode(this.alt);" /></td>
                           <td ><html:text  property="txtWorkDesc" readonly="true"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.desc" size="30" styleClass="required"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtExpArea"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.expArea" maxlength="40" size="30" styleClass="optional"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtExpIn"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.exposureIn" maxlength="40" size="30" styleClass="optional"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtMinWrkExp"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.minWrkExp" maxlength="5" onkeypress="isFloat(event)" size="30" styleClass="required"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtMaxWrkExp"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.maxWrkExp" maxlength="5" onkeypress="isFloat(event)" size="30" styleClass="optional"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                        </tr>
                    </logic:notEqual>
                    <logic:equal name="workExp" property="status" value="D"  >
                        <tr>
                            <td ><html:checkbox  disabled="true" property="checked"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /><html:hidden property="detailId" name="workExp" /><html:hidden property="itemChecked" name="workExp" /><html:hidden property="status"  name="workExp" /><html:hidden property="workId"  name="workExp" /><html:hidden property="hdnPrevDtlId"  name="workExp" /></td>
                            <td ><html:text  property="txtReqExp"  name="workExp"  size="30" styleClass="deletedRow" readonly="true"   alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /><img src="../includes/images/lov_dis.jpg" height="15" class="icon" align="center" name="butAdvAttrWorkExp"  alt="<%=idx.toString()%>"  /></td>
                          <td ><html:text  property="txtWorkDesc"  name="workExp" size="30" styleClass="deletedRow" readonly="true"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtExpArea"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.expArea" readonly="true" maxlength="40" size="30" styleClass="deletedRow"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                            <td ><html:text property="txtExpIn"  name="workExp" titleKey="hrm.HrmAdvertisementAttribute.exposureIn" readonly="true" maxlength="40" size="30" styleClass="deletedRow"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtMinWrkExp"  name="workExp" size="30" styleClass="deletedRow" readonly="true"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                           <td ><html:text property="txtMaxWrkExp"  name="workExp" size="30" styleClass="deletedRow" readonly="true"  alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                        </tr>
                  </logic:equal>
                  </logic:iterate>
            
           <!--Insert Logic Iterate Here-->                                                      
                     </TBODY>
                    </TABLE>
                  </DIV>
                </TD>
              </TR>                     
  
  <!-- Get details starts -->
                        <tr>
                          <td colspan=11>	
                              <jsp:include page="GenDetailMenu.jsp" />
                          </TD>
                          <td width="26%"></td>
                      </tr>
                  </TBODY>
                </TABLE>
              </td>
            </tr>



        </TABLE>
     </td>
	 </tr>
                <!-- Tab Table Ends -->

<!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                    <tr>
                        <td colspan="5" bgColor=#4682b4></td>
                        <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
                        <td width="26%"></td>
                    </TR>
                </table>
            </td>
          </tr>
 
<!-- Container Table Ending Columns Starts-->
  </TD>
    
</TR>
</TBODY>
</TABLE>

<!-- Container Table Ends -->
<html:hidden property="screenName" name="HrmRecAdvAttrForm" value="HrmRecAdvAttrWorkExpDtl" />
<html:hidden name="HrmRecAdvAttrForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="screenMode" name="HrmRecAdvAttrForm" />
<html:hidden property="detailDataChanged" name="HrmRecAdvAttrForm" />
<html:hidden property="headerDataChanged" name="HrmRecAdvAttrForm" />
<html:hidden property="headerPrimaryKey" name="HrmRecAdvAttrForm" />
<html:hidden property="prevDtlId" name="HrmRecAdvAttrForm" />
<html:hidden property="userPageRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="userPositionRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="pageRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="firstLoad" name="HrmRecAdvAttrForm"  />
<!------ addded for LOV ----->

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


<html:hidden property="txtIndex" name="HrmRecAdvAttrForm"  />

<html:hidden property="changeEnb" name="HrmRecAdvAttrForm"  />
<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >

</html:form>
</body>
</html:html>

<script language="javascript">
function boxClicked(val)
{    
    if(document.getElementsByName("checked")[val].checked)
    {      
      document.getElementsByName("itemChecked")[val].value = "Y";      
    }
    else
    {     
      document.getElementsByName("itemChecked")[val].value = "N";     
    }      
}
function doExit()
{
  return "AdvWorkExpExitAction.do";
}
function doSave()
{
  var oTable = document.getElementById(doGetDetailTableName());
    if(oTable == null)
    {
      return;
    }
    var iTr2 = parseInt(oTable.rows.length)-1;
  
for(i=0; i<iTr2; i++)
{
 document.getElementsByName("hdnPrevDtlId")[i].value=document.forms[0].prevDtlId.value;
  }  
  return "AdvWorkExpSaveAction.do";
  
}

function doQueryMode()
{
 document.forms[0].changeEnb.value="S";
 document.forms[0].desgn.value="";
  return "AdvWorkExpQueryModeAction.do";
}

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

function doGetDetail()
{
 document.forms[0].prevDtlId.value=document.forms[0].headerPrimaryKey.value;
  document.forms[0].changeEnb.value="T";
  document.forms[0].screenMode.value="U";
  return "AdvWorkExpGetDetailAction.do";
}

function doAddRow()
{
  document.forms[0].prevDtlId.value=document.forms[0].headerPrimaryKey.value;
  return "AdvWorkExpAddRowAction.do"; 
}

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

function doGetDetailTableName()
{
  return "advWorkExp";
}

function doPrevDetail()
{
  return "AdvWorkExpGetDetailPageAction.do";  
}

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

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

function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "AdvWorkExpOnLoadAction.do"; 
  }
  
}
function ShowWorkExpCode(i)
{
        
        document.forms[0].lovKey.value = "RecAdvAttrWork" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAdvertisementAttribute.reqExp";
        document.forms[0].txtIndex.value = i;
        document.forms[0].txtDisplayFields.value = "workId,txtReqExp,txtWorkDesc";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmRecAdvAttrForm');
}
function ShowRefNo()
{
        document.forms[0].lovKey.value = "HrmRecAdvRefNo" + "HrmRecAdvAttrForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAdvertisementAttribute.refNo";
        document.forms[0].txtDisplayFields.value = "refId,refNo";       
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmRecAdvAttrForm');
        return true;
        
}
function ShowPositionNo()
{
        document.forms[0].queryParam.value ="RefNo="+ document.forms[0].refId.value +" " ;
        document.forms[0].lovKey.value = "HrmRecAdvPositionNo" + "HrmRecAdvAttrForm" + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAdvertisementAttribute.grade,hrm.HrmAdvertisementAttribute.design";
        document.forms[0].txtDisplayFields.value = "headerPrimaryKey,desgn,category";       
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmRecAdvAttrForm');
        return true;
        
}

function doOnChangeLov(lovName)
{
   if((lovName=="HrmRecAdvRefNoHrmRecAdvAttrFormQ") || (lovName=="HrmRecAdvPositionNoHrmRecAdvAttrFormQ"))
    {
    doBaseValidate();
    }
}



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

</script>