<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%@ taglib prefix="js" uri="net.sourceforge.jsurveyor.jsurveyorlib" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sourceforge.jsurveyor.*" %>
<jsp:useBean id="Data" class="net.sourceforge.jsurveyor.DataAccess">
</jsp:useBean>
<js:noCache />
<js:login access="admin" />
<js:border title="jSurveyor - Questionnaires">
<%
String questionPage=request.getParameter("questionPage");
String question=request.getParameter("question");
String QuestionnaireID=request.getParameter("QuestionnaireID");
int questionnaireID = Integer.parseInt(QuestionnaireID);
Questionnaire editQ = DataAccess.retrieveQuestionnaire(questionnaireID);
if (editQ.getState()) {
response.sendRedirect("admin_questionnaire.jsp?QuestionnaireID=" + QuestionnaireID);
}
%>


	<tr>
	  <td class='mainmenu_headline'>Gallery</td>
	  <td class='mainmenu_headline_emptyfield'></td>
	</tr>


	<tr>
	  <td colspan='2' class='mainmenu_blueframe'>
	    <table border='0' cellspacing='0' cellpadding='0'>
		  <tr>
		  <td class='mainmenu_workframe'> <!-- Main workframe start -->
	        <table border='0' cellspacing='0' cellpadding='0'> 
				<tr>
				<td class='gallery_question'>
				<p>Select the question type that you find most suitable for your questionnaire.</p>
				<table border='0'>
				  <tr>
				    <td class='gallery_question_blackframe'>
					<p>
					  A multiple choice question, with only one answer.</p>
					  Sample:
					  <table border='0'>
					    <tr>
						  <td align='center'>
							<img src='multiplechoice1.png' alt='MultipleChoice' />
						  </td>
						</tr>
						<tr>
						  <td class='centeralign'>
							<input type='submit' class='stdbutton' title='Click to select this questiontype' value='Select' name='multiplechoice1' onClick='location.href="admin_insert_question.jsp?questionPage=<%= questionPage %>&question=<%= question %>&QuestionnaireID=<%= QuestionnaireID %>&type=M"' />
						  </td>
						</tr>
					  </table>
					</td>
				    <td class='gallery_question_blackframe'>
					  <p>
					  A question, followed by a freetext-box for user feedback.</p>
					  Sample:
					  <table border='0'>
					    <tr>
						  <td align='center'>
							<img src='freetext.png' alt='Freetext' />
						  </td>
						</tr>
						<tr>
						  <td class='centeralign'>
							<input type='submit' class='stdbutton' title='Click to select this questiontype' value='Select' name='freetext'  onClick='location.href="admin_insert_question.jsp?questionPage=<%= questionPage %>&question=<%= question %>&QuestionnaireID=<%= QuestionnaireID %>&type=F"' />
						  </td>
						</tr>
					  </table>
					</td>
				  </tr>


				</table>
			    </td>
              </tr>
			</table>
		  </td>
		  </tr>
	    </table>
      </td>
	</tr>

	<tr>
	<td>
	  <table><tr><td> <!-- Makes space between blue border and top of buttons -->
	  </td></tr>
	  </table>
	</td>
	</tr>
	
	
	<tr>
	  <td></td>
	  <td class='mainmenu_buttonline'><input class='stdbutton' title='Click to return to Edit questionnaire' type='submit' value='Cancel' onClick='location.href="admin_questionnaire.jsp?QuestionnaireID=<%= QuestionnaireID %>"'/> 
      </td>
    </tr>

	<tr>
	<td>
	  <table><tr><td> <!-- Makes space between blue border and top of buttons -->
	  </td>
	</tr>
	</table>
	</td>
	</tr>


</js:border>