<%--
 The contents of this file are subject to the terms 
 of the Common Development and Distribution License 
 (the License).  You may not use this file except in
 compliance with the License.
 
 You can obtain a copy of the license at 
 https://glassfish.dev.java.net/public/CDDLv1.0.html or
 glassfish/bootstrap/legal/CDDLv1.0.txt.
 See the License for the specific language governing 
 permissions and limitations under the License.
 
 When distributing Covered Code, include this CDDL 
 Header Notice in each file and include the License file 
 at glassfish/bootstrap/legal/CDDLv1.0.txt.  
 If applicable, add the following below the CDDL Header, 
 with the fields enclosed by brackets [] replaced by
 you own identifying information: 
 "Portions Copyrighted [year] [name of copyright owner]"
 
 Copyright 2006 Sun Microsystems, Inc. All rights reserved.
--%>

<%@ page info="Header2" language="java" contentType="text/html; charset=UTF-8" %>
<%@ page import = "com.sun.enterprise.tools.admingui.ConfigProperties" %>
<%@ page import = "com.sun.enterprise.tools.admingui.util.Util" %>
<%@taglib uri="/jato.tld" prefix="jato"%>
<%@taglib uri="/cc.tld" prefix="cc"%>

<jato:useViewBean type="com.iplanet.jato.view.ViewBean" className="Header2">

<!-- Header -->
<cc:header pageTitle="header.PageTitle" copyrightYear="2003" name="HtmlHeader" styleClass="BcmGryTbl"
 baseName="com.sun.enterprise.tools.admingui.resources.Resources" bundleID="testBundle">

<script language="JavaScript" src="../js/iasadmin.js"></script> 
<script language="JavaScript">
<!--
//alert("frame name is :"+top.name);
function getMessage(name) {
    var form = document.forms[0];
    if (! form) {
        return name;
    }
    hidden = form.elements[name];
    if (! hidden) {
        return name;
    }
    return hidden.value;
}

function helpError() {
    alert(getMessage("masthead.noHelpAvailable"));
}

function getHelpLink( name ) {
    var frame = findFrame(name);
    if (frame == null) {
         return null;
    }
    form = frame.document.forms[0];
    if (!form) {
         return null;
    }
    hid= form.elements["helplink"];
    if ( !hid ) {
        form = frame.document.forms[1];
        if (!form) {
             return null;
        }
        hid= form.elements["helplink"];
        if ( !hid ) {
            return null;
        }
    }
    return hid;
}

function doHelp(obj) {
    var str = obj.href;
    var hid = getHelpLink( "content" );
    if ( !hid ) {
        hid = getHelpLink( "main-header" );
        if ( !hid ) {
            hid = getHelpLink( "main");
            if ( !hid ) {
                helpError();
                return;
            }
        }
    }
    hid= hid.value;
    str = str.replace("CONTEXT_HELP", hid);
    openInHelpWindow(str);
    return;

}
// -->
</script>

<!-- Form -->
<jato:form name="Form" method="post">

<jato:content name="resourceStrings">
masthead.versionLink.title
masthead.consoleLink.title
masthead.logoutLink.title
masthead.upgradeLink.title
masthead.helpLink.title
masthead.restartRequired
masthead.logout.message
masthead.noHelpAvailable
masthead.restartStatusMsg
</jato:content>

<div class="MstDiv">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="MstTblTop" title="">
<tr>
  <td nowrap="nowrap" align="left" valign="top">
    <cc:href name="consoleLink" bundleID="testBundle"
            defaultValue="/admingui"
            styleClass="MstLnk"
            title="masthead.consoleLink.title" 
            onMouseOver="window.status='Return to Console Home Page'; return true" 
            onFocus="window.status='Return to Console Home Page'; return true" 
            onMouseOut="window.status=''; return true" 
            onBlur="window.status=''; return true" 
            target="_top">
        <cc:text name="consoleLinkText" bundleID="testBundle" defaultValue="masthead.consoleLink.text" />
    </cc:href>
    <cc:href name="versionLink" bundleID="testBundle"
            styleClass="MstLnk" 
            target="versionWindow" 
            title="masthead.versionLink.title" 
            onMouseOver="javascript:window.status=getMessage('masthead.versionLink.title'); return true" 
            onFocus="javascript:window.status=getMessage('masthead.versionLink.title'); return true" 
            onMouseOut="javascript: window.status=''; return true" 
            onBlur="javascript: window.status=''; return true" 
            onClick="javascript:var win = window.open('','versionWindow','height=500,width=650,top='+((screen.height-(screen.height/1.618))-(500/2))+',left='+((screen.width-650)/2)+',scrollbars,resizable');win.focus()" >
        <cc:text name="versionLinkText" bundleID="testBundle" defaultValue="masthead.versionLink.text" />
    </cc:href>
  </td>
  <td nowrap="nowrap" align="right" valign="top">
