var total_trays = 97
var awards = new Array()
//awards[n] = award#,"level(R/N/J)","description","name",ribbon(1-4),image#;
awards[0]=[1,"N","Rosette Shanks","Susan Schaefer",4,3]
awards[1]=[1,"R","Rosette Shanks","Phillip Austin",4,4]
awards[2]=[2,"N","BG Swirlbacks","Deborah Layman",4,37]
awards[3]=[2,"R","BG Swirlbacks","Joyce McGrath",1,30]
awards[4]=[3,"R","Horn Pictorials","Ruth Meyers",1,25]
awards[5]=[3,"R","Horn Pictorials","Mary Weinberg",2,24]
awards[6]=[4,"R","Hard White Pewter","Phillip Austin",4,47]
awards[7]=[5,"R","Steel Assorted","Jeanette Howard",1,16]
awards[8]=[6,"N","Vegetable Ivory","Deborah Layman",4,29]
awards[9]=[6,"R","Vegetable Ivory","Ruth Smith",1,33]
awards[10]=[7,"N","Children &<br>Childrens's Stories","Mary Ina Jones",4,15]
awards[11]=[8,"N","Paris Backs","Deborah Layman",4,2]
awards[12]=[8,"R","Paris Backs","Sallie Gibson",4,1]
awards[13]=[9,"R","Gay Nineties","Sallie Gibson",1,49]
awards[14]=[9,"R","Gay Nineties","Charlene Baker",2,48]
awards[15]=[9,"R","Gay Nineties","Phillip Austin",3,52]
awards[16]=[10,"R","Vaseline Glass","Mary Hanson",4,38]
awards[17]=[11,"N","Caramel Glass","Helen Richwine",4,14]
awards[18]=[12,"N","Transparent<br>Green Glass","Helen Richwine",4,13]
awards[19]=[13,"R","Pearlized Glass","Ruth Smith",4,43]
awards[20]=[14,"N","Applejuice","Jane Delaney",1,42]
awards[21]=[14,"N","Applejuice","Emily Catalano",2,41]
awards[22]=[14,"N","Applejuice","Susan Schaefer",3,39]
awards[23]=[14,"R","Applejuice","Sallie Gibson",1,56]
awards[24]=[14,"R","Applejuice","Phillip Austin",2,53]
awards[25]=[14,"R","Applejuice","Joyce McGrath",3,54]
awards[26]=[15,"R","Embelishment<br>on Polymer","Phillip Austin",1,111]
awards[27]=[15,"R","Embelishment<br>on Polymer","Charlene Baker",2,110]
awards[28]=[15,"R","Embelishment<br>on Polymer","Sallie Gibson",3,108]
awards[29]=[16,"N","Realistics","Sheila Akers",1,94]
awards[30]=[16,"N","Realistics","George Fausey",2,93]
awards[31]=[16,"N","Realistics","Susan Schaefer",3,96]
awards[32]=[18,"N","Celluloid Assorted","Donna Wood",1,104]
awards[33]=[18,"N","Celluloid Assorted","George Fausey",2,105]
awards[34]=[18,"R","Celluloid Assorted","Marilyn Regrut",1,101]
awards[35]=[18,"R","Celluloid Assorted","Mary Weinberg",2,100]
awards[36]=[19,"N","Extruded Celluloid","Betty Riley",1,71]
awards[37]=[19,"R","Extruded Celluloid","Martha Mock",1,72]
awards[38]=[20,"R","Enamels Assorted","Sallie Gibson",4,68]
awards[39]=[21,"R","Metal & Fabric<br>Background","Ruth Smith",4,63]
awards[40]=[22,"N","BG Imitation Fabric","Deborah Layman",4,66]
awards[41]=[22,"R","BG Imitation Fabric","Martha Mock",1,67]
awards[42]=[22,"R","BG Imitation Fabric","Sallie Gibson",2,65]
awards[43]=[22,"R","BG Imitation Fabric","Jeanette Howard",3,64]
awards[44]=[23,"N","Metal with Glass","Susan Schaefer",4,107]
awards[45]=[23,"R","Metal with Glass","Marilyn Regrut",4,106]
awards[46]=[24,"R","Shell with OME","Donna Robbins",1,75]
awards[47]=[24,"R","Shell with OME","Frances Howell",2,74]
awards[48]=[25,"N","Vegetable Ivory","Patricia Hargrave",1,88]
awards[49]=[25,"N","Vegetable Ivory","Gwen Biddle",2,87]
awards[50]=[25,"N","Vegetable Ivory","Barbara James",3,79]
awards[51]=[25,"R","Vegetable Ivory","Mary Weinberg",1,85]
awards[52]=[25,"R","Vegetable Ivory","Martha Mock",2,86]
awards[53]=[25,"R","Vegetable Ivory","Jeanette Howard",3,84]
awards[54]=[26,"N","Rubber","Jean Champoux",4,97]
awards[55]=[26,"R","Rubber","Mary Weinberg",4,95]
awards[56]=[27,"R","Leather","Phillip Austin",4,73]
awards[57]=[29,"N","Birds","Mary Ina Jones",1,81]
awards[58]=[29,"N","Birds","George Fausey",2,83]
awards[59]=[29,"N","Birds","Donna Wood",3,82]
awards[60]=[29,"R","Birds","Betty Jewell",1,89]
awards[61]=[29,"R","Birds","Jeanette Howard",2,92]
awards[62]=[29,"R","Birds","Ginny Cox",3,91]
awards[63]=[30,"N","Domestic Cats","Emily Catalano",4,17]
awards[64]=[30,"R","Domestic Cats","Christy Mecey",1,77]
awards[65]=[30,"R","Domestic Cats","Betty Jewell",2,76]
awards[66]=[30,"R","Domestic Cats","Ginny Cox",3,78]
awards[67]=[31,"N","Squirrels & Acorns","Sheila Akers",1,31]
awards[68]=[31,"N","Squirrels & Acorns","George Fausey",2,32]
awards[69]=[31,"R","Squirrels & Acorns","Betty Jewell",1,34]
awards[70]=[31,"R","Squirrels & Acorns","Mary Weinberg",2,35]
awards[71]=[31,"R","Squirrels & Acorns","Ruth Schaller",3,36]
awards[72]=[32,"R","Lions","Donna Robbins",4,59]
awards[73]=[33,"R","Coins/Coin Type","Phillip Austin",4,57]
awards[74]=[34,"R","Umbrellas","Ruth Smith",4,102]
awards[75]=[35,"N","Roses Only","Donna Wood",4,115]
awards[76]=[35,"R","Roses Only","Frances Howell",1,112]
awards[77]=[35,"R","Roses Only","Martha Mock",2,114]
awards[78]=[35,"R","Roses Only","Betty Jewell",3,113]
awards[79]=[36,"R","Bridges","Marjorie Smith",4,69]
awards[80]=[37,"N","Women","Patricia Hargrave",4,98]
awards[81]=[37,"R","Women","Joyce McGrath",4,99]
awards[82]=[38,"N","Squares","Patricia Hargrave",1,18]
awards[83]=[38,"N","Squares","Sheila Akers",2,19]
awards[84]=[38,"N","Squares","George Fausey",3,20]
awards[85]=[38,"R","Squares","Sallie Gibson",1,21]
awards[86]=[38,"R","Squares","Jeanette Howard",2,22]
awards[87]=[38,"R","Squares","Ruth Schaller",3,23]
awards[88]=[39,"R","Rivet Shanks","Ginny Cox",4,26]
awards[89]=[40,"R","Wobble Shanks RR","Ronald Thomas",4,103]
awards[90]=[41,"N","Military","Helen Richwine",4,80]
awards[91]=["44A","N","Buckles/Clasps","George Fausey",4,7]
awards[92]=["44A","R","Buckles/Clasps","Jerry McGrath",4,5]
awards[93]=["44B","N","Buckles/Clasps","Mary Ina Jones",1,10]
awards[94]=["44B","N","Buckles/Clasps","Emily Catalano",2,11]
awards[95]=["44B","N","Buckles/Clasps","Margaret Talbert",3,9]
awards[96]=["44B","R","Buckles/Clasps","Charlene Baker",4,6]

