private void formScreen(String action,
                              Connection database,
                              HttpSession session,
                              HttpServletRequest request,
                              PrintWriter webPageOutput)
      {
      int settingNumber=0;
      String settingName="";
      int settingValue=0;
      Routines.tableStart(false,webPageOutput);
      if("Change Setting".equals(action))
        {
        try
          {
          Statement sql=database.createStatement();
          ResultSet queryResult;
          queryResult=sql.executeQuery("SELECT SettingNumber " +
                                       "FROM gamesettings " +
                                       "ORDER BY SettingNumber DESC");
          int tempSettingNumber=0;
          while(queryResult.next())
               {
               tempSettingNumber=queryResult.getInt(1);
               if("true".equals(request.getParameter(String.valueOf(tempSettingNumber))))
                 {
                 queryResult=sql.executeQuery("SELECT SettingNumber,SettingName,Value " +
                                              "FROM gamesettings " +
                                              "WHERE SettingNumber=" + tempSettingNumber);
                 if(queryResult.first())
                   {
                   settingNumber=queryResult.getInt(1);
                   settingName=queryResult.getString(2);
                   settingValue=queryResult.getInt(3);
                   }
                 else
                   {
				   Routines.writeToLog(servletName,"Unable to find setting (" + tempSettingNumber + ")",false,context);	
                   }
                 }
               }
            }
       catch(SQLException error)
            {
			Routines.writeToLog(servletName,"Unable to retrieve setting: " + error,false,context);	
            }
      Routines.tableHeader("Amend details of Setting",2,webPageOutput);
      }
      if("New Setting".equals(action))
        {
        Routines.tableHeader("Enter details of new Setting",2,webPageOutput);
        }
      Routines.tableDataStart(true,false,false,true,false,5,0,"scoresrow",webPageOutput);
      webPageOutput.print("Setting Name");
      Routines.tableDataEnd(false,false,false,webPageOutput);
      Routines.tableDataStart(true,false,false,false,false,30,0,"scoresrow",webPageOutput);
	  webPageOutput.print("<INPUT TYPE=\"TEXT\" NAME=\"settingName\" SIZE=\"20\" MAXLENGTH=\"20\" VALUE=\"" + settingName + "\">");
	  Routines.tableDataEnd(false,false,false,webPageOutput);
	  Routines.tableDataStart(true,false,false,true,false,5,0,"scoresrow",webPageOutput);
	  webPageOutput.print("Setting Value");
	  Routines.tableDataEnd(false,false,false,webPageOutput);
	  Routines.tableDataStart(true,false,false,false,false,40,0,"scoresrow",webPageOutput);
	  webPageOutput.println("<SELECT NAME=\"settingValue\">");
	  String selected="";
	  for(int currentNumber=0;currentNumber<100;currentNumber++)
		 {
		 if(currentNumber==settingValue)
		   {
		   selected=" SELECTED";
		   }
		 else
		   {
		   selected="";
		   }
		 webPageOutput.println(" <OPTION" + selected + " VALUE=\"" + currentNumber + "\">" + currentNumber);
		 }
	  webPageOutput.println("</SELECT>");
      Routines.tableDataEnd(false,false,true,webPageOutput);
      Routines.tableEnd(webPageOutput);
      webPageOutput.println(Routines.spaceLines(1));
      Routines.tableStart(false,webPageOutput);
      Routines.tableHeader("Actions",1,webPageOutput);
      Routines.tableDataStart(true,true,false,true,false,0,0,"scoresrow",webPageOutput);
      if("New Setting".equals(action))
        {
        webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Store New Setting\" NAME=\"action\">");
        }
      else
        {
        webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Store Changed Setting\" NAME=\"action\">");
        }
      webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Cancel\" NAME=\"action\">");
      Routines.tableDataEnd(false,false,true,webPageOutput);
      Routines.tableEnd(webPageOutput);
      webPageOutput.println("<INPUT TYPE=\"hidden\" NAME=\"jsessionid\" VALUE=\"" + session.getId() + "\">");
      webPageOutput.println("<INPUT TYPE=\"hidden\" NAME=\"settingNumber\" VALUE=\"" + settingNumber + "\">");
      webPageOutput.println("</FORM>");
      }