<%@  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>
<title><%= c.string("Creator.CreateTitle") %></title>
<LINK href="<%= c.getModulesUrl() + "/dev/css/hf_style.css" %>" rel="styleSheet" type="text/css">
<jsp:include page='<%= c.getPath("dev/eMFrameScripts_inc.jsp") %>' flush="true" />
<jsp:include page='<%= c.getPath("dev/MoveListItems_inc.jsp") %>' flush="true" />

<script language="JavaScript">

	function setFocus( )
	{
      document.ClassListForm.AvailableClasses.focus();
      var Opt = document.ClassListForm.AvailableClasses.options;
      if (Opt.length > 0)
      {
         document.ClassListForm.AvailableClasses[0].selected = true;
      }
	}

	function nextSelected()
   {
      var Opt = document.ClassListForm.AvailableClasses.options;
      if (Opt.length == 0)
      {
         cancelSelected();
         return false;
      }

		var selectedItem = -1;
		var selectedText = "";
		selectedItem 	= document.ClassListForm.AvailableClasses.selectedIndex;
		if (selectedItem == -1)
		{
			selectedItem = 0;
		}
      selectedText = document.ClassListForm.AvailableClasses[selectedItem].value;
      document.ClassListForm.elements["SelectedClass"].value = selectedText;
      document.ClassListForm.elements["merge"].value="fw.CreatorWizard2";
      document.ClassListForm.elements["nextState"].value="CreatorWizardSummary";
      document.ClassListForm.elements["Task.SelectedButton"].value="nextSelected";
      document.ClassListForm.submit();
 	}

   function cancelSelected()
   {
      document.ClassListForm.elements["taskId"].value="fw.HomePage";
      document.ClassListForm.elements["merge"].value="fw.HomePage";
      document.ClassListForm.elements["nextState"].value="fw.HomePage";
      document.ClassListForm.elements["Task.SelectedButton"].value="cancelSelected";
      document.ClassListForm.submit();
   }

	function checkDefaultKey(evt)
   {
      var keyCode = evt.which ? evt.which : evt.keyCode;
      // 13 is the Enter key code
      if (keyCode == 13)
      {
         nextSelected();
         return false;
      }
      return true;
   }


</script>
</head>

<body text="#000000" link="#000000" vlink="#000000" alink="#000000" bgcolor="#FFFFFF" onload="setFocus()">
<form name="ClassListForm" method=post action="webacc">


   <input type="hidden" name="merge" value="fw.CreatorWizard2">
   <input type="hidden" name="error" value="dev.GenErr">
   <input type="hidden" name="User.context" value="<%= c.var("User.context") %>">
   <input type="hidden" name="nextState" value="CreatorWizardSummary">
   <input type="hidden" name="taskId" value="<%= c.var("taskId") %>">
   <input type="hidden" name="Task.SelectedButton" value="">
   <input type="hidden" name="SelectedClass" value="<%= c.var("SelectedClass") %>">


   <% c.set("WizardHeader.title", c.string("Creator.WizardHeaderTitle"));
      c.set("WizardHeader.instruction", c.string("Creator.WizardHeaderInstruction"));
      c.set("WizardHeader.helpFile", "base/creatorwizard1.html"); %>
   <jsp:include page='<%= c.getPath("dev/WizardHeader_inc.jsp") %>' flush="true" />


   <p class="instructions"><%= c.string("Creator.WizardSelect") %></p>

   <table name="ClassListTable" >
   <tr>
	   <td  class="mediumtext"><%= c.string("Creator.WizardAvailableClasses") %></td>
   </tr>
   <tr>
	   <td>
		   <select name="AvailableClasses" size=10 style="WIDTH: 340px" onkeypress="return checkDefaultKey(event)" >
		      <% c.set("i", "0");
		         while (c.lt(c.var("i"), c.var("Sch_ClassList.Count"))) { %>
		         <option value="<%= c.toTag(c.var("Sch_ClassList.name."+c.var("i"))) %>"><%= c.toTag(c.var("Sch_ClassList.name."+c.var("i"))) %>
 		         <% c.inc("i");
		     	   } %>
		  	</select>
	   </td>
   </tr>
   </table>
   <br>

   <jsp:include page='<%= c.getPath("dev/Bar_inc.jsp") %>' flush="true" />
   <a HREF="#"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.BackDisabled.image") %>" alt="<%= c.toDisplay(c.string("Button.BackDisabled.alt")) %>" title="<%= c.toDisplay(c.string("Button.BackDisabled.alt")) %>" border=0></a>
   <a HREF="#"onClick="javascript:nextSelected();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Next.image") %>" alt="<%= c.string("Button.Next.alt") %>" title="<%= c.string("Button.Next.alt") %>" border=0></a>
   <a HREF="#"onClick="javascript:cancelSelected();return false"><IMG src="<%= c.getModulesUrl() + "/dev/images/" + c.string("Button.Cancel.image") %>" alt="<%= c.string("Button.Cancel.alt") %>" title="<%= c.string("Button.Cancel.alt") %>" border=0></a>

	</form>
</body></html>
