<%@  page pageEncoding="utf-8" contentType="text/html;charset=utf-8"
   import="com.novell.webaccess.common.JSPConduit" %>

<%   JSPConduit c = JSPConduit.getJSPConduit(request);
   c.stringTable("DevResources");
   c.stringTable("FwResources"); %>

<HTML>
<HEAD>
<TITLE><%= c.string("CollectionsReport.Title") %></TITLE>
<% if (c.var("inProgress").equals("true")) { %>
   <META HTTP-EQUIV="Refresh" CONTENT="2">
<% } %>
<link   rel='stylesheet' href='<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>'>

<jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
<jsp:include page='<%= c.getPath("dev/OSScripts_inc.jsp") %>' flush="true" />

<script language="JavaScript">

   /*******************
    * FUNCTION HEADER *
    *******************/
    function onPageLoad()
    {
        document.GetCollectionsReportForm.SelectedContainerFDN.focus();
    }


   /*******************
    * FUNCTION HEADER *
    *******************/
    function onPageSubmit()
    {
        var form = document.GetCollectionsReportForm;
        var strInput = form.SelectedContainerFDN.value;
        if ((null == strInput) || (0 == strInput.length))
        {
            alert("<%= c.string("CollectionsReport.EnterValidContainerName") %>");
            form.SelectedContainerFDN.focus();
            return false;
        }

        return true;
    }

</script>
</HEAD>

<BODY   TEXT="#000000" LINK="#000000" VLINK="#000000" ALINK="#000000" bgcolor="#FFFFFF"
        onLoad="returnFromOS();onPageLoad()">

<form   name="GetCollectionsReportForm"
        method=post
        action="webacc"
        onSubmit="return(onPageSubmit())">

        <input  type=hidden
                name="taskId"
                value="<%= c.var("taskId") %>">

        <input  type=hidden
                name="merge"
                value="fw.CollectionsReport">

        <input  type=hidden
                name="error"
                value="dev.GenErr">

        <input  type=hidden
                name="nextState"
                value="getCollectionsReport">

   <% c.set("TaskHeader.title", c.string("CollectionsReport.ReportHeader"));
      c.set("TaskHeader.helpFile", "fw/getcollectionsreportform.html");
      c.set("TaskHeader.iconUrl", "dev/bullet_default_16.gif"); %>
   <jsp:include page='<%= c.getPath("dev/TaskHeader_inc.jsp") %>' flush="true" />

   <div class="formdescriptextml0"  style="width: 70%"><%= c.toHTML(c.string("CollectionsReport.Instructions")) %></div>
   <div class="mediumtext" style="margin-top: 1em;"><%= c.toHTML(c.string("CollectionsReport.StartSearchPrompt")) %></div>

   <div>
      <input type=text name="SelectedContainerFDN" value="<%= c.var("SelectedContainerFDN") %>" size=35>
               <% c.set("OS.TypeFilter", "[containers],[root]");
                  c.set("OS.Mode", "Browse");
                  c.set("OS.Control", "SelectedContainerFDN");
                  c.set("OS.History", "true"); %>
               <jsp:include page='<%= c.getPath("dev/OS_inc.jsp") %>' flush="true" />
    </div>
      <% if (c.var("inProgress").equals("true")) { %>
         <div id="generate" style="display: block">
            <div class="head4" style="margin-bottom: 0.5em;  margin-top: 2em">
               <img height="32" width="32" src="<%= c.getModulesUrl() %>/dev/images/In-progress_framed32.gif" align="absmiddle"> <span class="typegold1">"<%= c.toHTML(c.string("CollectionsReport.Generating")) %>"</span>
                  <b>"<%= c.toHTML(c.string("CollectionsReportTaskDisplayName")) %>"</b></div>
            <div class="mediumtext" style="margin-left: 3em; margin-bottom: 2em; margin-top: 2em; width: 350px"><%= c.toHTML(c.var("progressMessage")) %></div>
            <div class="mediumtext" style="margin-left: 3em; margin-bottom: 2em; width: 350px">"<%= c.toHTML(c.string("CollectionsReport.CancelReport")) %>"</div>
         </div>
      <% } %>

      <% if (c.var("progressCancelled").equals("true")) { %>
         <div id="cancel" style="display: block">
            <div class="head4" style="margin-bottom: 0.5em;  margin-top: 2em">
               <img height="32" width="32" src="<%= c.getModulesUrl() %>/dev/images/cancelled32.gif" align="absmiddle"> <span class="typegold1">"<%= c.toHTML(c.string("CollectionsReport.Cancelled")) %>"</span>
                  <b>"<%= c.toHTML(c.string("CollectionsReportTaskDisplayName")) %>"</b></div>
            <div class="mediumtext" style="margin-left: 3em; margin-bottom: 2em; width: 350px">"<%= c.toHTML(c.string("CollectionsReport.CancelledMessage")) %>"</div>
         </div>
      <% } %>
      <div class="margintop3">
         <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
         <% if (c.var("inProgress").equals("true")) { %>
         <a href="webacc?taskId=<%= c.var("taskId") %>&merge=fw.GetCollectionsReportForm&nextState=cancel">
            <IMG name="Cancel" alt="<%= c.string("Button.Cancel.alt") %>" title="<%= c.string("Button.Cancel.alt") %>" src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Cancel.image") %>" border=0></a>
         <% } else { %>
            <input   type=image
               name="OKButton"
               alt="<%= c.string("Button.OK.alt") %>"
               src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.OK.image") %>"
               border=0>
               <jsp:include page='<%= c.getPath("dev/Cancel_inc.jsp") %>' flush="true" />
         <% } %>
		</div>
</form>
<jsp:include page='<%= c.getPath("dev/OSFooter_inc.jsp") %>' flush="true" />
</BODY></HTML>
