Name: (Click the i for help.)
Team A:
Team B:
Seed:

Price per square: $     Colored grid:       Hide the digits:

Prize percentages:
Regular squares: 1st qtr %   2nd qtr %   3rd qtr %   4th qtr %  
Adjacent squares: 1st qtr %   2nd qtr %   3rd qtr %   4th qtr %  
Total percentage: %

Prize amounts:
Regular squares: 1st qtr: $   2nd qtr: $   3rd qtr: $   4th qtr: $  
Adjacent squares: 1st qtr: $   2nd qtr: $   3rd qtr: $   4th qtr: $  
Total pot: $

Enter one name per line, 100 names in all.

Typically, a pool coordinator sells squares. Each square is sold for the same amount. While the squares are being sold and each square is assigned to an individual bettor, the heading digits are not shown. After all squares are sold, the program is run to assign digits along the top and side headers. The game score at the appointed times is cross-referenced against the resulting grid to determine the winners. The program allows for several types of prizes, but your pool does not have to award them all. You might only have one prize for the final score, or a prize for the first-half and final scores. If your pool won't award a particular prize, set that award's percentage to zero. The program will keep track of the total percentage and the prize amounts, based on the cost per square. Some error checking is done here, but you might confuse the program with negative numbers. When adjacent-square prizes are to be awarded, remember that that are four squares adjacent to each winning square, so the percentage you enter is multiplied by four and added to the total percentage display.

The seed determines the resulting digit sequences. The program applies various formulae to the seed to determine each of the eight digit sequences, so it isn't practical for a person to try to calculate the sequences from a seed. However, a specific seed will always generate the same set of sequences. This program cannot show a grid that pays on the same digit sequence for multiple quarters, and there is no easy way to guess the seed that will provide a desired sequence for a desired quarter. If the seed field is left blank, the seed will be randomly chosen by the program. The seed used is always displayed on the output page, so a particular grid can always be regenerated even if the program chose the seed.

Some generations of the sequences will appear to have patterns, such as multiple columns with the same digit used for each quarter. This is an arithmetic anomoly of some seeds. The total number of ten digit sequences is 3,628,800, which is divisible by all the digits, so there are some seeds that will generate results that might not work well for a football pool. If this happens, try a different seed. Note also that the program chooses 8 sets of 10 digits from the one seed. In other words, the 8 sets are not independent, they depend on static functions applied to the one seed.

Again, the seed should not be known to the bettors before the squares are sold. Your bettors need to trust that the seed is unknown to all bettors until the squares are assigned and paid for. (You don't want unpaid bettors to drop out if they don't like their numbers.)

Setting the form values from the URL
You can set the values of most of the fields by setting up a shortcut to the web page with a "query string". I won't describe here how to set up a shortcut since that's OS dependent. The URL will look like:
http://www.gocek.org/software/football-pool.htm?keyword=value&keyword=value&...
The keywords are:
poolname, teama, teamb, seed, price
q1pct, q2pct, q3pct, q4pct, q1adjpct, q2adjpct, q3adjpct, q4adjpct
For example,
http://www.gocek.org/software/football-pool.htm?poolname=Hey
sets the pool name to "Hey".
There are no keywords for the color checkbox, the hidden digit checkbox, or the bettor names. Try this example, and you'll see the way the fields are filled:
   Click here

JavaScript code Copyright 2010 by Gary Gocek - brought to you by gocek.org!