<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8" import="com.novell.webaccess.common.JSPConduit, com.novell.emframe.dev.eMFrameUtils" %>
<%   JSPConduit c = JSPConduit.getJSPConduit(request); 


   c.stringTable("DevResources"); 

   if (c.var("GeneralMsg.MsgBody").equals("")) { 
      c.set("GeneralMsg.MsgBody", c.string("GeneralMsg.MsgBodyDefault")); 
   } 

   if (c.var("GeneralMsg.MsgTitle").equals("")) { 
	   if (c.var("GeneralMsg.Mode").equals("error")) { 
		   c.set("GeneralMsg.MsgTitle", c.string("GeneralMsg.ErrorNoTitle")); 
	   } else { 
		   c.set("GeneralMsg.MsgTitle", c.string("GeneralMsg.MsgTitleDefault")); 
	   } 
   } 

   if (c.var("GeneralMsg.Titlebar").equals("")) { 
      c.set("GeneralMsg.Titlebar", c.string("GeneralMsg.TitlebarDefault")); 
   } 

   if (c.var("GeneralMsg.Url").equals("")) { 
      if (c.var("GeneralMsg.Mode").equals("success")) {
         c.set("GeneralMsg.Url", "webacc?NPService=fw.LaunchService&NPAction=Return&returnID=" + c.urlEncode((String) request.getAttribute("GI_ID")));
//         c.set("GeneralMsg.Url", c.plus("webacc?taskId=fw.Launch&merge=fw.Launch&nextState=initialState&User.context=", c.var("User.context")));
      } else if (c.var("GeneralMsg.Mode").equals("error")) { 
         c.set("GeneralMsg.Url", "Javascript:history.back()"); 
      } else { 
         c.set("GeneralMsg.Url", "Javascript:history.back()"); 
      } 
   } 

   if (c.var("GeneralMsg.Icon").equals("")) { 
      if (c.var("GeneralMsg.Mode").equals("success")) { 
         c.set("GeneralMsg.Icon", "dev/success32.gif"); 
      } else if (c.var("GeneralMsg.Mode").equals("error")) { 
         c.set("GeneralMsg.Icon", "dev/error32.gif"); 
      } 
   } %>


<% try  { %><HTML>
<HEAD>
   <TITLE><%= c.var("GeneralMsg.Titlebar") %></TITLE>
	<SCRIPT>
	<% if ( c.def("errorDetails")) { %>
		var bDetailsOn = 0;
		function showDetails()
		{
			var stackTrace = getElement("trace");
			var stackData = "<table border=1><tr><td><code><%= c.toScript(c.var("errorDetails")) %></code></td></tr></table><br>"
			if (bDetailsOn == 1)
			{
				stackTrace.innerHTML = "";
				bDetailsOn = 0;
			}
			else
			{
				stackTrace.innerHTML = stackData;
				bDetailsOn = 1;
			}
		}
	<% } %>
	</SCRIPT>
</HEAD>

<BODY TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF" TOPMARGIN="10">

<% c.set("TaskHeader.title", c.string("GenConf.Confirm")); %>
<jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" /><BR>

<FONT FACE="Arial,Helvetica">
	<% if (c.var("GeneralMsg.Detail.Url").equals("") == false) { %>
		<b><a href="<%= c.var("GeneralMsg.Detail.Url") %>"><%= c.var("GeneralMsg.MsgTitle") %></a><b>
	<% } else { %>
		<b><%= c.var("GeneralMsg.MsgTitle") %></b>
	<% } %>
	<BR><BR>
	<% if ( c.def("GeneralMsg.MsgBodyPlainText")) { 
		   c.set("GenMsg.BoldDisplay", (c.toDisplay(c.var("GeneralMsg.MsgBodyBoldText")))); 
		   c.set("GenMsg.BoldMsg", c.plus(c.plus("<B>", c.var("GenMsg.BoldDisplay")), "</B>")); 
		   c.set("GenMsg.PlainMsg", (c.toDisplay(c.var("GeneralMsg.MsgBodyPlainText")))); %>
		<%= c.formatMessage(c.var("GenMsg.PlainMsg"), new String[]{c.var("GenMsg.BoldMsg")}) %>
	<% } else { %>
		<%= c.toDisplay(c.var("GeneralMsg.MsgBody")) %>
	<% } 

	   if ( c.def("errorDetails")) { %>
			<br><br>
			<img type=image src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Details.image") %>"
                                  alt="<%= c.string("Button.Details.alt") %>" 
            title="<%= c.string("Button.Details.alt") %>"
            id="btnDetails"
				onClick="showDetails()">
			<div>
			<p class="marginleft3" id="trace">
			<%/*--- inserted by javascript above
				<table border=1>
					<tr><td>
						<code id="trace">{!VAR toHTML(stackTrace)}</code>
					</td></tr>
				</table>
				<br>
			--- */%> 
			</div>
	<% } 
      if (c.var("Error.name").equals("Cookie.missing")) { 
		
			   c.set("GeneralMsg.MsgBody", c.formatMessage(c.string("AuthenticateFailed.SystemExplain"), new String[]{c.toDisplay(c.var("AuthenticateFailed.NoCookie"))})); %>
		
		<%= c.toDisplay(c.var("GeneralMsg.MsgBody")) %>
	<% } %>

	<BR><BR>
	<a id=okbutton href="<%= c.var("GeneralMsg.Url") %>"
		><img alt="<%= c.string("Button.Continue.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>"
			  border=0
		></a>
		<BR>
</FONT>
</BODY></HTML> <% } catch (Exception e) { e.printStackTrace(); %>Exception occured processing JSP page<% } %>
