// Define and initialize the primary data array.
// For example, index 3a means 3rd round, 1st match.
// Create 3a.txt file to store summary for this match.
// Visiting team is listed first, home team is last.
// The team name syntax must be consistent throughout.
// Enter team match scores when results are reported.
// Use score 0.0 for both if match has not been played.
// Tables for standings and schedule will be generated.
// The last field can be used for special marks, or for
// example the match date, these appear on the schedule.
// Blank team name is used for an empty placeholder.
var sched = new Array()
sched['1a']=new Array("UOP",1.5,"MKNGT",4.5,"")
sched['1b']=new Array("MKING",3.5,"EXCLB",2.5,"")
sched['1c']=new Array("FORKS",4.0,"AONRK",2.0,"")

sched['2a']=new Array("MKNGT",4.5,"FORKS",1.5,"")
sched['2b']=new Array("AONRK",2.5,"MKING",3.5,"")
sched['2c']=new Array("EXCLB",4.0,"UOP",2.0,"")

sched['3a']=new Array("UOP",1.5,"AONRK",4.5,"")
sched['3b']=new Array("FORKS",0.5,"MKING",6.0,"")
sched['3c']=new Array("MKNGT",5.5,"EXCLB",0.5,"")

sched['4a']=new Array("MKING",3.0,"UOP",3.0,"")
sched['4b']=new Array("FORKS",1.5,"EXCLB",4.0,"")
sched['4c']=new Array("AONRK",0.5,"MKNGT",5.5,"")

sched['5a']=new Array("UOP",6.0,"FORKS",0.0,"")
sched['5b']=new Array("MKNGT",4.5,"MKING",0.5,"")
sched['5c']=new Array("EXCLB",2.5,"AONRK",3.5,"")

sched['6a']=new Array("MKNGT",0.0,"UOP",0.0,"")
sched['6b']=new Array("EXCLB",1.5,"MKING",4.5,"")
sched['6c']=new Array("AONRK",6.0,"FORKS",0.0,"")

sched['7a']=new Array("FORKS",0.0,"MKNGT",0.0,"")
sched['7b']=new Array("MKING",0.0,"AONRK",0.0,"")
sched['7c']=new Array("UOP",0.0,"EXCLB",0.0,"")

sched['8a']=new Array("MKING",0.0,"FORKS",0.0,"")
sched['8b']=new Array("EXCLB",0.0,"MKNGT",0.0,"")
sched['8c']=new Array("AONRK",0.0,"UOP",0.0,"")

sched['9a']=new Array("UOP",0.0,"MKING",0.0,"")
sched['9b']=new Array("EXCLB",0.0,"FORKS",0.0,"")
sched['9c']=new Array("MKNGT",0.0,"AONRK",0.0,"")

sched['10a']=new Array("AONRK",0.0,"EXCLB",0.0,"")
sched['10b']=new Array("MKING",0.0,"MKNGT",0.0,"")
sched['10c']=new Array("FORKS",0.0,"UOP",0.0,"")


// Enter the play-by date for each scheduled round
var playby = new Array("9/21","10/11","10/31","11/18","12/16","1/20","2/10","3/2","3/23","4/13")

// Designate the team with the bye for each round (optional).
// Also used to create links to the respective team rosters.
// Therefore all teams should be listed here in some order.
var byes = new
Array("MKNGT","FORKS","MKING","UOP","EXCLB","AONRK","","","","")

// Define the labels used for the schedule table.
// Replace Roster with Bye if odd number of teams.
// Replace Bye with Roster if even number of teams.
var labels = new
Array("Rnd","Play By","2011","(A)","(B)","(C)")

// Define the team name syntax, order doesn't matter.
// Suggest using order of finish from previous season.
var teams = new Array()
teams[0] = "MKNGT"
teams[1] = "FORKS"
teams[2] = "MKING"
teams[3] = "EXCLB"
teams[4] = "UOP"
teams[5] = "AONRK"


// Reverse map team names to the index used above.
// Very important to make sure these are aligned.
var keys = new Array()
keys["MKNGT"] = 0
keys["FORKS"] = 1
keys["MKING"] = 2
keys["EXCLB"] = 3
keys["UOP"] = 4
keys["AONRK"] = 5


// Define and enter extra comments for each team (optional)
// These are displayed as part of the team standings.
// The order of this array matches the team indices.
var notes = new Array()
notes[0] = ""
notes[1] = " "
notes[2] = " "
notes[3] = " "
notes[4] = " "
notes[5] = " "

// Enter script name to display all match reports.
// The order of this array matches the team indices.
// This requires the perf ratings to be published.
// ***not used for 2009 or 2010***
var mrep = new Array()
mrep[0]="./mkngt.html"
mrep[1]="./uop.html"
mrep[2]="./mking.html"
mrep[3]="./exclb.html"
mrep[4]="./aonrk.html"
mrep[5]="./forks.html"


// This represents the default ordering of teams.
// Values used here correspond to the team index.
// These will be re-ordered by function revsort()
// before displaying the divisional standings.
var idx = new Array(0,1,2,3,4,5)

// Define and initialize arrays for team statistics.
// Performance ratings must be entered as published.
// At the beginning of the season, use 0 for the PRs.
// The order of these arrays match the team indices.
var perf = new Array(0,0,0,0,0,0) // performance rating
var wins = new Array(0,0,0,0,0,0) // team wins
var loss = new Array(0,0,0,0,0,0) // team losses
var draw = new Array(0,0,0,0,0,0) // team draws
var gpts = new Array(0,0,0,0,0,0) // game points
var mpts = new Array(0,0,0,0,0,0) // match points
var prct = new Array(0,0,0,0,0,0) // winning percentage
var usat = new Array(0,0,0,0,0,0) // team usat
var tbrk = new Array(0,0,0,0,0,0) // team tie-break

// Enter cicl links for team roster and player results.
// The order of this array must match team byes above.
var links = new Array()
//links[0]="http://www.chicagochessleague.org/cgi-bin/cicl/ParseRates.cgi?Team=MKNGT"
links[0]="http://www.chicagochessleague.org/generated/Ratings_Report.pdf"
links[1]="http://www.chicagochessleague.org/generated/Ratings_Report.pdf"
links[2]="http://www.chicagochessleague.org/generated/CICLratings_extract.txt"
links[3]="http://www.chicagochessleague.org/generated/Ratings_Report.pdf"
links[4]="http://www.chicagochessleague.org/generated/Ratings_Report.pdf"
links[5]="http://www.chicagochessleague.org/generated/Ratings_Report.pdf"
links[6]="http://www.chicagochessleague.org/cicl/ReqTeam.htm"
links[7]="http://www.chicagochessleague.org/cicl/ReqTeam.htm"
links[8]="http://www.chicagochessleague.org/cicl/ReqTeam.htm"
links[9]="http://www.chicagochessleague.org/cicl/ReqTeam.htm"

// Define and enter links to team logos
// Set to null string if no logo exists.
// The order must match team byes above.
var logo2 = new Array()
logo2[0]=""
logo2[1]=""
logo2[2]=""
logo2[3]=""
logo2[4]=""
logo2[5]=""
logo2[6]=""
logo2[7]=""
logo2[8]=""
logo2[9]=""

