private void viewScreen(int teamNumber,
                           int leagueNumber,
                           String action,
                           HttpSession session,
                           Connection database,
                           HttpServletRequest request,
                           HttpServletResponse response,
                           PrintWriter webPageOutput)
      {
      int draftPriorityNumber=0;
      int numOfTeams=0;
      int ranking=0;
      try
        {
        Statement sql=database.createStatement();
        ResultSet queryResults;
        queryResults=sql.executeQuery("SELECT COUNT(TeamNumber) " +
                                      "FROM leagueteams,divisions,conferences " +
                                      "WHERE leagueteams.DivisionNumber = divisions.DivisionNumber " +
                                      "AND divisions.ConferenceNumber=conferences.ConferenceNumber " +
                                      "AND conferences.LeagueNumber=" + leagueNumber);
        queryResults.first();
        numOfTeams=queryResults.getInt(1);
        }
      catch(SQLException error)
        {
		Routines.writeToLog(servletName,"Error counting teams = " + error,false,context);	
        }
      try
        {
        Statement sql=database.createStatement();
        ResultSet queryResults;
        queryResults=sql.executeQuery("SELECT Sequence " +
                                      "FROM draftboardteam " +
                                      "WHERE TeamNumber=" + teamNumber);
        queryResults.first();
        ranking=queryResults.getInt(1);
        }
      catch(SQLException error)
        {
		Routines.writeToLog(servletName,"Error getting ranking = " + error,false,context);	
        }
      Routines.myTableStart(false,webPageOutput);
      Routines.myTableHeader("Please select the position you wish to draft in each round of the draft",10,webPageOutput);
      webPageOutput.println("<TR CLASS=\"columnrow\" ALIGN=\"center\">");
      webPageOutput.println("<TH ALIGN=\"center\">Round</TH>");
      webPageOutput.println("<TH ALIGN=\"center\">Pick</TH>");
      webPageOutput.println("<TH ALIGN=\"center\">Sel</TH>");
      webPageOutput.println("<TH ALIGN=\"center\">Position</TH>");
      webPageOutput.println("</TR>");
      boolean positionsFound=false;
      int rate=0;
      try
        {
        Statement sql=database.createStatement();
        ResultSet queryResult;
        queryResult=sql.executeQuery("SELECT DraftPriorityNumber,PositionName " +
                                     "FROM draftpriorities,positions " +
                                     "WHERE TeamNumber = " + teamNumber + " " +
                                     "AND draftpriorities.PositionNumber=positions.PositionNumber " +
                                     "ORDER BY draftpriorities.Sequence ASC");
        draftPriorityNumber=0;
        String positionName="";
        boolean flipFlop=true;
        while(queryResult.next())
             {
             rate++;
             if(!positionsFound)
               {
               positionsFound=true;
               }
             draftPriorityNumber=queryResult.getInt(1);
             positionName=queryResult.getString(2);
             Routines.tableDataStart(true,true,false,true,false,3,0,"scoresrow",webPageOutput);
             webPageOutput.print(rate);
             Routines.tableDataEnd(false,false,false,webPageOutput);
             Routines.tableDataStart(true,true,false,false,false,3,0,"scoresrow",webPageOutput);
             if(flipFlop)
               {
               webPageOutput.println(ranking);
               }
             else
               {
               webPageOutput.println(numOfTeams-(ranking-1));
               }
             Routines.tableDataStart(true,false,false,false,false,3,0,"scoresrow",webPageOutput);
             webPageOutput.print("<INPUT TYPE=\"CHECKBOX\" NAME=\"" + draftPriorityNumber  + "\" VALUE=\"true\">");
             Routines.tableDataEnd(false,false,false,webPageOutput);
             Routines.tableDataStart(true,false,false,false,false,91,0,"scoresrow",webPageOutput);
             webPageOutput.println(positionName);
             Routines.tableDataEnd(false,false,true,webPageOutput);
             if(flipFlop)
               {
               flipFlop=false;
               }
             else
               {
               flipFlop=true;
               }
             }
        }
      catch(SQLException error)
        {
		Routines.writeToLog(servletName,"Unable to retrieve draftpriorities : " + error,false,context);	
        }
      if(!positionsFound)
        {
        Routines.tableDataStart(true,true,false,true,false,0,0,"scoresrow",webPageOutput);
        webPageOutput.println("No Positions found.");
        Routines.tableDataEnd(false,false,true,webPageOutput);
        }
      Routines.tableEnd(webPageOutput);
      webPageOutput.println(Routines.spaceLines(1));
      Routines.tableStart(false,webPageOutput);
      Routines.tableHeader("Actions",0,webPageOutput);
      Routines.tableDataStart(true,true,true,true,false,0,0,"scoresrow",webPageOutput);
      if(positionsFound)
        {
        webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Move Position Up\" NAME=\"action\">");
        webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Move Position Down\" NAME=\"action\">");
        webPageOutput.println(Routines.spaceLines(1));
        }
      webPageOutput.println("<INPUT TYPE=\"SUBMIT\" VALUE=\"Return to MyTeam page\" NAME=\"action\">");
      webPageOutput.println("<INPUT TYPE=\"hidden\" NAME=\"league\" VALUE=\"" + leagueNumber + "\">");
      webPageOutput.println("<INPUT TYPE=\"hidden\" NAME=\"team\" VALUE=\"" + teamNumber + "\">");
      webPageOutput.println("<INPUT TYPE=\"hidden\" NAME=\"jsessionid\" VALUE=\"" + session.getId() + "\">");
      webPageOutput.println("</FORM>");
      Routines.tableDataEnd(true,false,true,webPageOutput);
      Routines.tableEnd(webPageOutput);
      webPageOutput.println(Routines.spaceLines(1));
      }