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

<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.toDisplay(c.var("objectTypeName")) %>&safeObjectTypeName=<%= c.toHTML(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.closeButton | parent.backButton);
         parent.setHeader("<%= c.string("TemplateBuilder.title") %>", "<%= c.string("TemplateBuilder.PreviewAndDownload") %>");
      }
   </SCRIPT>
   <TITLE><%= c.string("ProductName") %></TITLE>
</HEAD>

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

   <!-- System 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("templateName") %>">
   <input type=hidden name="error"          value="dev.GenErr">


   <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><%= c.string("TemplateBuilder.templateCreated") %></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>
      <% }
      } %>

   <A href="webacc?taskId=fw.DownloadFile&file=temp/<%= c.var("templateName") %>.jsp" target="Empty"><%= c.string("TaskBuilder.DownloadTemplateLink") %></A><BR>
   <A href="webacc?taskId=fw.DownloadFile&file=temp/<%= c.var("xmlName") %>" target="Empty"><%= c.string("TaskBuilder.DownloadXmlLink") %></A><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>
