Make your own free website on Tripod.com
'; 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(){ //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[6][1][0][1]=''; I[6][1][0][2] = 0; I[6][1][1] = new Array(); I[6][1][1][0]='L\'Europe'; I[6][1][1][1]=''; I[6][1][1][2] = 0; I[6][1][2] = new Array(); I[6][1][2][0]='La Chine'; I[6][1][2][1]=''; I[6][1][2][2] = 0; I[6][1][3] = new Array(); I[6][1][3][0]='L\'Afrique'; I[6][1][3][1]='Bravo champion(ne) ! '; I[6][1][3][2] = 1; I[6][2] = 0; I[7] = new Array(); I[7][0]='Quelle est la capitale de l\'Égypte ?'; I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='Rome'; I[7][1][0][1]=''; I[7][1][0][2] = 0; I[7][1][1] = new Array(); I[7][1][1][0]='Ankara'; I[7][1][1][1]=''; I[7][1][1][2] = 0; I[7][1][2] = new Array(); I[7][1][2][0]='Le Caire'; I[7][1][2][1]='Continue ton beau travail !'; I[7][1][2][2] = 1; I[7][1][3] = new Array(); I[7][1][3][0]='Sao Paulo'; I[7][1][3][1]=''; I[7][1][3][2] = 0; I[7][2] = 0; I[8] = new Array(); I[8][0]='Quel est le sport national du Brésil ?'; I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='Le hockey'; I[8][1][0][1]=''; I[8][1][0][2] = 0; I[8][1][1] = new Array(); I[8][1][1][0]='La rueda'; I[8][1][1][1]=''; I[8][1][1][2] = 0; I[8][1][2] = new Array(); I[8][1][2][0]='La crosse'; I[8][1][2][1]=''; I[8][1][2][2] = 0; I[8][1][3] = new Array(); I[8][1][3][0]='Le soccer'; I[8][1][3][1]='Un but pour toi ! '; I[8][1][3][2] = 1; I[8][2] = 0; I[9] = new Array(); I[9][0]='Quel est le nom de l\'immense fleuve qui se trouve au Brésil ?'; I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='Le Saint-Laurent'; I[9][1][0][1]=''; I[9][1][0][2] = 0; I[9][1][1] = new Array(); I[9][1][1][0]='Le Nil'; I[9][1][1][1]=''; I[9][1][1][2] = 0; I[9][1][2] = new Array(); I[9][1][2][0]='L\'Amazone'; I[9][1][2][1]='Tu es génial !'; I[9][1][2][2] = 1; I[9][1][3] = new Array(); I[9][1][3][0]='Le Danube'; I[9][1][3][1]=''; I[9][1][3][2] = 0; I[9][2] = 0; I[10] = new Array(); I[10][0]='Quel pays ressemble à une immense Île ?'; I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='La Turquie'; I[10][1][0][1]=''; I[10][1][0][2] = 0; I[10][1][1] = new Array(); I[10][1][1][0]='L\'Australie'; I[10][1][1][1]='Tu m\'épates !'; I[10][1][1][2] = 1; I[10][1][2] = new Array(); I[10][1][2][0]='L\'Italie'; I[10][1][2][1]=''; I[10][1][2][2] = 0; I[10][1][3] = new Array(); I[10][1][3][0]='Le Brésil'; I[10][1][3][1]=''; I[10][1][3][2] = 0; I[10][2] = 0; I[11] = new Array(); I[11][0]='On appelle les habitants de l\'Australie, les Australois.'; I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='vrai'; I[11][1][0][1]=''; I[11][1][0][2] = 0; I[11][1][1] = new Array(); I[11][1][1][0]='faux'; I[11][1][1][1]='Extra ! Ce sont les Australiens.'; I[11][1][1][2] = 1; I[11][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){ if (TotWrong > 0){ Status[QNum][2]++; } if (TotWrong == 0){ Status[QNum][0] = 1; //Calculate the score for this question as a floating-point fraction of 1 Status[QNum][3] = ((Status[QNum][1].length - Status[QNum][2]) - 1) / (Status[QNum][1].length - 1); //If less than zero, set to zero if (Status[QNum][3] < 0){Status[QNum][3] = 0;} } } //Check whether the quiz is finished var Finished = true; for (var i=0; i' + YourScoreIs + ' ' + Score + '%.'; } if (Finished == true){ EraseFeedback = false; 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){ //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); //Calculate the score for this question as a floating-point fraction of 1 var PossibleWrongs = 0; for (var i=0; i' + YourScoreIs + ' ' + Score + '%.'; } if (Finished == true){ EraseFeedback = false; 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...'; } //--> //]]>