/*
 * Generated by the Jasper component of Apache Tomcat
 * Version: JspC/ApacheTomcat9
 * Generated at: 2026-07-20 06:53:42 UTC
 * Note: The last modified time of this file was set to
 *       the last modified time of the source file after
 *       generation to assist with modification tracking.
 */
package org.apache.jsp.survey.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.silverpeas.components.survey.control.FileHelper;
import org.silverpeas.core.web.http.HttpRequest;
import org.silverpeas.kernel.bundle.SettingBundle;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import java.util.ArrayList;
import java.lang.Math;
import java.net.URLEncoder;
import java.text.ParseException;
import org.silverpeas.core.util.WebEncodeHelper;
import org.silverpeas.core.ResourceReference;
import org.silverpeas.kernel.util.StringUtil;
import org.silverpeas.core.util.MultiSilverpeasBundle;
import org.silverpeas.core.util.URLUtil;
import org.silverpeas.core.admin.user.model.SilverpeasRole;
import org.silverpeas.core.admin.user.model.UserDetail;
import org.silverpeas.components.survey.control.SurveySessionController;
import org.silverpeas.components.survey.SurveyException;
import org.silverpeas.kernel.bundle.ResourceLocator;
import org.silverpeas.kernel.bundle.LocalizationBundle;
import org.silverpeas.core.web.util.viewgenerator.html.GraphicElementFactory;
import org.silverpeas.core.util.DateUtil;
import org.silverpeas.core.persistence.jdbc.DBUtil;
import org.silverpeas.core.questioncontainer.question.model.Question;
import org.silverpeas.core.questioncontainer.result.model.QuestionResult;
import org.silverpeas.core.questioncontainer.answer.model.Answer;
import org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayPane;
import org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayLine;
import org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayColumn;
import org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayCellText;
import org.silverpeas.core.web.util.viewgenerator.html.board.Board;
import org.silverpeas.core.web.util.viewgenerator.html.browsebars.BrowseBar;
import org.silverpeas.core.web.util.viewgenerator.html.buttonpanes.ButtonPane;
import org.silverpeas.core.web.util.viewgenerator.html.buttons.Button;
import org.silverpeas.core.web.util.viewgenerator.html.iconpanes.IconPane;
import org.silverpeas.core.web.util.viewgenerator.html.icons.Icon;
import org.silverpeas.core.web.util.viewgenerator.html.tabs.TabbedPane;
import org.silverpeas.core.web.util.viewgenerator.html.operationpanes.OperationPane;
import org.silverpeas.core.web.util.viewgenerator.html.window.Window;
import org.silverpeas.core.web.util.viewgenerator.html.frame.Frame;
import org.silverpeas.core.questioncontainer.container.model.Comment;
import org.silverpeas.core.questioncontainer.container.model.QuestionContainerHeader;
import org.silverpeas.core.questioncontainer.container.model.QuestionContainerDetail;
import org.silverpeas.core.util.file.FileRepositoryManager;
import org.silverpeas.core.util.file.FileServerUtils;
import org.silverpeas.core.admin.component.model.ComponentInstLight;
import org.silverpeas.core.util.file.FileUploadUtil;
import org.silverpeas.core.contribution.attachment.model.SimpleDocument;
import org.apache.commons.fileupload.FileItem;

