
<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="
                                                                             com.novell.emframe.dev.config.SystemConfig,
                                                                             com.novell.emframe.dev.MUtils,
                                                                             com.novell.emframe.fw.LookAndFeelDefaults,
                                                                             com.novell.emframe.fw.authenticator.DirAuthenticator,
                                                                             com.novell.webaccess.common.JSPConduit" %>

<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/iman.tld" prefix="iman" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request); %>
<iman:stringtable bundle="DevResources"/>
<iman:stringtable bundle="FwResources"/>

<iman:eMFrameScripts/>
<iman:dialogScripts/>
<%
  /* ********************************************************************************************************************* */
  /* The formatting part of this template is duplicated in AuthFormDisconn.  If changes are made, change that file as well */
  /* ********************************************************************************************************************* */
  //@todo-- this should be moved to DirAuthenticator.showLoginDlg()
   SystemConfig configuration = new SystemConfig();

   String menuColor = configuration.getSetting("LookAndFeel_MenuColor", LookAndFeelDefaults.MenuColor);
   String headerImage = configuration.getSetting("LookAndFeel_iManagerHeaderBackgroundImage", com.novell.emframe.fw.LookAndFeelDefaults.HeaderBackgroundImage);
   String fillerImage = configuration.getSetting("LookAndFeel_iManagerHeaderFillerImage", com.novell.emframe.fw.LookAndFeelDefaults.HeaderFillerImage);
   String brandingImage = configuration.getSetting("LookAndFeel_iManagerBrandingImage", com.novell.emframe.fw.LookAndFeelDefaults.BrandingImage);
   String orgName = com.novell.emframe.fw.LookAndFeelDefaults.OrganizationName;
   boolean isBrandingImage27 = false;

   if(configuration.getSetting("LookAndFeel_OrganizationName") != null)
      orgName = configuration.getSetting("LookAndFeel_OrganizationName");
      
   if(brandingImage.indexOf("27") != -1)
   		isBrandingImage27=true;

%>
<html>
   <head>
      <title><iman:string key="ProductName" /></title>
      <LINK href="<%= MUtils.getModulesUrl(request) %>/dev/css/hf_style.css" rel="styleSheet" type="text/css">
      <style type= "text/css" media="screen">
         #Headgraphic  { position: absolute; z-index: 0; top: 0px; left: 0px; width: 499px; visibility: visible }
		 #Head1        { position: absolute; z-index: 1; top: 0px; left: 0px; width: 499px; visibility: visible }
		 #Filler1       { position: absolute; z-index: 0; top: 0px; left: 499px; right: 60px; width: 380px; visibility: visible }
         #logo          { position: absolute; z-index: 2; top: 0px; right: 0px; width: 60px; height: 80px; visibility: visible }
