<%@ 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="HrmAdvJobDescBaseAction" 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>
         </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','AdvJobDescGetTabAction.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','AdvJobDescGetTabAction.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=#76A2C7><IMG height=1 src="../includes/images/pixel.gif"  border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7 onclick="doGetTab('HrmRecAdvAttrWorkExpDtl','AdvJobDescGetTabAction.do')">Work Experience<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=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD class=actTabText noWrap bgColor=#4682b4 >Job Description<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" width=10 border=0></TD>
                <TD class=disTabText noWrap bgColor=#76A2C7 onclick="doGetTab('HrmRecAdvAttrSkillReqDtl','AdvJobDescGetTabAction.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','AdvJobDescGetTabAction.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" >
  			<!-- Detail table starts -->
                        <TABLE cellSpacing=0 cellPadding=0 id="AdvJobDesc">
                         <TBODY>
                          <tr>
                              <TD class=tableHeader width="1%"><html:checkbox  property="selectAll"  onclick="toggleCheckBox('checked')"  /></td>
                              <TD class=tableHeader width="33%"><bean:message key="hrm.HrmEmpPersonalDetailsEdu.srlNo" /></td>
                              <TD class=tableHeader width="33%"><bean:message key="hrm.HrmEmpPersonalDetailsPriorExp.jobDescription" /></td>
                              
                         </tr>
                         <logic:iterate id="jobDesc" name="HrmRecAdvAttrForm" property="arylstHrmAdvJobDescDtl" type="wenrgise.hrms.bean.HrmRecAdvAttrJobDescDtlBean" indexId="idx" >
                      <logic:notEqual name="jobDesc" property="status" value="D" >           
                       <tr>
                           <td ><html:checkbox property="checked"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /><html:hidden property="detailId" name="jobDesc" /><html:hidden property="itemChecked" name="jobDesc" /><html:hidden property="status"  name="jobDesc" /><html:hidden property="hdnPrevDtlId"  name="jobDesc" /></td>
                          <td ><html:text  property="txtSrlNo"  name="jobDesc" titleKey="hrm.HrmAdvertisementAttribute.langCode" size="15" styleClass="required"  maxlength="4" style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                          <td ><html:text  property="txtJobDesc"  name="jobDesc" titleKey="hrm.HrmAdvertisementAttribute.langDesc" size="15" styleClass="required" maxlength="100"  style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                        </tr>
                  </logic:notEqual>
                  <logic:equal name="jobDesc" property="status" value="D"  >
                        <tr>
                            <td ><html:checkbox  disabled="true" property="checked"  alt="<%=idx.toString()%>" onclick="boxClicked(this.alt);" /><html:hidden property="detailId" name="jobDesc" /><html:hidden property="itemChecked" name="jobDesc" /><html:hidden property="status"  name="jobDesc" /><html:hidden property="hdnPrevDtlId"  name="jobDesc" /></td>
                            <td ><html:text  property="txtSrlNo"  name="jobDesc" titleKey="hrm.HrmAdvertisementAttribute.qualCode" size="15" styleClass="deletedRow" maxlength="4" readonly="true"  style="width:100%" alt="P"  onchange='<%="doChangeDetail("+idx.toString()+")"%>' /></td>
                            <td ><html:text  property="txtJobDesc"  name="jobDesc" titleKey="hrm.HrmAdvertisementAttribute.langDesc" size="15" styleClass="deletedRow" maxlength="100" readonly="true"  style="width:100%" 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>
                      </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>
                    </TR>
                </table>
            </td>
          </tr>
 
<!-- Container Table Ending Columns Starts-->
  </TD>
    
</TR>
</TBODY>
</TABLE>

<!-- Container Table Ends -->
<html:hidden property="screenName" name="HrmRecAdvAttrForm" value="HrmRecAdvAttrJobDesc" />
<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="userPageRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="userPositionRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="pageRequested" name="HrmRecAdvAttrForm" />
<html:hidden property="prevDtlId" name="HrmRecAdvAttrForm"  />
<!------ addded for LOV ----->
<html:hidden property="firstLoad" name="HrmRecAdvAttrForm"  />
<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 "AdvJobDescExitAction.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 "AdvJobDescSaveAction.do";
  
}
function doQueryMode()
{
 document.forms[0].changeEnb.value="S";
 document.forms[0].desgn.value="";
  return "AdvJobDescQueryModeAction.do";
}

function doRefresh()
{
  return "AdvJobDescRefreshAction.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 "AdvJobDescGetDetailAction.do";
}

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

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

function doGetDetailTableName()
{
  return "AdvJobDesc";
}

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

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

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

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

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 "AdvJobDescValidateAction.do"; 
}

</script>