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

   <% if (c.var("pluginType").equals("page")) {
      c.set("nextMerge", "fw.TemplateBuilder_installPage");
      c.set("nextState", "PreInstallPage");
   } else {
      c.set("nextMerge", "fw.TemplateBuilder_installTask");
      c.set("nextState", "PreInstallTask");
   } %>


<HTML>
<HEAD>
   <LINK rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>
   <SCRIPT LANGUAGE="JavaScript">
      function preview()
      {
         window.open("webacc?mode=<%= c.var("pluginType")%>&taskId=dev.Empty&merge=fw.TemplateBuilder_previewFrameset&objectTypeName=<%= c.urlEncode(c.var("objectTypeName")) %>&safeObjectTypeName=<%= c.var("safeObjectTypeName") %>&templateName=temp.<%= c.var("templateName") %>&parentId=<%= c.var("taskId")%>","","HEIGHT=600,WIDTH=700,resizable,scrollbars");
      }
      function pagePreview()
      {
         window.open("webacc?mode=page&taskId=dev.Empty&merge=fw.TemplateBuilder_previewFrameset&objectTypeName=<%= c.toHTML(c.var("objectTypeName")) %>&parentId=<%= c.var("taskId")%>","","HEIGHT=600,WIDTH=700,resizable,scrollbars");
      }
      function init()
      {
         parent.setFooterButtons(parent.nextButton | parent.backButton | parent.cancelButton);
         parent.setHeader("<%= c.string("TaskBuilder.title") %>", "<%= c.string("TaskBuilder.Preview") %>");
      }
   </SCRIPT>
   <TITLE><%= c.string("ProductName") %></TITLE>
</HEAD>

<body text="#000000" bgcolor="#ffffff" onLoad="init();">
<FORM name="templateForm" method=post action="webacc" >

   <!-- WEBACC VARIABLES -->
   <INPUT type=hidden name="objectTypeName"  value="<%= c.toHTML(c.var("objectTypeName")) %>">
   <INPUT type=hidden name="taskId"          value="<%= c.var("taskId") %>">
   <INPUT type=hidden name="merge"           value="<%= c.var("nextMerge") %>">
   <INPUT type=hidden name="nextState"       value="<%= c.var("nextState") %>">
   <INPUT type=hidden name="templateName"    value="<%= c.var("templateName") %>">
   <INPUT type=hidden name="client"          value="<%= c.var("client") %>">
   <INPUT type=hidden name="error"           value="dev.GenErr">
   <INPUT type=hidden name="pluginType"      value="<%= c.var("pluginType") %>">


   <TABLE>
      <TR>
         <TD><IMG src="<%= c.getModulesUrl() + "/dev/images/success32.gif" %>" alt="<%= c.toDisplay(c.string("Success")) %>" title="<%= c.toDisplay(c.string("Success")) %>" border=0></TD>
         <TD><% if (c.var("pluginType").equals("page")) { %><%= c.string("TaskBuilder.tempPageCreated") %><% } else { %><%= c.string("TaskBuilder.tempTaskCreated") %><% } %></TD>
      </TR>
   </TABLE><BR>

   <% if (c.var("client").equals(c.var("DeviceType")) || c.var("client").equals("default")) {
         if (c.var("pluginType").equals("page")) { %>
         <A href="#" onClick="pagePreview(); return false;"><%= c.string("TaskBuilder.PreviewPageLink") %></A><BR>
      <% } else { %>
         <A href="#" onClick="preview(); return false;"><%= c.string("TaskBuilder.PreviewTaskLink") %></A><BR>
      <% }
      } else { %>
      <%= c.string("TaskBuilder.PreviewNotAvailable") %><BR>
   <% } %>

   <BR>
   <TABLE>
      <TR>
         <TD valign="top"><IMG src="<%= c.getModulesUrl() + "/fw/images/notice_status16.gif" %>" alt="<%= c.toDisplay(c.string("StatusNotice.alt")) %>" title="<%= c.toDisplay(c.string("StatusNotice.alt")) %>" border=0></TD>
         <TD class=instructions><%= c.string("TaskBuilder.PreviewNotice") %></TD>
      </TR>
   </TABLE><BR>

</FORM>
</BODY>
</HTML>
