'; NavBar+=''; NavBar+=''; var TitleCode = ''; macrightchar = ':-)' macwrongchar = 'X' winrightchar = ':-)' winwrongchar = 'X' var QButtonsOpener = '
'; TitleCode += '' + ExerciseTitle + '
'; TitleCode += '' + ExerciseSubtitle + '
'; TitleCode += '
'; QButtonsOpener += '
'; QButtonsOpener += ''; var QButtonsCloser = ''; QButtonsCloser += '
'; var TableOpener = '
'; TableOpener += ''; var QRow = ''; QRow += ''; var ARow = ''; ARow += ''; ARow += ''; var MARow = ''; var CheckButton = '' } OutString += '
'; QRow += '[QNumber][Question]
 '; QRow += '
[Ans]
'; MARow += '[Ans]
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; i0){ 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); //Write the reading frame ShowReading(); //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[3][1][2][2] = 1; I[3][1][3] = new Array(); I[3][1][3][0]='Pourquoi'; I[3][1][3][1]='Non. Essayez encore.(The question asks for a place, not for a person, thing, or reason.)'; I[3][1][3][2] = 0; I[3][2] = 0; I[4] = new Array(); I[4][0]='______ est-ce que Mickey déteste les chats? Mickey déteste les chats parce qu\'il y a un antagonisme'; I[4][0]+=' naturel entre les chats et les souris (mice).'; I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='Qui'; I[4][1][0][1]='Non. Essayez encore. (The question asks for a reason, not who, what, or where.)'; I[4][1][0][2] = 0; I[4][1][1] = new Array(); I[4][1][1][0]='Que/Qu\''; I[4][1][1][1]='Non. Essayez encore. (The question asks for a reason, not who, what, or where.)'; I[4][1][1][2] = 0; I[4][1][2] = new Array(); I[4][1][2][0]='Où'; I[4][1][2][1]='Non. Essayez encore.(The question asks for a reason, not who, what, or where.)'; I[4][1][2][2] = 0; I[4][1][3] = new Array(); I[4][1][3][0]='Pourquoi'; I[4][1][3][1]='Oui, c\'est très bien! Bravo!'; I[4][1][3][2] = 1; I[4][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
'; } 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 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(); } } } function Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]>