function initBoard() {
var iNumSquares = 25; var iNumImages = 50; var aImages = new Array(iNumImages); var aText = new Array(iNumImages); var aSortOrder = [];
aImages[0] = '0.gif'; aText[0] = 'Text 0'; aImages[1] = '1.gif'; aText[1] = 'Text 1'; aImages[2] = '2.gif'; aText[2] = 'Text 2'; aImages[3] = '3.gif'; aText[3] = 'Text 3'; aImages[4] = '4.gif'; aText[4] = 'Text 4'; aImages[5] = '5.gif'; aText[5] = 'Text 5'; aImages[6] = '6.gif'; aText[6] = 'Text 6'; aImages[7] = '7.gif'; aText[7] = 'Text 7'; aImages[8] = '8.gif'; aText[8] = 'Text 8'; aImages[9] = '9.gif'; aText[9] = 'Text 9'; aImages[10] = '0.gif'; aText[10] = 'Text 10'; aImages[11] = '1.gif'; aText[11] = 'Text 11'; aImages[12] = '2.gif'; aText[12] = 'Text 12'; aImages[13] = '3.gif'; aText[13] = 'Text 13'; aImages[14] = '4.gif'; aText[14] = 'Text 14'; aImages[15] = '5.gif'; aText[15] = 'Text 15'; aImages[16] = '6.gif'; aText[16] = 'Text 16'; aImages[17] = '7.gif'; aText[17] = 'Text 17'; aImages[18] = '8.gif'; aText[18] = 'Text 18'; aImages[19] = '9.gif'; aText[19] = 'Text 19'; aImages[20] = '0.gif'; aText[20] = 'Text 20'; aImages[21] = '1.gif'; aText[21] = 'Text 21'; aImages[22] = '2.gif'; aText[22] = 'Text 22'; aImages[23] = '3.gif'; aText[23] = 'Text 23'; aImages[24] = '4.gif'; aText[24] = 'Text 24'; aImages[25] = '5.gif'; aText[25] = 'Text 25'; aImages[26] = '6.gif'; aText[26] = 'Text 26'; aImages[27] = '7.gif'; aText[27] = 'Text 27'; aImages[28] = '8.gif'; aText[28] = 'Text 28'; aImages[29] = '9.gif'; aText[29] = 'Text 29'; aImages[30] = '0.gif'; aText[30] = 'Text 30'; aImages[31] = '1.gif'; aText[31] = 'Text 31'; aImages[32] = '2.gif'; aText[32] = 'Text 32'; aImages[33] = '3.gif'; aText[33] = 'Text 33'; aImages[34] = '4.gif'; aText[34] = 'Text 34'; aImages[35] = '5.gif'; aText[35] = 'Text 35'; aImages[36] = '6.gif'; aText[36] = 'Text 36'; aImages[37] = '7.gif'; aText[37] = 'Text 37'; aImages[38] = '8.gif'; aText[38] = 'Text 38'; aImages[39] = '9.gif'; aText[39] = 'Text 39'; aImages[40] = '0.gif'; aText[40] = 'Text 40'; aImages[41] = '1.gif'; aText[41] = 'Text 41'; aImages[42] = '2.gif'; aText[42] = 'Text 42'; aImages[43] = '3.gif'; aText[43] = 'Text 43'; aImages[44] = '4.gif'; aText[44] = 'Text 44'; aImages[45] = '5.gif'; aText[45] = 'Text 45'; aImages[46] = '6.gif'; aText[46] = 'Text 46'; aImages[47] = '7.gif'; aText[47] = 'Text 47'; aImages[48] = '8.gif'; aText[48] = 'Text 48'; aImages[49] = '9.gif'; aText[49] = 'Text 49';
for(var i=0; i < iNumImages; i++) { aSortOrder.push(i); } aSortOrder.sort( randOrd ); var img=""; for(var i=0; i < iNumSquares; i++) { img = "img_" + i; document.getElementById(img).src = aImages[aSortOrder[i]]; lbl = "lbl_" + i; document.getElementById(lbl).innerHTML = aText[aSortOrder[i]]; } } function randOrd() { return (Math.round(Math.random())-0.5); }