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

  /* **************************************************************************
%name: WizQuestion.jsp %
%version: 6 %
%date_modified: Mon Feb 24 10:02:54 2003 %
Copyright (c) 2002 Novell, Inc. All Rights Reserved.
THIS WORK IS AN UNPUBLISHED WORK AND CONTAINS CONFIDENTIAL PROPRIETARY
AND TRADE SECRET INFORMATION OF NOVELL, INC. ACCESS TO THIS WORK IS
RESTRICTED TO (I) NOVELL, INC. EMPLOYEES WHO HAVE A NEED TO KNOW HOW
TO PERFORM TASKS WITHIN THE SCOPE OF THEIR ASSIGNMENTS AND (II)
ENTITIES OTHER THAN NOVELL, INC. WHO HAVE ENTERED INTO APPROPRIATE
LICENSE AGREEMENTS. NO PART OF THIS WORK MAY BE USED, PRACTICED,
PERFORMED COPIED, DISTRIBUTED, REVISED, MODIFIED, TRANSLATED, ABRIDGED,
CONDENSED, EXPANDED, COLLECTED, COMPILED, LINKED, RECAST, TRANSFORMED
OR ADAPTED WITHOUT THE PRIOR WRITTEN CONSENT OF NOVELL, INC. ANY USE
OR EXPLOITATION OF THIS WORK WITHOUT AUTHORIZATION COULD SUBJECT THE
PERPETRATOR TO CRIMINAL AND CIVIL LIABILITY.
***************************************************************************  */


  /* Make the global definitions required for "Backup and Restore"  */
  /* template files.  This includes STRINGTABLE"s, ...              */
   c.set("Wiz.PanelID", "fw.WizQuestion"); %>
