'; OutString += '
'; OutString += NavBar; if (Feedback.length>0){ OutString += '' } OutString += '
'; OutString += ''; OutString += Feedback; 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 WriteFeedback(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'; I[0][1] = new Array(); I[0][1][0] = new Array(); I[0][1][0][0]='farming'; I[0][1][0][1]=''; I[0][1][0][2] = 1; I[0][1][1] = new Array(); I[0][1][1][0]='hunting'; I[0][1][1][1]=''; I[0][1][1][2] = 0; I[0][1][2] = new Array(); I[0][1][2][0]='fishing'; I[0][1][2][1]=''; I[0][1][2][2] = 0; I[0][1][3] = new Array(); I[0][1][3][0]='park ranger'; I[0][1][3][1]=''; I[0][1][3][2] = 0; I[0][2] = 0; I[1] = new Array(); I[1][0]='What joke did Grandfather play on little Willy?
'; I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='He put glue on Willy\'s chair.'; I[1][1][0][1]=''; I[1][1][0][2] = 0; I[1][1][1] = new Array(); I[1][1][1][0]='He put honey in the shampoo bottle.'; I[1][1][1][1]=''; I[1][1][1][2] = 0; I[1][1][2] = new Array(); I[1][1][2][0]='He pretended to be a scarecrow.'; I[1][1][2][1]=''; I[1][1][2][2] = 1; I[1][1][3] = new Array(); I[1][1][3][0]='He changed the clock in the house while Willy was asleep.'; I[1][1][3][1]=''; I[1][1][3][2] = 0; I[1][2] = 0; I[2] = new Array(); I[2][0]='Tell what happened to little Willy\'s breakfast one morning when he didn\'t get up.
'; I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='The biscuits got too hard to eat.'; I[2][1][0][1]=''; I[2][1][0][2] = 0; I[2][1][1] = new Array(); I[2][1][1][0]='Grandfather threw it in the trash.'; I[2][1][1][1]=''; I[2][1][1][2] = 0; I[2][1][2] = new Array(); I[2][1][2][0]='Grandfather gave it to the chickens.'; I[2][1][2][1]=''; I[2][1][2][2] = 1; I[2][1][3] = new Array(); I[2][1][3][0]='The eggs got too cold to eat.'; I[2][1][3][1]=''; I[2][1][3][2] = 0; I[2][2] = 0; I[3] = new Array(); I[3][0]='Who was Searchlight?
'; I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='Willy\'s dog'; I[3][1][0][1]=''; I[3][1][0][2] = 1; I[3][1][1] = new Array(); I[3][1][1][0]='the pig'; I[3][1][1][1]=''; I[3][1][1][2] = 0; I[3][1][2] = new Array(); I[3][1][2][0]='Grandfather\'s cow'; I[3][1][2][1]=''; I[3][1][2][2] = 0; I[3][1][3] = new Array(); I[3][1][3][0]='the neighbor\'s cat'; I[3][1][3][1]=''; I[3][1][3][2] = 0; I[3][2] = 0; I[4] = new Array(); I[4][0]='Why did Doc Smith not pay any attention to little Willy at first when little Willy said, "Grandfathe'; I[4][0]+='r won\'t answer me."?
'; I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='Doc Smith was too busy playing with her dog.'; I[4][1][0][1]=''; I[4][1][0][2] = 0; I[4][1][1] = new Array(); I[4][1][1][0]='Doc Smith didn\'t hear Willy'; I[4][1][1][1]=''; I[4][1][1][2] = 0; I[4][1][2] = new Array(); I[4][1][2][0]='Doc Smilth was too busy working with another patient.'; I[4][1][2][1]=''; I[4][1][2][2] = 0; I[4][1][3] = new Array(); I[4][1][3][0]='Because Grandfather was always playing tricks.'; I[4][1][3][1]=''; I[4][1][3][2] = 1; I[4][2] = 0; I[5] = new Array(); I[5][0]='What changed Doc Smith\'s mind? Why does Doc Smith finally believe that something is wrong with Grand'; I[5][0]+='father?
'; I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='because Willy said Grandfather wasn\'t breathing correctly'; I[5][1][0][1]=''; I[5][1][0][2] = 0; I[5][1][1] = new Array(); I[5][1][1][0]='because Willy told Doc Smith that Grandfather had hit his head'; I[5][1][1][1]=''; I[5][1][1][2] = 0; I[5][1][2] = new Array(); I[5][1][2][0]='because Willy had a bad feeling about Grandfather'; I[5][1][2][1]=''; I[5][1][2][2] = 0; I[5][1][3] = new Array(); I[5][1][3][0]='because Grandfather had not played music like he usually did'; I[5][1][3][1]=''; I[5][1][3][2] = 1; I[5][2] = 0; I[6] = new Array(); I[6][0]='What was wrong with Grandfather?
'; I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='Grandfather had the flu.'; I[6][1][0][1]=''; I[6][1][0][2] = 0; I[6][1][1] = new Array(); I[6][1][1][0]='Grandfather had the measles.'; I[6][1][1][1]=''; I[6][1][1][2] = 0; I[6][1][2] = new Array(); I[6][1][2][0]='Grandfather lost the will to live.'; I[6][1][2][1]=''; I[6][1][2][2] = 1; I[6][1][3] = new Array(); I[6][1][3][0]='Grandfather had heart failure.'; I[6][1][3][1]=''; I[6][1][3][2] = 0; I[6][2] = 0; Status = new Array(); 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'; if (is.CRAPBrowser){OutString=ResolveAllURLs(OutString);} //Write it to the frame BottomFrame.document.clear(); BottomFrame.document.open(); BottomFrame.document.write(OutString); BottomFrame.document.close(); } function ShowAllQs(){ var Output = ''; for (var i=0; i
'; } 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 0){ WriteFeedback(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 0){ WriteFeedback(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 Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]> -->