<%@ taglib uri="/tags/struts-bean-el" prefix="bean-el" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html-el" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<c:set var="eligibilityButton" scope="page"><bean-el:message key="button.person.eligibility"/></c:set>
<c:set var="demographicsButton" scope="page"><bean-el:message key="button.person.demographics"/></c:set>
<c:set var="militaryServiceButton" scope="page"><bean-el:message key="button.person.militaryService"/></c:set>
<c:set var="financialsButton" scope="page"><bean-el:message key="button.person.financials"/></c:set>
<c:set var="facilityButton" scope="page"><bean-el:message key="button.person.facility"/></c:set>

<%-- Alt Text --%>
<c:set var="eligibilityText" scope="page"><bean-el:message key="menu.eligibility"/>&nbsp;<bean-el:message key="label.tab"/></c:set>
<c:set var="demographicsText" scope="page"><bean-el:message key="menu.demographics"/>&nbsp;<bean-el:message key="label.tab"/></c:set>
<c:set var="militaryServiceText" scope="page"><bean-el:message key="menu.militaryservice"/>&nbsp;<bean-el:message key="label.tab"/></c:set>
<c:set var="financialsText" scope="page"><bean-el:message key="menu.financials"/>&nbsp;<bean-el:message key="label.tab"/></c:set>
<c:set var="facilityText" scope="page"><bean-el:message key="menu.facility"/>&nbsp;<bean-el:message key="label.tab"/></c:set>
<c:set var="selectedTabText" scope="page"><bean-el:message key="label.selectedTab"/>,&nbsp;</c:set>

<c:choose>
<c:when test="${tabName == 'eligibility'}">
  <c:set var="eligibilityImage" scope="page">on</c:set>
  <c:set var="eligibilityText" scope="page" value="${selectedTabText}${eligibilityText}"/>
</c:when>
<c:otherwise>
  <c:set var="eligibilityImage" scope="page">off</c:set>
</c:otherwise>
</c:choose>

<c:choose>
<c:when test="${tabName == 'demographics'}">
  <c:set var="demographicsImage" scope="page">on</c:set>
  <c:set var="demographicsText" scope="page" value="${selectedTabText}${demographicsText}"/>
</c:when>
<c:otherwise>
  <c:set var="demographicsImage" scope="page">off</c:set>
</c:otherwise>
</c:choose>

<c:choose>
<c:when test="${tabName == 'militaryService'}">
  <c:set var="militaryServiceImage" scope="page">on</c:set>
  <c:set var="militaryServiceText" scope="page" value="${selectedTabText}${militaryServiceText}"/>
</c:when>
<c:otherwise>
  <c:set var="militaryServiceImage" scope="page">off</c:set>
</c:otherwise>
</c:choose>

<c:choose>
<c:when test="${tabName == 'financials'}">
  <c:set var="financialsImage" scope="page">on</c:set>
  <c:set var="financialsText" scope="page" value="${selectedTabText}${financialsText}"/>
</c:when>
<c:otherwise>
  <c:set var="financialsImage" scope="page">off</c:set>
</c:otherwise>
</c:choose>

<c:choose>
<c:when test="${tabName == 'facility'}">
  <c:set var="facilityImage" scope="page">on</c:set>
  <c:set var="facilityText" scope="page" value="${selectedTabText}${facilityText}"/>
</c:when>
<c:otherwise>
  <c:set var="facilityImage" scope="page">off</c:set>
</c:otherwise>
</c:choose>
  
<%@ include file="/admin/csrfgentoken.jsp" %>

<table cellSpacing="0" cellPadding="0" border="0">
  <tr valign="bottom">
    <td><html-el:link styleClass="tabLink" href="javascript:submitForm(personMergeDetailForm, 'methodNameId', '${eligibilityButton}');"><html-el:img alt="${eligibilityText}" src="/esr/images/tabs_eligibility_${eligibilityImage}.gif" border="0"/></html-el:link></td>
    <td><html-el:link styleClass="tabLink" href="javascript:submitForm(personMergeDetailForm, 'methodNameId', '${demographicsButton}');"><html-el:img alt="${demographicsText}" src="/esr/images/tabs_demographic_${demographicsImage}.gif" border="0"/></html-el:link></td>
    <td><html-el:link styleClass="tabLink" href="javascript:submitForm(personMergeDetailForm, 'methodNameId', '${militaryServiceButton}');"><html-el:img alt="${militaryServiceText}" src="/esr/images/tabs_militaryservice_${militaryServiceImage}.gif" border="0"/></html-el:link></td>
    <td><html-el:link styleClass="tabLink" href="javascript:submitForm(personMergeDetailForm, 'methodNameId', '${financialsButton}');"><html-el:img alt="${financialsText}" src="/esr/images/tabs_financials_${financialsImage}.gif" border="0"/></html-el:link></td>
    <td><html-el:link styleClass="tabLink" href="javascript:submitForm(personMergeDetailForm, 'methodNameId', '${facilityButton}');"><html-el:img alt="${facilityText}" src="/esr/images/tabs_facility_${facilityImage}.gif" border="0"/></html-el:link></td>
    <td width="100%" style="border-bottom: 1px solid #000000;">&nbsp;</td>
  </tr>
</table>
