'; var TableOpener = '
" ; function goback(){ var backskip="history.length" - previouspage; if (backskip> 0){ history.go((BackSkip+1)*-1); } else{ parent.history.back(); } } function ReduceItems(){ var ItemToDump=0; var j=0; while (I.length > QsToShow){ ItemToDump = Math.floor(I.length*Math.random()); for (j=ItemToDump; j<(I.length-1); j++){ I[j] = I[j+1]; } I.length = I.length-1; } } function Shuffle(InArray){ Temp = new Array(); var Len = InArray.length; var j = Len; for (var i=0; i" (.length>
0){ OutString += '
'; OutString += ''; OutString += ; OutString += '
' } OutString += '
'; //Write it to the frame TopFrame.document.clear(); TopFrame.document.open(); TopFrame.document.write(OutString); TopFrame.document.close(); } function StartUp(){ if ((is.mac)&&(is.ns)){ CorrectIndicator = unescape(macrightchar); IncorrectIndicator = unescape(macwrongchar); } else{ CorrectIndicator = unescape(winrightchar); IncorrectIndicator = unescape(winwrongchar); } //Write the top frame Write(Instructions); //Reduce array if required if (QsToShow < I.length){ ReduceItems(); } //Shuffle stuff if required if (ShuffleQs == true){ I = Shuffle(I); } if (ShuffleAs == true){ for (var i=0; i" writetoreading(click on the button to see reading.); writetotimer(stuff); show first question or all of them (showonebyone="=" false){ showallqs(); else{ showquestion(currqnum); i="new" array(); i[0]="new" i[0][0]="When was the article published?" i[0][1]="new" i[0][1][0]="new" i[0][1][0][0]="In the early fifties" i[0][1][0][1]="WRONG: "Thursday, August 12th 1999"" i[0][1][0][2]="0;" i[0][1][1]="new" i[0][1][1][0]="Thirty years ago" i[0][1][1][1]="WRONG: "Thursday, August 12th 1999"" i[0][1][1][2]="0;" i[0][1][2]="new" i[0][1][2][0]="A few years ago" i[0][1][2][1]="CORRECT! "Thursday, August 12th 1999"" i[0][1][2][2]="1;" i[0][2]="0;" i[1]="new" i[1][0]="Where did the scene take place?" i[1][1]="new" i[1][1][0]="new" i[1][1][0][0]="In Ireland." i[1][1][0][1]="CORRECT: "Irish + Dublin = Ireland"" i[1][1][0][2]="1;" i[1][1][1]="new" i[1][1][1][0]="In Japan." i[1][1][1][1]="WRONG: "Irish + Dublin = Ireland"" i[1][1][1][2]="0;" i[1][1][2]="new" i[1][1][2][0]="In ." i[1][1][2][1]="WRONG: "Irish + Dublin = Ireland"" i[1][1][2][2]="0;" i[1][2]="0;" i[2]="new" i[2][0]="What happened?" i[2][1]="new" i[2][1][0]="new" i[2][1][0][0]="An earthquake." i[2][1][0][1]="WRONG: "eclipse-watchers"" i[2][1][0][2]="0;" i[2][1][1]="new" i[2][1][1][0]="An eclipse." i[2][1][1][1]="CORRECT: "eclipse-watchers"" i[2][1][1][2]="1;" i[2][1][2]="new" i[2][1][2][0]="A big fire." i[2][1][2][1]="WRONG: "eclipse-watchers"" i[2][1][2][2]="0;" i[2][2]="0;" i[3]="new" i[3][0]="No-one watched it." i[3][1]="new" i[3][1][0]="new" i[3][1][0][0]="TRUE." i[3][1][0][1]="WRONG: "people flooded out of homes and offices to witness the moon eclipse the sun."" i[3][1][0][2]="0;" i[3][1][1]="new" i[3][1][1][0]="FALSE." i[3][1][1][1]="CORRECT: "people flooded out of homes and offices to witness the moon eclipse the sun."" i[3][1][1][2]="1;" i[3][2]="0;" i[4]="new" i[4][0]="Temperatures..." i[4][1]="new" i[4][1][0]="new" i[4][1][0][0]="... increased." i[4][1][0][1]="WRONG: "Temperatures dropped by up to 2° Celsius in Ireland and the sky noticeably darkened."" i[4][1][0][2]="0;" i[4][1][1]="new" i[4][1][1][0]="... decreased." i[4][1][1][1]="CORRECT: "Temperatures dropped by up to 2° Celsius in Ireland and the sky noticeably darkened."" i[4][1][1][2]="1;" i[4][2]="0;" i[5]="new" i[5][0]="It happened in the evening." i[5][1]="new" i[5][1][0]="new" i[5][1][0][0]="TRUE" i[5][1][0][1]="WRONG! "Shortly after 11 am,..."" i[5][1][0][2]="0;" i[5][1][1]="new" i[5][1][1][0]="FALSE" i[5][1][1][1]="CORRECT: "Shortly after 11 am,"" i[5][1][1][2]="1;" i[5][2]="0;" i[6]="new" i[6][0]="What was the biggest problem?" i[6][1]="new" i[6][1][0]="new" i[6][1][0][0]="Problems with eyes." i[6][1][0][1]="CORRECT! "damage may have been caused to their eyes."" i[6][1][0][2]="1;" i[6][1][1]="new" i[6][1][1][0]="Problems with legs." i[6][1][1][1]="WRONG! "damage may have been caused to their eyes."" i[6][1][1][2]="0;" i[6][1][2]="new" i[6][1][2][0]="Problems with hearts." i[6][1][2][1]="WRONG! "damage may have been caused to their eyes."" i[6][1][2][2]="0;" i[6][2]="0;" i[7]="new" i[7][0]="A lot of injuries were found." i[7][1]="new" i[7][1][0]="new" i[7][1][0][0]="TRUE." i[7][1][0][1]="WRONG! "However, no major injuries have been identified"" i[7][1][0][2]="0;" i[7][1][1]="new" i[7][1][1][0]="FALSE." i[7][1][1][1]="CORRECT! "However, no major injuries have been identified"" i[7][1][1][2]="1;" i[7][2]="0;" i[8]="new" i[8][0]="A total eclipse occurs" i[8][1]="new" i[8][1][0]="new" i[8][1][0][0]="every five months." i[8][1][0][1]="WRONG! "A total eclipse occurs somewhere in the world about every 18 months."" i[8][1][0][2]="0;" i[8][1][1]="new" i[8][1][1][0]="every eighteen months." i[8][1][1][1]="CORRECT! "A total eclipse occurs somewhere in the world about every 18 months."" i[8][1][1][2]="1;" i[8][1][2]="new" i[8][1][2][0]="every thirty months." i[8][1][2][1]="WRONG! "A total eclipse occurs somewhere in the world about every 18 months."" i[8][1][2][2]="0;" i[8][2]="0;" i[9]="new" i[9][0]="When will the next eclipse occur in Dublin?" i[9][1]="new" i[9][1][0]="new" i[9][1][0][0]="in 2020." i[9][1][0][1]="WRONG! "over Dublin in 2600."" i[9][1][0][2]="0;" i[9][1][1]="new" i[9][1][1][0]="in 2600." i[9][1][1][1]="CORRECT: "over Dublin in 2600."" i[9][1][1][2]="1;" i[9][1][2]="new" i[9][1][2][0]="in 3201." i[9][1][2][1]="WRONG! "over Dublin in 2600."" i[9][1][2][2]="0;" i[9][2]="0;" status="new" function createstatusarrays(){ for (var x="0;" x
-1){ FirstBit = InString.substring(0, i); LastBit = InString.substring(i + Token.length, InString.length); InString = FirstBit + Replacement + LastBit; i = InString.indexOf(Token); } return InString; } function ChangeQ(ChangeBy){ var NewNum = CurrQNum + ChangeBy; if ((NewNum >= 0)&&(NewNum
'; } Output = Output + BuildQuestion(I.length-1); Output = TableOpener + Output + TableCloser; DisplayExercise(Output); } function ShowQuestion(QNum){ //First, create the Q number readout at the top var Readout = (QNum+1) + '/' + I.length; while (Readout.length < 7){ Readout = ' ' + Readout + ' '; } Readout = QButtonsOpener + Readout + QButtonsCloser; var Output = BuildQuestion(QNum); Output = TableOpener + Output + TableCloser; DisplayExercise(Readout + Output); //Mark the answers already done for (i=0; i
=0; i--){ //Find any incorrect choices var b = eval('BottomFrame.document.QForm.A_' + QNum + '_' + i); if (b != null){ //if it's wrong, count it if (b.checked == true){ Status[QNum][1][i] = 'C'; } else{ Status[QNum][1][i] = 'U'; } if (((b.checked == true) && (b.value == "0"))||((b.checked == false)&&(b.value == "1"))){ TotWrong++; } } } if (TotWrong == 0){ Output = DefaultRight; } else{ Output = DefaultWrong + '
' + (TotAns-TotWrong) + '/' + TotAns; } //If you haven't tried the question before if (Status[QNum][0] == 0){ Status[QNum][2]++; Tries++; if (TotWrong == 0){ Status[QNum][0] = 1; CorrectChoices++; } } //Check whether the quiz is finished var Finished = true; for (var i=0; i
' + YourScoreIs + ' ' + Score + '%.'; } if (Finished == true){ var CFT = 0; for (i=0; i
" correctfirsttime cft i.length; show the (output.length>
0){ Write(Output); } } function CheckAnswer(QNum, ANum){ var Output = I[QNum][1][ANum][1]; if (Output==''){ if (I[QNum][1][ANum][2] == 1){ Output = DefaultRight; } else{ Output = DefaultWrong; } } //If it's not been previously answered correctly if (Status[QNum][0] == 0){ Status[QNum][2]++; //increment tries for this Q //If it's a correct answer if (I[QNum][1][ANum][2] == 1){ Status[QNum][0] = 1;//Mark the Q as done Status[QNum][1][ANum] = 'R'; MarkAnswer(QNum, ANum, true); CorrectChoices++; } else{ Status[QNum][1][ANum] = 'W'; MarkAnswer(QNum, ANum, false); } Tries++; } //Check whether the quiz is finished var Finished = true; for (var i=0; i
' + YourScoreIs + ' ' + Score + '%.'; } if (Finished == true){ var CFT = 0; for (i=0; i
" correctfirsttime cft i.length; show the (output.length>
0){ Write(Output); } } function MarkAnswer(QNum, ANum, Right){ var Mark = CorrectIndicator; if (Right == false){Mark = IncorrectIndicator;} if (eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum) != null){ eval('BottomFrame.document.QForm.FB_' + QNum + '_' + ANum).value = Mark; } } function CheckCheckbox(QNum, ANum){ if (eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum) != null){ eval('BottomFrame.document.QForm.A_' + QNum + '_' + ANum).checked = true; } } function ShowReading(){ if (ReadingFrame != null){ if (ReadingURL.length > 0){ ReadingFrame.location.href=ReadingURL; } else{ ReadingFrame.document.clear(); ReadingFrame.document.open(); ReadingFrame.document.write(ReadingText); ReadingFrame.document.close(); } } } //Reading text/timer code var min var sec var ShowReadingAgain = 'Show reading again'; function DownTime(mm,ss){ min = mm; sec = ss; if (sec==0) { sec = 60; min--; } sec--; if (sec<10){ sec="0" + sec; } if (TimerFrame.document.TimerForm.face == null){ return; } TimerFrame.document.TimerForm.face.value= min+":"+sec; if ((min==0) && (sec==0)){ TimesUp() } else{ setTimeout('DownTime(min,sec)',1000) } } function StartReading(){ Stuff='Remaining time:'; Stuff+='
'; WriteToTimer(Stuff); ShowReading(); timeoutID=setTimeout('DownTime(15,0)',1000); } function TimesUp() { if (ShowReadingAgain.length > 0) { Stuff='
'; Stuff+='
'; WriteToTimer(Stuff); } WriteToReading('Your time is over!'); } function WriteToReading(Stuff) { if (is.CRAPBrowser){Stuff=ResolveAllURLs(Stuff);} ReadingFrame.document.clear(); ReadingFrame.document.open(); ReadingFrame.document.writeln (''); ReadingFrame.document.writeln (''); ReadingFrame.document.writeln ('