
corr = new Array();
gnum = 0;
score = 0;
ind = 0;
for (rows = 0; rows < 3; rows++) {
for (cols = 0; cols < 5; cols++) {
ind++;
corr[ind] = 0;
eval("GetDiv('d"+ind+"',"+rows*100+","+cols*100+",100,100,'',1,0)");
document.write("<img src=images/Pic",ind,".jpg width=100 height=100 border=0>");
EndDiv();
eval("GetDiv('dvTop"+ind+"',"+rows*100+","+cols*100+",100,100,'',0,1)");
document.write("<a href='javascript:TestMe(",ind,")'><img name = Pic",ind," src=images/unknown.gif width=100 height=100 border=1></a>");
EndDiv();
   }
}
GetDiv('Control1',300,0,400,100,'silver',1,0);
document.write("<center><br>Study the picture above carefully then <a href='javascript:StartTest()'>start the test</a>.</center>");
EndDiv();
GetDiv('Control2',300,0,400,100,'silver',0,1);
document.write("<center><br>Where did you see this image? --> <br><br><font size=-2>You can see your score by taking your cursor off<br>the images above and looking in the browse status bar</font></center>");
EndDiv();
GetDiv('TestPix',300,400,100,100,'',1,1);
document.write("<img src=images/unknown.gif name=Tester width=100 height=100");
EndDiv();
function StartTest() {
if (M) { eval("document.all.Control2.style.visibility = 'visible'"); }
if (N) { eval("document.layers.Control2.visibility = 'show'"); }
for (x = 1; x < 16; x++) {
if (corr[x] == 0) {
if (M) { eval("document.all.dvTop"+x+".style.visibility = 'visible'"); }
if (N) { eval("document.layers.dvTop"+x+".visibility = 'show'"); }
   }
}
PickRandom();
document.Tester.src = "images/Pic"+picked+".jpg";
}
function PickRandom() {
chk = 0
while (chk == 0) {
picked = 1+Math.floor(15*Math.random())
if (corr[picked] == 0) { chk = 1; break; }
   }
}
function TestMe(x) {
gnum++;
if (x == picked) { score++; corr[x] = 1; }
if (M) { eval("document.all.dvTop"+x+".style.visibility = 'hidden'"); }
if (N) { eval("document.layers.dvTop"+x+".visibility = 'hide'"); }
if (gnum > 14) {
alert("It's over! Score = "+score);
for (x = 1; x < 16; x++) { corr[x] = 0; }
if (score == 15) alert("And you win!");
gnum = 0;
score = 0;
window.close();
}
setTimeout('StartTest()', 1000);
}
