<%@  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");
   c.stringTable("FwResources");

   c.set("GeneralMsg.Mode", "error");
   if ( c.notdef("GeneralMsg.MsgBody")) { 
      c.set("GeneralMsg.MsgBody", c.string("GeneralMsg.MsgBodyDefault")); 
   } 

   if (c.var("GeneralMsg.MsgTitle").equals("")) { 
      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", c.plus(c.plus(c.plus("webacc?taskId=", c.var("taskId")), "&taskComplete=true&User.context="), c.var("User.context"))); 
      } else if (c.var("GeneralMsg.Mode").equals("error")) { 
         c.set("GeneralMsg.Url", "Javascript:goBackOrClose()"); 
      } else { 
         c.set("GeneralMsg.Url", "Javascript:goBackOrClose()"); 
      } 
   } 
   c.set("DefaultUrl", "webacc?NPService=fw.LaunchService&NPAction=Return&returnID=" + c.urlEncode((String) request.getAttribute("GI_ID")));

   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"); 
      } 
   } %>


<HTML>
<HEAD>
   <TITLE><%= c.var("GeneralMsg.Titlebar") %></TITLE>
   <LINK rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>
   <jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
   <SCRIPT>
      function pageInit()
      {
         document.getElementById("okbutton").focus();
      }
      
      function goBackOrClose()
      {
	      var len = "history.l" + "ength";
         if(eval(len) != 0)
         {
            <% if (c.var("GeneralMsg.Mode").equals("error") &&(( c.var("nextState").equals("initialState"))||(c.var("errorOnInit").equals("true")))) { %>
               window.location = '<%= c.toScript(c.var("DefaultUrl")) %>';
            <% } else { %>
               history.back();
            <% } %>
         }
         else
         {
            window.close();
         }
      }

      
   </SCRIPT>
</HEAD>

<BODY TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF" onLoad="pageInit();" TOPMARGIN="10">

   <% if (c.var("GeneralMsg.Icon").equals("") == false) { %>
   	<img height="32" width="32" src="<%= c.getUrl(c.var("GeneralMsg.Icon")) %>" align="absmiddle">
   <% } %>
   <FONT class="head4"><%= c.toDisplay(c.var("GeneralMsg.MsgTitle")) %>
      <% if (c.var("GeneralMsg.countWarning").equals("") == false) { %>&nbsp;<A href="#" onClick="alert('<%= c.toDisplay(c.string("General.countTruncated")) %>')" style="color: #03399; text-decoration: underline;"><%= c.toDisplay(c.string("General.countWarningLink")) %></A><% } %>
   </FONT><BR><BR>
   <%= c.toDisplay(c.var("GeneralMsg.MsgBody")) %><BR><BR>
   <table width="100%" border="0" cellspacing="0" cellpadding="3">
	<tr bgcolor="#EFEEEB">
    	<td class="head4margin4" width="10%">
      		<div align="left"><b><%= c.string("MooGeneralMsg.Details") %></b></div>
		</td>
    	<td class="head4margin4" width="90%">
      		<div align="left"><b><%= c.string("MooGeneralMsg.Objectname") %></b></div>
    	</td>
  	</tr>
	<tr>
		<td colspan="2">&nbsp;</td>
	</tr>

	<table width="100%" border="0" cellspacing="0" cellpadding="3">
   <% c.set("i", "0"); 
      while (c.lt(c.var("i"), c.var("MooList.Count"))) { %>
  	  <tr>
  	      <% if (c.var("MooList."+c.var("i")+ ".ErrorURL").equals("")) { %>
  		      <td width="10%" class="mediumtext"><div align="left"><a href="webacc?taskId=dev.Empty&merge=dev.GenErr&GeneralMsg.MsgBody=<%= c.var("MooList."+c.var("i")+ ".ErrorMsgBody") %>&GeneralMsg.MsgTitle=<%= c.var("MooList."+c.var("i")+ ".ErrorMsgTitle") %>&User.context=<%= c.var("User.context") %>">
  	      <% } else { %>
  		      <td width="10%" class="mediumtext"><div align="left"><a href="webacc?taskId=dev.Empty&merge=dev.GenErr&GeneralMsg.MsgBody=<%= c.var("MooList."+c.var("i")+ ".ErrorMsgBody") %>&GeneralMsg.MsgTitle=<%= c.var("MooList."+c.var("i")+ ".ErrorMsgTitle") %>&User.context=<%= c.var("User.context") %>&GeneralMsg.Error.Detail=<%= c.var("MooList."+c.var("i")+ ".ErrorURL") %>">
  		   <% } %>
			<IMG src="<%= c.getModulesUrl() + "/fw/images/viewlist.gif" %>" alt="<%= c.toDisplay(c.string("Button.Viewlist.alt")) %>" title="<%= c.toDisplay(c.string("Button.Viewlist.alt")) %>" width="16" height="16" border="0"></a></div></td>
    		<td width="90%" class="mediumtext" title="<%= c.toDisplay(c.var("MooList."+c.var("i")+ ".Name")) %>"><div align="left"><%= c.toDisplay(c.var("MooList."+c.var("i")+ ".Name")) %></div></td>
  	  </tr>
  	  <% c.inc("i"); 
      } %>
	</table><br><br><br>

   <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
   <%/* GeneralMsg.Url should NOT be urlEncoded since those who pass it to us should already have done so.  If we do, it causes problems  */%> 
   <a id=okbutton href="<%= c.var("GeneralMsg.Url") %>" ><IMG alt="<%= c.string("Button.OK.alt") %>" title="<%= c.string("Button.OK.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>" border=0></a><BR>
</BODY></HTML>