<% if(isBrandingImage27) { %> 
		 #logo1         { position: absolute; z-index: 3; top: 0px; right: 0px; width: 60px; height: 80px; visibility: hidden }
<% } else { %> 
		 #logo1         { position: absolute; z-index: 3; top: 0px; right: 0px; width: 60px; height: 80px; visibility: visible }
<% } %> 
         #title   { position: absolute; z-index: 1; top: 25px; left: 12px; width: 208px; visibility: visible }
         #Apptitle1  { position: absolute; z-index: 1; top: 0px; left: 0px; visibility: visible }
		 #Apptitle   { position: absolute; overflow:hidden; z-index: 1; top: 0px; left: 275px; right: 60px; height: 80px; visibility: visible; }
         #Nimage  { position: absolute; top: 10px; left: 10px; width: 100px; height: 103px; visibility: visible }
         #BodyPane  { position: absolute; width: 470px; visibility: visible }
         #FailPane  { position: absolute; width: 470px; visibility: visible }
         .errorhead  { color: #c82727; font-style: normal; font-weight: 800; font-size: 14px; line-height: 18px; }
         .emframeformhead1 { color: white;  font-size: 1.2em; line-height: 1.2em; letter-spacing: 0.0em; background-color: #458ab9; text-align: left; text-indent: 0.5em}
         .emframerulebelow { padding-bottom: 10px; border-bottom: 2px solid #458ab9 }
         .apptitle1 {color: white; text-decoration: none; font-weight: normal; font-size: 2.2em; line-height: 1.9em; background: url(<c:out value="${ContextPath}" />/portal/modules/fw/images/iMan27_H1_L1_bg.gif) repeat-x 0% 0%  }
         body { background: white url(<c:out value="${ContextPath}" /><%= fillerImage %>) repeat-x 0% 0% }
      </style>
      <iman:include page="dev/HelpScripts_inc.jsp" />      
   </head>
   <body bgcolor="white" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" onLoad="activateImanDialog('authenticate');pageInit();">
      <div id="Headgraphic" style="height:80px; z-index:0; background-color:white;">
         <IMG src="<c:out value="${ContextPath}" /><%= headerImage%>" width="499" height="80" border="0"></div>
      <div id="Head1"><IMG src="<c:out value="${ContextPath}" />/portal/modules/fw/images/iMan27_H1_L1.gif" width="499" height="80" border="0"/></div> 
<%--            <div id="Apptitle1">--%>
<%--               <IMG src="<%= MUtils.getModulesUrl(request) + "/fw/images/title_imanager.gif" %>" <% if (session.getAttribute("DeviceType").equals("default")) { %>alt="Novell iManage" title="Novell iManage"<% } %> border="0">--%>
<%--      </div>--%>
<%--   	  <div id="Filler1"><IMG src="<c:out value="${ContextPath}" />/portal/modules/fw/images/iMan27_H1_L1_bg.gif" width="380" height="80" border="0"/></div>
--%>
      <div id="Apptitle" style="left:275px; right:60px; top:0px; height: 80px">
         <a id="AppTitleA" style="text-decoration: none">
            <div id="AppTitleDiv" class="apptitle1" style="padding-top: 3px; padding-bottom: 3px; width: 100%">
               <%= orgName %>
            </div>
         </a>
      </div>

      <div id="logo" style="z-index:2">
         <a<% if (com.novell.emframe.dev.D.isDebugEnabled()) { %> href="webacc?taskId=dev.Empty&merge=fw.Body&view=Debug&User.context=<c:out value="${requestScope['User.context']}" />" target="Mainscreen"<% } else { %> href="http://www.novell.com/products/consoles/imanager/" target="_blank"<% } %>><IMG src="<c:out value="${ContextPath}" /><%= brandingImage%>" width="60" height="80" <% if (session.getAttribute("DeviceType").equals("default")) { %>alt="Novell" title="Novell"<% } %> border="0"></a>
      </div>
   	  <div id="logo1" style="z-index:3">
         <a<% if (com.novell.emframe.dev.D.isDebugEnabled()) { %> href="webacc?taskId=dev.Empty&merge=fw.Body&view=Debug&User.context=<c:out value="${requestScope['User.context']}" />" target="Mainscreen"<% } else { %> href="http://www.novell.com/products/consoles/imanager/" target="_blank"<% } %>><IMG src="<c:out value="${ContextPath}" />/portal/modules/fw/images/iMan27_logo_L1.gif" width="60" height="80" <% if (session.getAttribute("DeviceType").equals("default")) { %>alt="Novell" title="Novell"<% } %> border="0"></a>
      </div>

      <table height="100%" border=0 width="600" cellpadding=0 cellspacing=0>      	
      <tr>
         <td bgcolor="<%=menuColor %>" width="125" valign="top">
         <br>
         <br>
         <br>
         <br>
         <br>
         &nbsp;&nbsp;<IMG src="<%= MUtils.getModulesUrl(request) + "/fw/images/nlogo_100.gif" %>" border="0">
      </td>
      <td width="10">
         &nbsp;
      </td>
      <td valign="top" width="465">  	
      <br>
      <br>
      <br>
      <br><p/>
      <br>
      <iman:dialog center="false" position="relative" border="0" closeButton="false" id="authenticate" width="500" height="500" dialogColor="#ffffff" titleBarColor="#458ab9">
  	 <iman:dirAuthentication closeButton="false" rank="primary" />
	</iman:dialog>   
      <br>
      <p>
      </td>
   </tr>
</table>

</body>
</html>