part1 = '<td valign="top" align="center"><a href="Trays/Tray';
part2 = '.jpg" target="_blank"  onmouseover="fixedtooltip(';
part3 = ", this, event, '150px'" + ')" onmouseout="delayhidetip()"><img src="Trays/Thumbnail';
part4 = '.jpg"></a><br>';
part5 = '<br>&nbsp;</td>';

var last_row = Math.floor(total_trays/6) * 6;
var last_row_trays = total_trays - last_row;
var i=0
for (x=0;x<total_trays;x++){
division = "IV";
if (awards[x][0] < 10) division = "I";
else if (awards[x][0] < 18) division = "III";
else if (awards[x][0] < 41) division = "IX";
else if (awards[x][0] == 41) division = "II";
if (awards[x][4] == 1) ribbon = "First Place";
if (awards[x][4] == 2) ribbon = "Second Place";
if (awards[x][4] == 3) ribbon = "Third Place"
if (awards[x][4] == 4) ribbon = "Merit Award";
if(x < last_row) document.writeln (part1 + awards[x][5] + part2 + "'Div. " + division + " - " + awards[x][0] + "-" + awards[x][1] + "<br>" + ribbon + "<br>" + awards[x][3] + "'" + part3 + awards[x][5] + part4 + awards[x][2] + part5)
i = i + 1
if (i == 6){
document.write("</tr><tr>")
i = 0
}
if(x > last_row-1 && last_row_trays > 0) {
switch(last_row_trays){
    case 1: 
            document.writeln('<td colspan=6 valign="top" align="center"><a href="Trays/Tray' + awards[x][5] + part2 + "'Div. " + division + " - " + awards[x][0] + "-" + awards[x][1] + "<br>" + ribbon + "<br>" + awards[x][3] + "'" + part3 + awards[x][5] + part4 + awards[x][2] + part5)
            break;
    case 2: 
            document.writeln('<td colspan=3 valign="top" align="center"><a href="Trays/Tray' + awards[x][5] + part2 + "'Div. " + division + " - " + awards[x][0] + "-" + awards[x][1] + "<br>" + ribbon + "<br>" + awards[x][3] + "'" + part3 + awards[x][5] + part4 + awards[x][2] + part5)
            break;

    case 3: 
            document.writeln('<td colspan=2 valign="top" align="center"><a href="Trays/Tray' + awards[x][5] + part2 + "'Div. " + division + " - " + awards[x][0] + "-" + awards[x][1] + "<br>" + ribbon + "<br>" + awards[x][3] + "'" + part3 + awards[x][5] + part4 + awards[x][2] + part5)
            break;
    case 4:
            if(x == last_row) document.writeln('<td>&nbsp;</td>');
            document.writeln('<td valign="top" align="center"><a href="Trays/Tray' + awards[x][5] + part2 + "'Div. " + division + " - " + awards[x][0] + "-" + awards[x][1] + "<br>" + ribbon + "<br>" + awards[x][3] + "'" + part3 + awards[x][5] + part4 + awards[x][2] + part5);
            break;
    case 5:
            document.writeln('<td valign="top" align="center"><a href="Trays/Tray' + awards[x][5] + part2 + "'Div. " + division + " - " + awards[x][0] + "-" + awards[x][1] + "<br>" + ribbon + "<br>" + awards[x][3] + "'" + part3 + awards[x][5] + part4 + awards[x][2] + part5);
    }
  }   
}
