<c:set var="welcome_gif" value="images/i_welcome.gif"/>
<c:set var="faq_gif" value="images/i_faq.gif"/>
<c:set var="area_gif" value="images/i_area.gif"/>
<c:set var="topic_gif" value="images/i_topic.gif"/>
<c:set var="ws_gif" value="images/i_webservice.gif"/>

<%-- Use JSTL to determine selected tab based on "tab" parameter --%>
<c:choose>
   <c:when test="${tab == 'home'}"><c:set var="welcome_gif" value="images/a_welcome.gif"/></c:when>
   <c:when test="${tab == 'faq'}"><c:set var="faq_gif" value="images/a_faq.gif"/></c:when>
   <c:when test="${tab == 'area'}"><c:set var="area_gif" value="images/a_area.gif"/></c:when>
   <c:when test="${tab == 'topic'}"><c:set var="topic_gif" value="images/a_topic.gif"/></c:when>
   <c:when test="${tab == 'webservices'}"><c:set var="ws_gif" value="images/a_webservice.gif"/></c:when>
</c:choose>

<%-- Compute page tile and header message resource key suffix --%>
<%
    String tab = (String)pageContext.getAttribute("tab");
    String mode = ("error".equals(tab) || "warning".equals(tab)) ? null : request.getParameter("action");
    String pageSuffix = (mode != null && mode.length() > 0) ? "." + mode : "";
    String title = tab + ".title" + pageSuffix;
    String header = tab + ".header" + pageSuffix;
%>
<head>
   <title>
      <bean:message key="<%=title%>"/>
   </title>
   <link type="text/css" rel="stylesheet" href="faqapp.css">
</head>

<body bgcolor="#ffffff" background="images/background.gif">

<table cellspacing=0 cellpadding=0 width="100%" border=0>
  <tbody>
  <tr>
    <td valign=top noWrap scope="col">
      <p class=title2><a href="<bean:message key="navigation.home"/>"
         target="_top"><img src="images/oracle_big.gif"
         alt="[<bean:message key="home.header"/>]" border="0"></a>
	<br><a href="<bean:message key="navigation.home"/>"
         target="_top"><img src="images/faq_app.gif"
         alt="[<bean:message key="home.header"/>]" border="0"></a><br>
    </td>
    <td width="100%" scope="col"></td>
    <td valign=top noWrap scope="col">
      <p class=copyright></p>
    </td>
    <td noWrap width="2%" scope="col"></td>
    <td valign=top noWrap scope="col">
      <p class=copyright><br>
        <a href="<bean:message key="navigation.contact.us.link"/>"
           target="_top"><img src="images/contact.gif"
           alt="[<bean:message key="navigation.contact.us"/>]" width="32" height="32" border="0"></a><br>
        <a href="<bean:message key="navigation.contact.us.link"/>"
           target="_top"><bean:message key="navigation.contact.us"/></a></p>
    </td>
  </tr>
  </tbody>
</table>

<table cellspacing="0" cellpadding="0" border="0" width="100%">
   <tr>
    <td class="tabs" width="100%">
      <a href="<bean:message key="navigation.home"/>"
         target="_top"><img src="<c:out value="${welcome_gif}"/>"
         alt="[<bean:message key="home.header"/>]" border=0 ></a>
      <a href="<bean:message key="navigation.faq.create"/>"
         target="_top"><img src="<c:out value="${faq_gif}"/>"
         alt="[<bean:message key="faq.header"/>]" border=0 ></a>
      <a href="<bean:message key="navigation.area.create"/>"
         target="_top"><img src="<c:out value="${area_gif}"/>"
         alt="[<bean:message key="area.header"/>]" border=0 ></a>
      <a href="<bean:message key="navigation.topic.create"/>"
         target="_top"><img src="<c:out value="${topic_gif}"/>"
         alt="[<bean:message key="topic.header"/>]" border=0 ></a>
      <a href="<bean:message key="navigation.webservices"/>"
         target="_top"><img src="<c:out value="${ws_gif}"/>"
         alt="[<bean:message key="webservices.header"/>]" border=0 ></a>
    </td>
   </tr>
</table>

<h2><center><bean:message key="<%=header%>"/></center></h2>

<%--
Use Struts html tag lib to display Struts errors
encountered during action processing
--%>
<html:errors/>

