private void formScreen(String action,
                              Connection database,
                              HttpSession session,
                              HttpServletRequest request,
                              PrintWriter webPageOutput)
      {
      int setNumber=0;
      String setName="";
      Routines.tableStart(false,webPageOutput);
      if("Change Set".equals(action))
        {
        try
          {
          Statement sql=database.createStatement();
          ResultSet queryResult;
          queryResult=sql.executeQuery("SELECT SetNumber " +
                                       "FROM defaultsets " +
                                       "ORDER BY Sequence DESC");
          int tempSetNumber=0;
          while(queryResult.next())
               {
               tempSetNumber=queryResult.getInt(1);
               int currentSequence=0;
               if("true".equals(request.getParameter(String.valueOf(tempSetNumber))))
                 {
                 queryResult=sql.executeQuery("SELECT SetNumber,SetName " +
                                              "FROM defaultsets " +
                                              "WHERE SetNumber=" + tempSetNumber);
                 if(queryResult.first())
                   {
                   setNumber=queryResult.getInt(1);
                   setName=queryResult.getString(2);
                   }
                 else
                   {
                   Routines.writeToLog(servletName,"Unable to find set (" + tempSetNumber + ")",false,context);
                   }
                 }
               }
            }
       catch(SQLException error)
            {
            Routines.writeToLog(servletName,"Unable to retrieve set: " + error,false,context);
            }
      Routines.tableHeader("Amend details of Set",2,webPageOutput);
      }
      if("New Set".equals(action))
        {
        Routines.tableHeader("Enter details of new Set",2,webPageOutput);
        }
      Routines.tableDataStart(true,false,false,true,false,5,0,"scoresrow",webPageOutput);
      webPageOutput.print("Name");
      Routines.tableDataEnd(false,false,false,webPageOutput);
      Routines.tableDataStart(true,false,false,false,false,75,0,"scoresrow",webPageOutput);
      webPageOutput.print("<INPUT TYPE=\"TEXT\" NAME=\"setName\" SIZE=\"30\" MAXLENGTH=\"30\" VALUE=\"" + setName + "\">");
      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 Set".equals(action))
        {
        webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Store New Set\" NAME=\"action\">");
        }
      else
        {
        webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Store Changed Set\" 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=\"setNumber\" VALUE=\"" + setNumber + "\">");
      webPageOutput.println("</FORM>");
      }