public final class questionCreator_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent,
                 org.apache.jasper.runtime.JspSourceImports {


  void displaySurveyHeader(QuestionContainerDetail surveyDetail, MultiSilverpeasBundle resources, JspWriter out, GraphicElementFactory gef) throws ParseException, IOException {
      QuestionContainerHeader surveyHeader = surveyDetail.getHeader();
      String title = WebEncodeHelper.javaStringToHtmlString(surveyHeader.getTitle());
      String creationDate = resources.getOutputDate(new Date());
      String beginDate = "&nbsp;";
      if (surveyHeader.getBeginDate() != null) {
        beginDate = resources.getOutputDate(surveyHeader.getBeginDate());
      }
      String endDate = "&nbsp;";
      if (surveyHeader.getEndDate() != null) {
        endDate = resources.getOutputDate(surveyHeader.getEndDate());
      }
      String nbQuestions = "&nbsp;";
      if (surveyHeader.getNbQuestionsPerPage() != 0) {
        nbQuestions = Integer.toString(surveyHeader.getNbQuestionsPerPage());
      }
      out.println("<center>");
      Board board = gef.getBoard();
      out.println(board.printBefore());
      out.println("<table width=\"100%\">");
      out.println("<tr><td class=\"textePetitBold\" align=left width=\"50%\">"+resources.getString("GML.name")+" :</td><td align=left width=\"50%\">"+title+"</td></tr>");
      out.println("<tr><td class=\"textePetitBold\" align=left width=\"50%\">"+resources.getString("SurveyCreationDate")+" :</td><td align=left width=\"50%\">"+creationDate+"</td></tr>");
      out.println("<tr><td class=\"textePetitBold\" align=left width=\"50%\">"+resources.getString("SurveyCreationBeginDate")+" :</td><td align=left width=\"50%\">"+beginDate+"</td></tr>");
      out.println("<tr><td class=\"textePetitBold\" align=left width=\"50%\">"+resources.getString("SurveyCreationEndDate")+" :</td><td align=left width=\"50%\">"+endDate+"</td></tr>");
      out.println("<tr><td class=\"textePetitBold\" align=left width=\"50%\">"+resources.getString("SurveyCreationNbQuestionPerPage")+" :</td><td align=left width=\"50%\">"+nbQuestions+"</td></tr>");
      out.println("</table>");
      out.println("</center>");
      out.println(board.printAfter());
  }

  private static final javax.servlet.jsp.JspFactory _jspxFactory =
          javax.servlet.jsp.JspFactory.getDefaultFactory();

  private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants;

  static {
    _jspx_dependants = new java.util.LinkedHashMap<java.lang.String,java.lang.Long>(7);
    _jspx_dependants.put("/survey/jsp/checkSurvey.jsp", Long.valueOf(1781083279892L));
    _jspx_dependants.put("uri:http://java.sun.com/jsp/jstl/core", Long.valueOf(1784527130464L));
    _jspx_dependants.put("uri:http://java.sun.com/jsp/jstl/core!/META-INF/c.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("uri:http://java.sun.com/jsp/jstl/fmt", Long.valueOf(1784527130464L));
    _jspx_dependants.put("uri:http://java.sun.com/jsp/jstl/fmt!/META-INF/fmt.tld", Long.valueOf(1531470420000L));
    _jspx_dependants.put("uri:http://www.silverpeas.com/tld/viewGenerator", Long.valueOf(1784527154979L));
    _jspx_dependants.put("uri:http://www.silverpeas.com/tld/viewGenerator!/META-INF/viewGenerator.tld", Long.valueOf(1784527132000L));
  }

  private static final java.util.Set<java.lang.String> _jspx_imports_packages;

  private static final java.util.Set<java.lang.String> _jspx_imports_classes;

  static {
    _jspx_imports_packages = new java.util.LinkedHashSet<>(4);
    _jspx_imports_packages.add("javax.servlet");
    _jspx_imports_packages.add("javax.servlet.http");
    _jspx_imports_packages.add("javax.servlet.jsp");
    _jspx_imports_classes = new java.util.LinkedHashSet<>(74);
    _jspx_imports_classes.add("org.silverpeas.components.survey.control.FileHelper");
    _jspx_imports_classes.add("org.silverpeas.core.web.http.HttpRequest");
    _jspx_imports_classes.add("org.silverpeas.kernel.bundle.SettingBundle");
    _jspx_imports_classes.add("java.io.File");
    _jspx_imports_classes.add("java.io.IOException");
    _jspx_imports_classes.add("java.util.Collection");
    _jspx_imports_classes.add("java.util.Date");
    _jspx_imports_classes.add("java.util.Iterator");
    _jspx_imports_classes.add("java.util.List");
    _jspx_imports_classes.add("java.util.Map");
    _jspx_imports_classes.add("java.util.HashMap");
    _jspx_imports_classes.add("java.util.ArrayList");
    _jspx_imports_classes.add("java.lang.Math");
    _jspx_imports_classes.add("java.net.URLEncoder");
    _jspx_imports_classes.add("java.text.ParseException");
    _jspx_imports_classes.add("org.silverpeas.core.util.WebEncodeHelper");
    _jspx_imports_classes.add("org.silverpeas.core.ResourceReference");
    _jspx_imports_classes.add("org.silverpeas.kernel.util.StringUtil");
    _jspx_imports_classes.add("org.silverpeas.core.util.MultiSilverpeasBundle");
    _jspx_imports_classes.add("org.silverpeas.core.util.URLUtil");
    _jspx_imports_classes.add("org.silverpeas.core.admin.user.model.SilverpeasRole");
    _jspx_imports_classes.add("org.silverpeas.core.admin.user.model.UserDetail");
    _jspx_imports_classes.add("org.silverpeas.components.survey.control.SurveySessionController");
    _jspx_imports_classes.add("org.silverpeas.components.survey.SurveyException");
    _jspx_imports_classes.add("org.silverpeas.kernel.bundle.ResourceLocator");
    _jspx_imports_classes.add("org.silverpeas.kernel.bundle.LocalizationBundle");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.GraphicElementFactory");
    _jspx_imports_classes.add("org.silverpeas.core.util.DateUtil");
    _jspx_imports_classes.add("org.silverpeas.core.persistence.jdbc.DBUtil");
    _jspx_imports_classes.add("org.silverpeas.core.questioncontainer.question.model.Question");
    _jspx_imports_classes.add("org.silverpeas.core.questioncontainer.result.model.QuestionResult");
    _jspx_imports_classes.add("org.silverpeas.core.questioncontainer.answer.model.Answer");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayPane");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayLine");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayColumn");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.arraypanes.ArrayCellText");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.board.Board");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.browsebars.BrowseBar");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.buttonpanes.ButtonPane");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.buttons.Button");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.iconpanes.IconPane");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.icons.Icon");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.tabs.TabbedPane");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.operationpanes.OperationPane");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.window.Window");
    _jspx_imports_classes.add("org.silverpeas.core.web.util.viewgenerator.html.frame.Frame");
    _jspx_imports_classes.add("org.silverpeas.core.questioncontainer.container.model.Comment");
    _jspx_imports_classes.add("org.silverpeas.core.questioncontainer.container.model.QuestionContainerHeader");
    _jspx_imports_classes.add("org.silverpeas.core.questioncontainer.container.model.QuestionContainerDetail");
    _jspx_imports_classes.add("org.silverpeas.core.util.file.FileRepositoryManager");
    _jspx_imports_classes.add("org.silverpeas.core.util.file.FileServerUtils");
    _jspx_imports_classes.add("org.silverpeas.core.admin.component.model.ComponentInstLight");
    _jspx_imports_classes.add("org.silverpeas.core.util.file.FileUploadUtil");
    _jspx_imports_classes.add("org.silverpeas.core.contribution.attachment.model.SimpleDocument");
    _jspx_imports_classes.add("org.apache.commons.fileupload.FileItem");
  }

  private volatile javax.el.ExpressionFactory _el_expressionfactory;
  private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager;

  public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
    return _jspx_dependants;
  }

  public java.util.Set<java.lang.String> getPackageImports() {
    return _jspx_imports_packages;
  }

  public java.util.Set<java.lang.String> getClassImports() {
    return _jspx_imports_classes;
  }

  public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
    if (_el_expressionfactory == null) {
      synchronized (this) {
        if (_el_expressionfactory == null) {
          _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        }
      }
    }
    return _el_expressionfactory;
  }

  public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() {
    if (_jsp_instancemanager == null) {
      synchronized (this) {
        if (_jsp_instancemanager == null) {
          _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
        }
      }
    }
    return _jsp_instancemanager;
  }

  public void _jspInit() {
  }

  public void _jspDestroy() {
  }

  public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response)
      throws java.io.IOException, javax.servlet.ServletException {

    if (!javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) {
      final java.lang.String _jspx_method = request.getMethod();
      if ("OPTIONS".equals(_jspx_method)) {
        response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
        return;
      }
      if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method)) {
        response.setHeader("Allow","GET, HEAD, POST, OPTIONS");
        response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET, POST or HEAD. Jasper also permits OPTIONS");
        return;
      }
    }

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;


    try {
      response.setContentType("text/html; charset=UTF-8");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"../../admin/jsp/errorpageMain.jsp", true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\n\n\n\n\n\n\n\n");
      out.write('\n');
      out.write('\n');
      out.write('\n');

response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires",-1); //prevents caching at the proxy server

      out.write("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");

  SurveySessionController surveyScc = (SurveySessionController) request.getAttribute("survey");
  GraphicElementFactory gef = (GraphicElementFactory) session.getAttribute("SessionGraphicElementFactory");
  MultiSilverpeasBundle resources = (MultiSilverpeasBundle)request.getAttribute("resources");

  if (surveyScc == null) {
      // No session controller in the request -> security exception
      String sessionTimeout = ResourceLocator.getGeneralSettingBundle().getString("sessionTimeout");
      getServletConfig().getServletContext().getRequestDispatcher(sessionTimeout).forward(request, response);
      return;
  }

  LocalizationBundle generalMessage = ResourceLocator.getGeneralLocalizationBundle(
      surveyScc.getLanguage());

  String[] browseContext = (String[]) request.getAttribute("browseContext");
  String spaceLabel 		= browseContext[0];
  String componentLabel 	= browseContext[1];
  String spaceId 			= browseContext[2];
  String componentId 		= browseContext[3];

  boolean pollingStationMode = (componentId != null && componentId.startsWith("pollingStation"));

      out.write('\n');
      out.write("\n\n\n\n\n\n");
      out.write('\n');
      if (_jspx_meth_fmt_005fsetLocale_005f0(_jspx_page_context))
        return;
      out.write('\n');
      if (_jspx_meth_view_005fsetBundle_005f0(_jspx_page_context))
        return;
      out.write('\n');
      out.write('\n');
      out.write('\n');
      out.write('\n');

String nextAction = "";
String m_context = ResourceLocator.getGeneralSettingBundle().getString("ApplicationURL");

//Icons
String mandatoryField = m_context + "/util/icons/mandatoryField.gif";
String px =  m_context + "/util/icons/colorPix/1px.gif";

SettingBundle surveySettings = ResourceLocator.getSettingBundle("org.silverpeas.survey.surveySettings");

String nbMaxAnswers = surveySettings.getString("NbMaxAnswers");

Button validateButton = null;
Button cancelButton = null;
Button finishButton = null;
ButtonPane buttonPane = null;

QuestionContainerDetail survey = null;

List<FileItem> items = HttpRequest.decorate(request).getFileItems();
String action = FileUploadUtil.getOldParameter(items, "Action", "FirstQuestion");
String question = FileUploadUtil.getOldParameter(items, "question");
String nbAnswers = FileUploadUtil.getOldParameter(items, "nbAnswers");
String style = FileUploadUtil.getOldParameter(items, "questionStyle");
//String suggestionAllowed = FileUploadUtil.getOldParameter(items, "SuggestionAllowed");
String suggestionAllowed = "";
String suggestionCheck = "";
String suggestion = FileUploadUtil.getOldParameter(items, "SuggestionAllowed");
File dir = null;
String logicalName = null;
String type = null;
String physicalName = null;

boolean file = false;
long size = 0;
int nb = 0;
int attachmentSuffix = 0;
ArrayList imageList = new ArrayList();
List<Answer> answers = new ArrayList<Answer>();
Answer answer = null;
Iterator<FileItem> itemIter = items.iterator();
while (itemIter.hasNext()) {
  FileItem item = (FileItem) itemIter.next();
  if (item.isFormField())
  {
    String mpName = item.getFieldName();
    if (mpName.startsWith("answer")) {
        answer = new Answer(null, null, item.getString(FileUploadUtil.DEFAULT_ENCODING), 0, 0, false, "", 0, false, null);
        answers.add(answer);
    } else if ("suggestionLabel".equals(mpName)) {
        answer = new Answer(null, null, item.getString(FileUploadUtil.DEFAULT_ENCODING), 0, 0, false, "", 0, true, null);
        answers.add(answer);
    }
    else if (mpName.startsWith("valueImageGallery"))
    {
    	if (StringUtil.isDefined(item.getString()))
    	{
    		// traiter les images venant de la gallery si pas d'image externe
    		if (!file)
    			answer.setImage(item.getString());
    	}
    }
  }
  else
  {
    // it's a file
    if (FileHelper.isCorrectFile(item)) {
      // the part actually contained a file
      logicalName = FileUploadUtil.getFileName(item);
      type = logicalName.substring(logicalName.indexOf(".")+1, logicalName.length());
      physicalName = new Long(new Date().getTime()).toString() + attachmentSuffix + "." +type;
      attachmentSuffix = attachmentSuffix + 1;
      String mimeType = item.getContentType();
      dir = new File(FileRepositoryManager.getAbsolutePath(surveyScc.getComponentId())+surveySettings.getString("imagesSubDirectory")+File.separator+physicalName);
      FileUploadUtil.saveToFile(dir, item);
      size = item.getSize();
      if (size > 0)
      {
          answer.setImage(physicalName);
          file = true;
      }
    } else {
      // the field did not contain a file
      file = false;
    }
    out.flush();
  }
}


      out.write("\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<title></title>\n");
      if (_jspx_meth_view_005flooknfeel_005f0(_jspx_page_context))
        return;
      out.write("\n<script type=\"text/javascript\" src=\"");
      out.print(m_context);
      out.write("/util/javaScript/dateUtils.js\"></script>\n<script language=\"JavaScript1.2\">\nfunction sendData() {\n    ifCorrectFormExecute(function() {\n        ifCorrectAnswersExecute(function() {\n            if (document.surveyForm.suggestion.checked)\n            {\n                document.surveyForm.SuggestionAllowed.value = \"1\";\n            }\n            document.surveyForm.submit();\n        });\n    });\n}\n\nfunction ifCorrectAnswersExecute(callback) {\n     var errorMsg = \"\";\n     var errorNb = 0;\n     var answerEmpty = false;\n     var imageEmpty = false;\n     var fieldsEmpty = \"\";\n     for (var i=0; i<document.surveyForm.length; i++)\n     {\n        var inputName = document.surveyForm.elements[i].name;\n        if (inputName) {\n        	inputName = inputName.substring(0, 5);\n        }\n        if (inputName == \"answe\" ) {\n            if (isWhitespace(stripInitialWhitespace(document.surveyForm.elements[i].value))) {\n                  answerEmpty = true;\n            }\n        }\n\n        if (inputName == \"image\")\n        {\n            if (answerEmpty == true) {\n");
      out.write("                  if (isWhitespace(stripInitialWhitespace(document.surveyForm.elements[i].value))) {\n                        imageEmpty = true;\n                  }\n            }\n            answerEmpty = false;\n        }\n\n        if (inputName == \"value\")\n        {\n            if (imageEmpty == true) {\n                  if (isWhitespace(stripInitialWhitespace(document.surveyForm.elements[i].value))) {\n                        fieldsEmpty += (parseInt(document.surveyForm.elements[i].name.substring(17, document.surveyForm.elements[i].name.length))+1)+\",\";\n                        errorNb++;\n                  }\n            }\n            imageEmpty = false;\n        }\n      }\n	 if(");
      out.print(!"0".equals(suggestion) && "SendQuestionForm".equals(action));
      out.write("){\n         if (isWhitespace(stripInitialWhitespace(document.surveyForm.suggestionLabel.value))) {\n                errorNb++;\n         }\n     }\n     switch(errorNb) {\n        case 0 :\n            callback.call(this);\n            break;\n        default :\n            fields = fieldsEmpty.split(\",\");\n            for (var i=0; i < fields.length-1; i++) {\n                errorMsg += \"");
      out.print(resources.getString("SurveyCreationAnswerNb"));
      out.write(" \"+fields[i]+\" \\n\";\n            }\n			if(");
      out.print(!"0".equals(suggestion) && "SendQuestionForm".equals(action));
      out.write("){\n                if (isWhitespace(stripInitialWhitespace(document.surveyForm.suggestionLabel.value))) {\n                    errorMsg += \"");
      out.print(resources.getString("OtherAnswer"));
      out.write(" \\n\";\n                }\n            }\n            jQuery.popup.error(\"");
      out.print(resources.getString("EmptyAnswerNotAllowed"));
      out.write(" \\n\" + errorMsg);\n     }\n}\n\nfunction ifCorrectFormExecute(callback) {\n     var errorMsg = \"\";\n     var errorNb = 0;\n     var question = stripInitialWhitespace(document.surveyForm.question.value);\n     var nbAnswers = document.surveyForm.nbAnswers.value;\n     if (isWhitespace(question))\n     {\n           errorMsg+=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("SurveyCreationQuestion"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("GML.MustBeFilled"));
      out.write("\\n\";\n           errorNb++;\n     }\n\n     if (document.surveyForm.questionStyle.options[document.surveyForm.questionStyle.selectedIndex].value==\"null\") {\n     	//choisir au moins un style\n	    	errorMsg+=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("survey.style"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("GML.MustBeFilled"));
      out.write(" \\n\";\n	    	errorNb++;\n     }\n     else\n     {\n     	if (document.surveyForm.questionStyle.options[document.surveyForm.questionStyle.selectedIndex].value!=\"open\") {\n	          //Closed Question\n	          if (isWhitespace(nbAnswers)) {\n	             errorMsg +=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("SurveyCreationNbPossibleAnswer"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("GML.MustBeFilled"));
      out.write("\\n\";\n	             errorNb++;\n	          } else {\n	                 if (isInteger(nbAnswers)==false) {\n	                     errorMsg+=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("SurveyCreationNbPossibleAnswer"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("GML.MustContainsFloat"));
      out.write("\\n\";\n	                     errorNb++;\n	                 } else {\n	                      if (document.surveyForm.suggestion.checked) {\n	                          //nb min answers = 1\n	                          if (nbAnswers <= 0) {\n	                             errorMsg+=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("SurveyCreationNbPossibleAnswer"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("MustContainsNumberGreaterThan"));
      out.write(" 1\\n\";\n	                             errorNb++;\n	                          }\n	                      } else {\n	                          //nb min answers = 2\n	                          if (nbAnswers <= 1) {\n	                             errorMsg+=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("SurveyCreationNbPossibleAnswer"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("MustContainsNumberGreaterThan"));
      out.write(" 2\\n\";\n	                             errorNb++;\n	                          }\n	                      }\n	                      if (nbAnswers > ");
      out.print(nbMaxAnswers);
      out.write(") {\n	                         errorMsg+=\"  - ");
      out.print(resources.getString("GML.theField"));
      out.write(' ');
      out.write('\'');
      out.print(resources.getString("SurveyCreationNbPossibleAnswer"));
      out.write('\'');
      out.write(' ');
      out.print(resources.getString("MustContainsNumberLessThan"));
      out.write(' ');
      out.print(nbMaxAnswers);
      out.write("\\n\";\n	                         errorNb++;\n	                      }\n	                 }\n	          }\n	     } else {\n	          document.surveyForm.Action.value = \"SendNewQuestion\";\n	     }\n	 }\n     switch(errorNb) {\n        case 0 :\n            callback.call(this);\n            break;\n        case 1 :\n            errorMsg = \"");
      out.print(resources.getString("GML.ThisFormContains"));
      out.write(' ');
      out.write('1');
      out.write(' ');
      out.print(resources.getString("GML.error"));
      out.write(" : \\n\" + errorMsg;\n            jQuery.popup.error(errorMsg);\n            break;\n        default :\n            errorMsg = \"");
      out.print(resources.getString("GML.ThisFormContains"));
      out.write(" \" + errorNb + \" ");
      out.print(resources.getString("GML.errors"));
      out.write(" :\\n\" + errorMsg;\n            jQuery.popup.error(errorMsg);\n     }\n}\n\nvar galleryWindow = window;\nvar currentAnswer;\n\nfunction choixGallery(liste, idAnswer)\n{\n	currentAnswer = idAnswer;\n	index = liste.selectedIndex;\n	var componentId = liste.options[index].value;\n	if (index != 0)\n	{\n		url = \"");
      out.print(m_context);
      out.write("/gallery/jsp/wysiwygBrowser.jsp?ComponentId=\"+componentId+\"&Language=");
      out.print(surveyScc.getLanguage());
      out.write("\";\n		windowName = \"galleryWindow\";\n		larg = \"820\";\n		haut = \"600\";\n		windowParams = \"directories=0,menubar=0,toolbar=0, alwaysRaised\";\n		if (!galleryWindow.closed && galleryWindow.name==\"galleryWindow\")\n		{\n			galleryWindow.close();\n		}\n		galleryWindow = SP_openWindow(url, windowName, larg, haut, windowParams);\n	}\n}\n\nfunction deleteImage(idImage)\n{\n	document.getElementById('imageGallery'+idImage).innerHTML = \"\";\n	document.getElementById('valueImageGallery'+idImage).value = \"\";\n}\n\nfunction choixImageInGallery(url)\n{\n  deleteImage(currentAnswer);\n\n  var newLink = document.createElement(\"img\");\n  newLink.setAttribute(\"src\", url);\n  newLink.setAttribute(\"height\", \"40px\");\n  newLink.setAttribute(\"align\", \"top\");\n\n  var newLabel = document.createTextNode(\"");
      if (_jspx_meth_fmt_005fmessage_005f0(_jspx_page_context))
        return;
      out.write("\");\n  newLink.appendChild(newLabel);\n\n  var removeLink =  document.createElement(\"a\");\n  removeLink.setAttribute(\"href\", \"javascript:deleteImage('\"+currentAnswer+\"')\");\n  var removeIcon = document.createElement(\"img\");\n  removeIcon.setAttribute(\"src\", '");
      if (_jspx_meth_c_005furl_005f0(_jspx_page_context))
        return;
      out.write("');\n  removeIcon.setAttribute(\"border\", \"0\");\n  removeIcon.setAttribute(\"align\", \"top\");\n  removeIcon.setAttribute(\"alt\", \"");
      if (_jspx_meth_fmt_005fmessage_005f1(_jspx_page_context))
        return;
      out.write("\");\n  removeIcon.setAttribute(\"title\", \"");
      if (_jspx_meth_fmt_005fmessage_005f2(_jspx_page_context))
        return;
      out.write("\");\n\n  removeLink.appendChild(removeIcon);\n\n  document.getElementById('imageGallery'+currentAnswer).appendChild(newLink);\n  document.getElementById('imageGallery'+currentAnswer).appendChild(removeLink);\n\n  document.getElementById('valueImageGallery'+currentAnswer).value = url;\n}\n\nfunction showQuestionOptions(value)\n{\n  if (value != \"open\" && value!= \"null\") {\n    $(\"#trNbQuestions\").show();\n    $(\"#trSuggestion\").show();\n  } else {\n    $(\"#trNbQuestions\").hide();\n    $(\"#trSuggestion\").hide();\n  }\n}\n</script>\n</head>\n");

if (action.equals("FirstQuestion")) {
      surveyScc.setSessionQuestions(new ArrayList<Question>());
      action = "CreateQuestion";
}
if (action.equals("SendNewQuestion")) {
      Question questionObject = new Question(null, null, question, "", "", null, style, 0);
      questionObject.setAnswers(answers);
      List<Question> questionsV = surveyScc.getSessionQuestions();
      questionsV.add(questionObject);
      action = "CreateQuestion";
} //End if action = ViewResult
if ((action.equals("CreateQuestion")) || (action.equals("SendQuestionForm"))) {
      out.println("<body>");
      List<Question> questionsV = surveyScc.getSessionQuestions();
      int questionNb = questionsV.size() + 1;
      cancelButton = (Button) gef.getFormButton(resources.getString("GML.cancel"), "Main.jsp", false);
      buttonPane = gef.getButtonPane();
      if (action.equals("CreateQuestion")) {
            validateButton = (Button) gef.getFormButton(resources.getString("GML.validate"), "javascript:onClick=sendData()", false);
            finishButton = (Button) gef.getFormButton(resources.getString("Finish"), "PreviewSurvey", false);
            question = "";
            nbAnswers = "";
            suggestion = "";
            nextAction="SendQuestionForm";
            buttonPane.addButton(validateButton);
            if (questionsV.size() != 0) {
                buttonPane.addButton(finishButton);
            }
            buttonPane.addButton(cancelButton);
            buttonPane.setHorizontalPosition();
      } else if (action.equals("SendQuestionForm")) {
            validateButton = (Button) gef.getFormButton(resources.getString("GML.validate"), "javascript:onClick=sendData()", false);
            if (suggestion.equals("0"))
                suggestionCheck = "";
            else
                suggestionCheck = "checked";
            nextAction="SendNewQuestion";
            buttonPane.addButton(validateButton);
            buttonPane.addButton(cancelButton);
            buttonPane.setHorizontalPosition();
      }

      Window window = gef.getWindow();
      Frame frame = gef.getFrame();

      BrowseBar browseBar = window.getBrowseBar();
      browseBar.setDomainName(surveyScc.getSpaceLabel());
      browseBar.setComponentName(surveyScc.getComponentLabel(),"surveyList.jsp?Action=View");
      browseBar.setExtraInformation(resources.getString("SurveyCreation"));

      out.println(window.printBefore());
      out.println(frame.printBefore());
      out.println("<center>");
      displaySurveyHeader(surveyScc.getSessionSurveyUnderConstruction(), resources, out, gef);
      out.println("<br>");
      Board board = gef.getBoard();
      out.println(board.printBefore());

      out.write("\n      <!--DEBUT CORPS -->\n      <br/>\n\n      <form name=\"surveyForm\" action=\"questionCreator.jsp\" method=\"post\" enctype=\"multipart/form-data\">\n      <table border=\"0\" cellPadding=\"3\" cellSpacing=\"0\" width=\"100%\" class=\"intfdcolor4\">\n        <tr>\n          <td class=\"txtlibform\" width=\"30%\">");
      out.print(resources.getString("SurveyCreationQuestion"));
      out.write(' ');
      out.print(questionNb);
      out.write(" :</td>\n          <td width=\"70%\"><input type=\"text\" name=\"question\" value=\"");
      out.print(WebEncodeHelper.javaStringToHtmlString(question));
      out.write("\" size=\"60\" maxlength=\"");
      out.print(DBUtil.getTextFieldLength());
      out.write("\">&nbsp;<img border=\"0\" src=\"");
      out.print(mandatoryField);
      out.write("\" width=\"5\" height=\"5\"></td>\n        </tr>\n        ");
 if (action.equals("SendQuestionForm")) {
                if (!style.equals("open"))
                {
                  // question fermée
                  
      out.write("\n                    <tr>\n                      <td class=\"txtlibform\" valign=\"top\">");
      out.print( resources.getString("survey.style"));
      out.write(" :</td>\n                      <td>");
      out.print(resources.getString("survey."+style));
      out.write("\n                	    <select style=\"visibility: hidden;\" id=\"questionStyle\" name=\"questionStyle\"><option selected>");
      out.print(style);
      out.write("</option></select>\n                	  </td>\n                    </tr>\n                    <tr>\n                      <td class=\"txtlibform\">");
      out.print(resources.getString("SurveyCreationNbPossibleAnswer"));
      out.write(" :</td><td>\n                        <input type=\"text\" name=\"nbAnswers\" value=\"");
      out.print(nbAnswers);
      out.write("\" size=\"3\" disabled maxlength=\"2\">&nbsp;<img border=\"0\" src=\"");
      out.print(mandatoryField);
      out.write("\" width=\"5\" height=\"5\" />\n                      </td>\n                    </tr>\n                    <tr>\n                      <td class=\"txtlibform\">");
      out.print(resources.getString("SuggestionAllowed"));
      out.write(" :</td>\n                      <td><input type=\"checkbox\" name=\"suggestion\" value=\"\" ");
      out.print(suggestionCheck);
      out.write(" disabled></td>\n                    </tr>\n                    ");
 
                    nb =  Integer.parseInt(nbAnswers);
                    String inputName = "";
                    int j=0;
                    for (int i = 0; i < nb; i++)
                    {
                        j = i + 1;
                        inputName = "answer"+i;
                        out.println("<tr><td colspan=2 align=center>");
                        out.println("<table cellpadding=0 cellspacing=5 width=\"100%\">");
                        out.println("<tr><td class=\"intfdcolor\"><img src=\""+px+"\" border=\"0\"></td></tr>");
                        out.println("</table></td></tr>");
                        out.println("<tr><td class=\"txtlibform\">"+resources.getString("SurveyCreationAnswerNb")+"&nbsp;"+j+" :</td><td><input type=\"text\" name=\""+inputName+"\" value=\"\" size=\"60\" maxlength=\""+DBUtil.getTextFieldLength()+"\"></td></tr>");

                        if (!style.equals("list"))
                        {
                        	// afficher les photos que si on est pas dans le choix d'une liste déroulante
                        	out.println("<tr><td class=\"txtlibform\">"+resources.getString("SurveyCreationAnswerImage")+"&nbsp;"+j+" :</td><td><input type=\"file\" name=\"image"+i+"\" size=\"60\"></td></tr>");

	                     	//zone pour le lien vers l'image
	                        out.println("<tr><td></td><td><span id=\"imageGallery"+i+"\"></span>");
	                        out.println("<input type=\"hidden\" id=\"valueImageGallery"+i+"\" name=\"valueImageGallery"+i+"\" >");

	                        List<ComponentInstLight> galleries = surveyScc.getGalleries();
	                        if (galleries.size() > 0)
	    					{
	    						out.println(" <select id=\"galleries\" name=\"galleries\" onchange=\"choixGallery(this, '"+i+"');this.selectedIndex=0;\"> ");
	    						out.println(" <option selected>"+resources.getString("GML.thumbnail.galleries")+"</option> ");
	   							for(int k=0; k < galleries.size(); k++ )
	   							{
	   								ComponentInstLight gallery = (ComponentInstLight) galleries.get(k);
	   								out.println(" <option value=\""+gallery.getId()+"\">"+gallery.getLabel()+"</option> ");
	   							}
	    						out.println("</select>");
	    						out.println("</td>");
	    					}
	                    	out.println("</tr>");
                        }

                    }
                    if (!suggestion.equals("0"))
                    {
      out.write("\n                    <tr>\n                      <td colspan=\"2\" align=\"center\">\n                        <table cellpadding=\"0\" cellspacing=\"5\" width=\"100%\">\n                          <tr><td class=\"intfdcolor\"><img src=\"");
      out.print(px);
      out.write("\" border=\"0\"></td></tr>\n                        </table>\n                      </td>\n                    </tr>\n                    <tr>\n                      <td class=\"txtlibform\">");
      out.print(resources.getString("OtherAnswer"));
      out.write("&nbsp;:</td>\n                      <td><input type=\"text\" name=\"suggestionLabel\" value=\"");
      out.print(resources.getString("SurveyCreationDefaultSuggestionLabel"));
      out.write("\" size=\"60\" maxlength=\"");
      out.print(DBUtil.getTextFieldLength());
      out.write("\"></td>\n                    </tr>\n                        ");

                    }
                }
                else
                {
                	// question ouverte
                	out.println("<input type=\"hidden\" name=\"style\" value="+style+" >");
                }
                out.println("<tr><td>(<img border=0 src=\""+mandatoryField+"\" width=5 height=5>&nbsp;:&nbsp;"+generalMessage.getString("GML.requiredField")+")</td></tr>");
           }
           else
           {
                // liste déroulante des choix possible
                out.println("<tr><td class=\"txtlibform\" valign=top>"+resources.getString("survey.style")+" :</td><td>");
                out.println(" <select id=\"questionStyle\" name=\"questionStyle\" onchange=\"showQuestionOptions(this.value);\"> ");
    			out.println(" <option selected value=\"null\">"+resources.getString("survey.style")+"</option> ");
				out.println(" <option value=\"open\">"+resources.getString("survey.open")+"</option> ");
				out.println(" <option value=\"radio\">"+resources.getString("survey.radio")+"</option> ");
				out.println(" <option value=\"checkbox\">"+resources.getString("survey.checkbox")+"</option> ");
				out.println(" <option value=\"list\">"+resources.getString("survey.list")+"</option> ");
    			out.println("</select>");
                out.println("</td></tr>");

                out.println("<tr id=\"trNbQuestions\" style=\"display:none;\"><td class=\"txtlibform\">"+resources.getString("SurveyCreationNbPossibleAnswer")+" :</td><td><input type=\"text\" name=\"nbAnswers\" value=\""+nbAnswers+"\" size=\"3\"  maxlength=\"2\">&nbsp;<img border=0 src=\""+mandatoryField+"\" width=5 height=5></td></tr>");
                out.println("<tr id=\"trSuggestion\" style=\"display:none;\"><td class=\"txtlibform\">"+resources.getString("SuggestionAllowed")+" :</td><td><input type=\"checkbox\" name=\"suggestion\" value=\"\" "+suggestionCheck+"></td></tr>");

                String inputName = "answer"+0;
                out.println("<tr><td><input type=\"hidden\" name=\""+inputName+"\"></td></tr>");
                out.println("<tr><td>(<img border=0 src=\""+mandatoryField+"\" width=5 height=5>&nbsp;:&nbsp;"+generalMessage.getString("GML.requiredField")+")</td></tr>");
           }
        
      out.write("\n        <tr><td><input type=\"hidden\" name=\"Action\" value=\"");
      out.print(nextAction);
      out.write("\">\n                <input type=\"hidden\" name=\"SuggestionAllowed\" value=\"0\"></td></tr>\n      </table>\n      </form>\n       <!-- FIN CORPS -->\n\n");

	  out.println(board.printAfter());
      out.println(frame.printMiddle());
      out.println("<br><center>"+buttonPane.print()+"</center>");
      out.println("</center>");
      out.println(frame.printAfter());
      out.println(window.printAfter());
      out.println("</body></html>");
 } //End if action = ViewQuestion

      out.write('\n');
    } catch (java.lang.Throwable t) {
      if (!(t instanceof javax.servlet.jsp.SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          try {
            if (response.isCommitted()) {
              out.flush();
            } else {
              out.clearBuffer();
            }
          } catch (java.io.IOException e) {}
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
        else throw new ServletException(t);
      }
    } finally {
      _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }

  private boolean _jspx_meth_fmt_005fsetLocale_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:setLocale
    org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag _jspx_th_fmt_005fsetLocale_005f0 = new org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fsetLocale_005f0);
    try {
      _jspx_th_fmt_005fsetLocale_005f0.setPageContext(_jspx_page_context);
      _jspx_th_fmt_005fsetLocale_005f0.setParent(null);
      // /survey/jsp/questionCreator.jsp(40,0) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_fmt_005fsetLocale_005f0.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${sessionScope['SilverSessionController'].favoriteLanguage}", java.lang.Object.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      int _jspx_eval_fmt_005fsetLocale_005f0 = _jspx_th_fmt_005fsetLocale_005f0.doStartTag();
      if (_jspx_th_fmt_005fsetLocale_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fsetLocale_005f0, _jsp_getInstanceManager());    }
    return false;
  }

  private boolean _jspx_meth_view_005fsetBundle_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:setBundle
    org.silverpeas.core.web.util.viewgenerator.html.SetBundleTag _jspx_th_view_005fsetBundle_005f0 = new org.silverpeas.core.web.util.viewgenerator.html.SetBundleTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005fsetBundle_005f0);
    try {
      _jspx_th_view_005fsetBundle_005f0.setPageContext(_jspx_page_context);
      _jspx_th_view_005fsetBundle_005f0.setParent(null);
      // /survey/jsp/questionCreator.jsp(41,0) name = bundle type = org.silverpeas.kernel.bundle.SilverpeasBundle reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_view_005fsetBundle_005f0.setBundle((org.silverpeas.kernel.bundle.SilverpeasBundle) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${requestScope.resources.multilangBundle}", org.silverpeas.kernel.bundle.SilverpeasBundle.class, (javax.servlet.jsp.PageContext)_jspx_page_context, null));
      int _jspx_eval_view_005fsetBundle_005f0 = _jspx_th_view_005fsetBundle_005f0.doStartTag();
      if (_jspx_th_view_005fsetBundle_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005fsetBundle_005f0, _jsp_getInstanceManager());    }
    return false;
  }

  private boolean _jspx_meth_view_005flooknfeel_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  view:looknfeel
    org.silverpeas.core.web.util.viewgenerator.html.LookAndStyleTag _jspx_th_view_005flooknfeel_005f0 = new org.silverpeas.core.web.util.viewgenerator.html.LookAndStyleTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_view_005flooknfeel_005f0);
    try {
      _jspx_th_view_005flooknfeel_005f0.setPageContext(_jspx_page_context);
      _jspx_th_view_005flooknfeel_005f0.setParent(null);
      // /survey/jsp/questionCreator.jsp(169,0) name = withCheckFormScript type = boolean reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_view_005flooknfeel_005f0.setWithCheckFormScript(true);
      int _jspx_eval_view_005flooknfeel_005f0 = _jspx_th_view_005flooknfeel_005f0.doStartTag();
      if (_jspx_th_view_005flooknfeel_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_view_005flooknfeel_005f0, _jsp_getInstanceManager());    }
    return false;
  }

  private boolean _jspx_meth_fmt_005fmessage_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_005fmessage_005f0 = new org.apache.taglibs.standard.tag.rt.fmt.MessageTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fmessage_005f0);
    try {
      _jspx_th_fmt_005fmessage_005f0.setPageContext(_jspx_page_context);
      _jspx_th_fmt_005fmessage_005f0.setParent(null);
      // /survey/jsp/questionCreator.jsp(349,42) name = key type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_fmt_005fmessage_005f0.setKey("survey.imageGallery");
      int _jspx_eval_fmt_005fmessage_005f0 = _jspx_th_fmt_005fmessage_005f0.doStartTag();
      if (_jspx_th_fmt_005fmessage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fmessage_005f0, _jsp_getInstanceManager());    }
    return false;
  }

  private boolean _jspx_meth_c_005furl_005f0(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  c:url
    org.apache.taglibs.standard.tag.rt.core.UrlTag _jspx_th_c_005furl_005f0 = new org.apache.taglibs.standard.tag.rt.core.UrlTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_c_005furl_005f0);
    try {
      _jspx_th_c_005furl_005f0.setPageContext(_jspx_page_context);
      _jspx_th_c_005furl_005f0.setParent(null);
      // /survey/jsp/questionCreator.jsp(355,34) name = value type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_c_005furl_005f0.setValue("/util/icons/delete.gif");
      int _jspx_eval_c_005furl_005f0 = _jspx_th_c_005furl_005f0.doStartTag();
      if (_jspx_th_c_005furl_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_c_005furl_005f0, _jsp_getInstanceManager());    }
    return false;
  }

  private boolean _jspx_meth_fmt_005fmessage_005f1(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_005fmessage_005f1 = new org.apache.taglibs.standard.tag.rt.fmt.MessageTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fmessage_005f1);
    try {
      _jspx_th_fmt_005fmessage_005f1.setPageContext(_jspx_page_context);
      _jspx_th_fmt_005fmessage_005f1.setParent(null);
      // /survey/jsp/questionCreator.jsp(358,34) name = key type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_fmt_005fmessage_005f1.setKey("GML.delete");
      int _jspx_eval_fmt_005fmessage_005f1 = _jspx_th_fmt_005fmessage_005f1.doStartTag();
      if (_jspx_th_fmt_005fmessage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fmessage_005f1, _jsp_getInstanceManager());    }
    return false;
  }

  private boolean _jspx_meth_fmt_005fmessage_005f2(javax.servlet.jsp.PageContext _jspx_page_context)
          throws java.lang.Throwable {
    javax.servlet.jsp.PageContext pageContext = _jspx_page_context;
    javax.servlet.jsp.JspWriter out = _jspx_page_context.getOut();
    //  fmt:message
    org.apache.taglibs.standard.tag.rt.fmt.MessageTag _jspx_th_fmt_005fmessage_005f2 = new org.apache.taglibs.standard.tag.rt.fmt.MessageTag();
    _jsp_getInstanceManager().newInstance(_jspx_th_fmt_005fmessage_005f2);
    try {
      _jspx_th_fmt_005fmessage_005f2.setPageContext(_jspx_page_context);
      _jspx_th_fmt_005fmessage_005f2.setParent(null);
      // /survey/jsp/questionCreator.jsp(359,36) name = key type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
      _jspx_th_fmt_005fmessage_005f2.setKey("GML.delete");
      int _jspx_eval_fmt_005fmessage_005f2 = _jspx_th_fmt_005fmessage_005f2.doStartTag();
      if (_jspx_th_fmt_005fmessage_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } finally {
      org.apache.jasper.runtime.JspRuntimeLibrary.releaseTag(_jspx_th_fmt_005fmessage_005f2, _jsp_getInstanceManager());    }
    return false;
  }
}
