'
tx += ''
tx += ''
/// first 4 rounds
for (round=1; round <=4 ; round++) {
nrow = Math.pow(2,4-round)
rowoff = Math.pow(2,round)
for (row=0; row < nrow; row++) {
tx += ''
bottom = (row == nrow-1)
for (col=0; col < 4; col++) {
lo = row * rowoff + col * 16
hi = lo + rowoff -1
//alert("round " + round + " nrow " + nrow + " row " + row + " col " + col + " lo=" + lo + " hi= " + hi)
for (tm= lo; tm <= hi; tm++) { if (players[K].picks[tm] >= round) { tx += cell(tm,round,bottom) } } // for tm
} // for col
tx += ' '
} // for row
// tx += '| | | '
} // for round
// last 2 rounds (Final 4) as special case
round = 5
tx += ''
for (tm= 0; tm < 32; tm++) { if (players[K].picks[tm] >= round) { tx += cell(tm,round) } }
tx += '| | '
for (tm= 32; tm < 64; tm++) { if (players[K].picks[tm] >= round) { tx += cell(tm,round) } }
tx += ' | '
tx += ' '
round = 6
tx += ''
for (tm= 0; tm < 64; tm++) { if (players[K].picks[tm] >= round) { tx += cell(tm,6) } }
tx += '| | '
tx += ' '
tx += ' '
tx += ' | '
tx += ' | '
// experiment /////////////////////////
// figure out who's next in scoring order (slightly klutzy, but it will work)
z = 0
while (order[z] != K) { z++ }
next = order[(z+1) % order.length]
/////////////////////////////////////
// start big cell with image, score, place
tx += ''
// tx += ''
tx += ''
tx += ' '
tx += ''
tx += ' ' + players[K].name
+ ' ' + total[K] + ' points '
+ordinal(players[K].rank)+' place'
tx += ' | '
// end image cell
tx += '
'
tx += '