var sone = 0; var stwo = 0; var sthree = 0; var sfour = 0; var sfive = 0; var ssix = 0; var sseven = 0; var seight = 0; var snine = 0; var sten = 0; var score = 0; var cheat = 0; var nomark = "/images/elt/product_site_graphics/clocktransparent.gif" var cross = "/images/elt/product_site_graphics/clockcross.gif" var tick= "/images/elt/product_site_graphics/clocktick.gif" function checkScore1() { if (document.form1.onet.value == one) { sone = 1; document.images.one.src=tick; } else { document.images.one.src=cross; } } function checkScore2() { if (document.form1.twot.value == two) { stwo = 1; document.images.two.src=tick; } else { document.images.two.src=cross; } } function checkScore3() { if (document.form1.threet.value == three) { sthree = 1; document.images.three.src=tick; } else { document.images.three.src=cross; } } function checkScore4() { if (document.form1.fourt.value == four) { sfour = 1; document.images.four.src=tick; } else { document.images.four.src=cross; } } function checkScore5() { if (document.form1.fivet.value == five) { sfive = 1; document.images.five.src=tick; } else { document.images.five.src=cross; } } function checkScore6() { if (document.form1.sixt.value == six) { ssix = 1; document.images.six.src=tick; } else { document.images.six.src=cross; } } function checkScore7() { if (document.form1.sevent.value == seven) { sfive = 1; document.images.seven.src=tick; } else { document.images.seven.src=cross; } } function checkScore8() { if (document.form1.eightt.value == eight) { ssix = 1; document.images.eight.src=tick; } else { document.images.eight.src=cross; } } function checkScore9() { if (document.form1.ninet.value == eight) { ssix = 1; document.images.nine.src=tick; } else { document.images.nine.src=cross; } }function checkScore10() { if (document.form1.tent.value == eight) { ssix = 1; document.images.ten.src=tick; } else { document.images.ten.src=cross; } } function checkScore11() { if (cheat >=1) { clear(); alert("Click on Reset to have another go!"); } else { checkScore1(); checkScore2(); checkScore3(); checkScore4(); checkScore5(); checkScore6(); checkScore7(); checkScore8(); checkScore9(); checkScore10(); score = sone+stwo+sthree+sfour+sfive+ssix+sseven+seight+snine+sten; alert("Your score is "+score+" / 10"); } } function reveal() { document.form1.onet.value = one; document.form1.twot.value = two; document.form1.threet.value = three; document.form1.fourt.value = four; document.form1.fivet.value = five; document.form1.sixt.value = six; document.form1.sevent.value = seven; document.form1.eightt.value = eight; document.form1.ninet.value = nine; document.form1.tent.value = ten; cheat++; clear(); } function again() { cheat = 0; score = 0; sone = 0; stwo = 0; sthree = 0; sfour = 0; sfive = 0; ssix = 0; sseven = 0; seight = 0; snine = 0; sten = 0; document.images.one.src=nomark; document.images.two.src=nomark; document.images.three.src=nomark; document.images.four.src=nomark; document.images.five.src=nomark; document.images.six.src=nomark; document.images.seven.src=nomark; document.images.eight.src=nomark; document.images.nine.src=nomark; document.images.ten.src=nomark; } function clear() { document.images.one.src=nomark; document.images.two.src=nomark; document.images.three.src=nomark; document.images.four.src=nomark; document.images.five.src=nomark; document.images.six.src=nomark; document.images.seven.src=nomark; document.images.eight.src=nomark; document.images.nine.src=nomark; document.images.ten.src=nomark; }