<jsp:include page="WizDefinitions_inc.jsp" flush="true" />


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<TITLE>
			<%= c.string("CfgWiz.Question.Title") %>
		</TITLE>

		<jsp:include page="WizCommonContent_inc.jsp" flush="true" />
		<jsp:include page="WizCommonStyles_inc.jsp" flush="true" />
		<jsp:include page="WizCommonScripts_inc.jsp" flush="true" /> g

		<SCRIPT language="JavaScript">
			<!--
				<jsp:include page="WizQuestion_js.jsp" flush="true" />
			//-->
		</SCRIPT>
	</HEAD>


	<BODY
			TEXT="#000000"
			LINK="#000000"
			VLINK="#000000"
			ALINK="#000000"
			bgcolor="<%= c.string("CfgWiz.Common.BackgroundColor") %>"
			onLoad="setFocusAndInitializeForm()">
		<FORM
				name="Wiz_MainForm"
				method=post
				action=""
				onSubmit="return( false )">
			<jsp:include page="WizHiddenVariables_inc.jsp" flush="true" />


			<%/* Generate the question specific hidden INPUT widgets.  */%>
			<INPUT type="hidden" name="Question_List"       value="<%= c.toHTML(c.var("Question_List")) %>" />
			<INPUT type="hidden" name="Question_List_Count" value="<%= c.toHTML(c.var("Question_List_Count")) %>" />
			<INPUT type="hidden" name="Question_MaxInput"   value="<%= c.toHTML(c.var("Question_MaxInput")) %>" />
			<INPUT type="hidden" name="Question_Message"    value="<%= c.toHTML(c.var("Question_Message")) %>" />
			<INPUT type="hidden" name="Question_Type"       value="<%= c.toHTML(c.var("Question_Type")) %>" />


			<%/* Generate the question banner.  */%>
			<TABLE
					border=0
					width="100%"
					bgcolor="<%= c.string("CfgWiz.Common.FormBackgroundColor") %>"
					cellpadding=5
					cellspacing=0>
				<TR nowrap valign="middle" align=left>
					<TD class="borderwidth0">
						<NOBR>
							<SPAN class="formhead1">
								<%= c.string("CfgWiz.Question.Title") %>
							</SPAN>
						</NOBR>
					</TD>
				</TR>
			</TABLE>


			<%/* Generate the question message.  */%>
			<BR />
			<SPAN class="mediumtext">
				<DIV class="width400">
					<%= c.toHTML(c.var("Question_Message")) %>
				</DIV>
			<SPAN>


			<%/* Are we being asked a simple input question?  */
			   if (("input".equals(c.var("Question_Type")))) {
				  /* Yes!  Generate the appropriate number of text  */
				  /* INPUT widgets.                                 */
				   c.set("qIndex", "0");
				   while ((c.lt(c.var("qIndex"), c.var("Question_MaxInput")))) {
					   c.set("qName", c.plus("Answer_", c.var("qIndex")));
					   if ((c.lt("0", c.var("qIndex")))) { %><BR /><% } %>
					<INPUT type="text" name="<%= c.var("qName") %>" size="60" />
					<% c.inc("qIndex");
				   } %>
				<BR />


			<%/* No!  We aren"t being asked a simple input question!  */
			  /* Are we being asked a list question?                  */
			   } else if (("list".equals(c.var("Question_Type")))) {
				  /* Yes!  Can the user supply more than one response?  */
				   if ((c.gte("1", c.var("Question_MaxInput")))) {
					  /* No!  Generate a SELECT widget.  */%>
					<SELECT name="Answer_List">
				<% }


				  /* Scan the question list...  */
				   c.set("qIndex", "0");
				   c.set("qList", c.var("Question_List"));
				   while ((c.lt(c.var("qIndex"), c.var("Question_List_Count")))) {
					  /* ...parsing each question.  */
					   c.set("eqPos", c.find(c.var("qList"), "="));
					   c.set("itemLen", c.substring(c.var("qList"), "0", c.var("eqPos")));
					   c.set("itemPos", (c.plus(c.var("eqPos"), "1")));
					   c.set("itemVal", c.substring(c.var("qList"), c.var("itemPos"), c.var("itemLen")));
					   c.set("itemPos", (c.plus(c.var("itemPos"), c.var("itemLen"))));
					   c.set("qList", c.substring(c.var("qList"), c.var("itemPos"), (c.minus(c.length(c.var("qList")), c.var("itemPos")))));


					  /* Can the user supply more than one response?  */
					   if ((c.gte("1", c.var("Question_MaxInput")))) {
						  /* No!  Generate an OPTION for the SELECT.  */%>
						<OPTION>
							<%= c.toHTML(c.var("itemVal")) %>
						</OPTION>

					<% } else {
						  /* Yes!, the user can supply more than one     */
						  /* response!  Generate checkbox INPUT widget.  */%>
						<NOBR>
							<INPUT
									type="checkbox"
									name="ListItem_"<%= c.var("qIndex") %>
									value="<%= c.toHTML(c.var("itemVal")) %>" />
							<SPAN class="mediumtext">
								<%= c.toHTML(c.var("itemVal")) %>
							</SPAN>
						</NOBR>
					<% }


					  /* Move to the next question.  */
					   c.inc("qIndex");
				   }


				  /* Can the user supply more than one response?  */
				   if ((c.gte("1", c.var("Question_MaxInput")))) {
					  /* No!  Close the SELECT widget.  */%>
					</SELECT>
				<% } %>
				<BR />
			<% }


			  /* Generate the question push button(s).  */%>
			<BR /><HR class="ruleblue" noshade size="2"/>
			<% if ("yesNo".equals(c.var("Question_Type"))) { %>
				<A href="javascript:handleQuestionPB( 'WizPB_Yes' )"><IMG
					border="0"
					src="<%= c.getModulesUrl() %>/fw/images/wiz_Yes_<%= c.string("CfgWiz.LangID") %>.gif"
					title="<%= c.string("CfgWiz.Yes") %>"
					alt="<%= c.string("CfgWiz.Yes") %>"/></A>
				<A href="javascript:handleQuestionPB( 'WizPB_No' )"><IMG
					border="0"
					src="<%= c.getModulesUrl() %>/fw/images/wiz_No_<%= c.string("CfgWiz.LangID") %>.gif"
					title="<%= c.string("CfgWiz.No") %>"
					alt="<%= c.string("CfgWiz.No") %>"/></A>
			<% } else { %>
				<A href="javascript:handleQuestionPB( 'WizPB_Ok' )"><IMG
					border="0"
					src="<%= c.getModulesUrl() %>/fw/images/wiz_Ok_<%= c.string("CfgWiz.LangID") %>.gif"
					title="<%= c.string("CfgWiz.OK") %>"
					alt="<%= c.string("CfgWiz.OK") %>"/></A>
			<% } %>
		</FORM>
	</BODY>
</HTML>



						   <%/* * * * * * *  */
                             /* End of File  */
                             /* * * * * * *  */%>