<jato:content name="upgradeLinkDisplay">
    <cc:href name="upgradeLink" bundleID="testBundle"
            styleClass="MstLnk"  
            title="masthead.upgradeLink.title" 
            target="_top">
        <cc:text name="upgradeLinkText" bundleID="testBundle" defaultValue="masthead.upgradeLink.text" />
    </cc:href>
</jato:content>
    <cc:href name="registrationLink" bundleID="testBundle"
            styleClass="MstLnk"  
            title="masthead.registrationLink.title" 
            target="_top">
        <cc:text name="registrationLinkText" bundleID="testBundle" defaultValue="masthead.registrationLink.text" />
    </cc:href>
    <cc:href name="logoutLink" bundleID="testBundle"
            styleClass="MstLnk"  
            title="masthead.logoutLink.title" 
            onClick="javascript: return confirm(getMessage('masthead.logout.message'));" 
            onMouseOver="window.status=getMessage('masthead.logoutLink.title'); return true" 
            onMouseOut="window.status=''; return true" 
            onBlur="window.status=''; return true" 
            onFocus="window.status=getMessage('masthead.logoutLink.title'); return true" 
            target="_top">
        <cc:text name="logoutLinkText" bundleID="testBundle" defaultValue="masthead.logoutLink.text" />
    </cc:href>
    <cc:helpwindow helpFileName="CONTEXT_HELP" 
	    bundleID="testBundle"
            styleClass="MstLnk"  
	    onClick="doHelp(this); return false;"
            pathPrefix=""  
	    helpType="help2">

        <cc:text name="helpLinkText" bundleID="testBundle" defaultValue="masthead.helpLink.text" />
    </cc:helpwindow>
  </td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="MstTbl" title="">
<tr>
  <td width="99%" class="MstTdTtl">
    <div class="MstDivUsr"> 
    <span class="MstLbl"><b><cc:text name="usernameText" bundleID="testBundle" defaultValue="masthead.username" /></b></span>&nbsp;
    <span class="MstTxt"><cc:text name="username" bundleID="testBundle" defaultValue="masthead.userNamePlaceHolder" /></span>&nbsp;&nbsp;&nbsp;
    <span class="MstLbl"><b><cc:text name="serverText" bundleID="testBundle" defaultValue="masthead.server" /></b></span>&nbsp;
    <span class="MstTxt"><cc:text name="servername" bundleID="testBundle" defaultValue="masthead.serverNamePlaceHolder" /></span>&nbsp;&nbsp;&nbsp;
    <span class="MstLbl"><b><cc:text name="domainText" bundleID="testBundle" defaultValue="masthead.domain" /></b></span>&nbsp;
    <span class="MstTxt"><cc:text name="domainname" bundleID="testBundle" defaultValue="masthead.domainNamePlaceHolder" /></span>
    </div>
    <div class="MstDivTtl">
    <cc:image name="ProdName" bundleID="testBundle" 
        defaultValue="masthead.sjsas.image"
        alt="masthead.productName.alt" border="0" height="28" width="500" />
    </div>
  </td>
<jato:content name="formatAlert">
  <td align="right">
    <img src="/com_sun_web_ui/images/masthead/statusarea-separator.jpg" alt="" width="1" height="61" />
  </td>
  <td nowrap="nowrap" class="MstTdAlm">
    <div class="MstStatDiv"> 
        <table border="0" cellpadding="0" cellspacing="0" title="">
          <tr>
            <td valign="top">
              <cc:image name="alertImage" bundleID="testBundle" 
                defaultValue="masthead.restartRequired.image" 
                alt="masthead.restartRequired" height="21" vspace="3" width="21" />
              &nbsp;&nbsp;
            </td>
            <td nowrap="nowrap" class="MstTdAlm" valign="top"><div class="MstAlmDiv">
              <cc:href name="restartLink" bundleID="testBundle" 
                styleClass="MstAlmLnk"  
                title="masthead.restartStatusMsg"
                onMouseOver="window.status=getMessage('masthead.restartStatusMsg'); return true"
                onMouseOut="window.status=''; return true"
                onBlur="window.status=''; return true"
                onFocus="window.status=getMessage('masthead.restartStatusMsg'); return true"
                target="main"><span class="MstAlmMajTxt">
              <cc:text name="restartRequiredText" bundleID="testBundle" 
                    defaultValue="masthead.restartRequired" /></span>
              </cc:href><br /></div>
            </td>
          </tr>
        </table>
    </div>
  </td>
  <td>
    <img src="/com_sun_web_ui/images/masthead/statusarea-separator.jpg" 
         alt="" width="1" height="61" />
  </td>
</jato:content>
  <td width="1%" class="MstTdLogo">
    <img src="/com_sun_web_ui/images/other/javalogo.gif" 
       width="31" height="55" alt="Java Logo" />
  </td>
</tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="MstTblEnd">
<tr><td>
  <img src="/com_sun_web_ui/images/masthead/masthead-sunname.gif" 
       alt="Sun Microsystems, Inc." width="108" height="10" align="right" />
</td></tr>
</table>
</div>
<jato:hidden name="restartRequired" />
</jato:form>
</cc:header>
</jato:useViewBean>
