<%--
  /**
   * Copyright (c) 2003 by Sun Microsystems, Inc. All rights reserved.
   * Use is subject to license terms.
   *
   * "@(#)top.jsp    1.18    03/05/14     SMI"
   * 
   */
 --%>

<!-- BEGIN SECTION:  start page header -->
<!-- MANDATORY section on all pages -->





<% boolean loggedIn=false; %>
<% if (session.getAttribute(com.sun.netstorage.array.mgmt.cfg.core.Constants.HttpSessionFields.CONFIG_CONTEXT) != null && session.getAttribute("_stall_thread") == null) {
	
	loggedIn = true;
}

String helpDir = 
  com.sun.netstorage.array.mgmt.cfg.core.Constants.DEFAULT_HELPDIR;
String localeStr = request.getLocale().toString();
// if we have a locale string
if(localeStr != null || !"".equals(localeStr)) {
  //  and it's either japanese, chinese, or french
  //   then append the locale str
  if ("ja".equals(localeStr) ||
      "fr".equals(localeStr)) {
     helpDir = helpDir + "_" + localeStr;
  } else if("zh_CN".equalsIgnoreCase(localeStr)) {
     helpDir = helpDir + "_zh_CN";
  }
}
%>

<div class="simple-layout">

  <!-- header blue-background table with major manu tabs -->
  <table bgcolor="#666699" border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr valign="top">
      <td width="1%"><a href="http://www.sun.com" target="_blank"><img alt="Sun Microsystems, Inc." border="0" src="images/logo/sunlogo_web.gif" width="118" height="60"></a></td>
      <td colspan="2" width="99%">
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr bgcolor="#000000">
            <td><img alt border="0" height="25" src="images/general/white-black.gif" width="2"></td>
            <td><img alt border="0" height="25" src="images/general/dot.gif" width="2"></td>
            <td><img alt="Configuration Service" border="0" src="images/logo/configuration_service_name.gif" width="176" height="21"></td>
            <td><img alt border="0" height="25" src="images/general/dot.gif" width="5"></td>
            <td align="right" nowrap>
            <!-- if aui is null, then we are not logged in yet; don't show
                 help and logoff links
            -->
            <% if(loggedIn) { %>
             <a class="masthead-link-text" href="logoff.do">
                <bean:message key="logout"/>
             </a> 
            <span class="masthead-link-divider">&nbsp;|&nbsp;</span> 
            <a class="masthead-link-text" href="root.menu.item5.item0.do">
                <bean:message key="search"/>
            </a>
            <span class="masthead-link-divider">&nbsp;|&nbsp;</span>
            <% } %>
            	<%
            	
            		String topic=(String)request.getAttribute("_HelpTopic");
            		Trace.verbose(this, "top", ">>>>>>>>>>>>>>>>>>>>> HELP_TOPIC:" + topic);
            	%>
               <a class="masthead-link-text" href="#" onclick="helpwindow = window.open('<%=request.getContextPath()%>/<%=helpDir%>/wwhelp.htm?context=ConfigSvc&topic=<%=topic%>','Properties','scrollbars,resizable,toolbar,width=640,height=480'); helpwindow.focus()"><bean:message key="help"/></a></td>
            <td><img alt border="0" height="25" src="images/general/dot.gif" width="5"></td>
          </tr>
          <tr bgcolor="#ffffff">
            <td><img alt border="0" height="1" src="images/general/dot.gif" width="2"></td>
            <td colspan="5"><img alt border="0" src="images/general/dot.gif" width="1" height="1"></td>
          </tr>
          <tr height="35">
            <td><img alt border="0" height="35" src="images/general/dot.gif" width="2"></td>
            <td colspan="5" valign="bottom">
              <table border="0" cellpadding="0" cellspacing="0" width="100%">
                <tr>
                  <td valign="top">
                    <p align="right" style="margin-bottom: -1"><a class="timestamp-text"><font color="#FFFFFF">
		    <% String servletPath1 = request.getServletPath();
		    	if(aui != null && (servletPath1 != null && servletPath1.indexOf("Stall.jsp") < 0)) { 	
                    %>
                    	<%=com.sun.netstorage.array.mgmt.cfg.ui.business.SPDate.getServiceProcessorDate(request.getLocale(), (com.sun.netstorage.array.mgmt.cfg.core.ConfigContext)session.getAttribute(Constants.HttpSessionFields.CONFIG_CONTEXT))%>
		    <% } %>
                    </font></a><font color="#FFFFFF"> &nbsp;</font></p>
                    
                    <% if (loggedIn && haveTabs) { %>
                    <%@ include file="top_major_tabs.jsp" %>
                    <% } else {%>
                    <%@ include file="top_no_tabs.jsp" %>                    
					<% } %>                    
                  </td>
                </tr>
              </table>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  
  <% if (loggedIn&& haveTabs && userData.isVisibleMenu(selectedItem, aui.username)) { %>
  <%@ include file="top_minor_tabs.jsp" %>
  <% } %>

</div>
<!-- END SECTION:  end page header -->



