'; OutString += '
'; OutString += NavBar; if (Feedback.length>0){ OutString += '' } OutString += '
'; OutString += ''; OutString += Feedback; OutString += '
'; if (is.CRAPBrowser){OutString=ResolveAllURLs(OutString);} //Write it to the frame TopFrame.document.clear(); TopFrame.document.open(); TopFrame.document.write(OutString); TopFrame.document.close(); } function DisplayExercise(){ //Build the output string var OutString = ''; OutString += ''; OutString += ' '; OutString += '
'; OutString += TitleCode; OutString += ''; OutString += NavBar; OutString += '
'; if (WordBox.length > 0){ OutString += WordBox; } OutString += ''; OutString += BuiltCloze; OutString += '
'; 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 ShowClue(ItemNum){ //alert(ItemNum); State[ItemNum][0] = 1; WriteFeedback(I[ItemNum][2]); } function SaveCurrentAnswers(){ for (var i=0; i-1){ FirstBit = InString.substring(0, i); LastBit = InString.substring(i + Token.length, InString.length); InString = FirstBit + Replacement + LastBit; i = InString.indexOf(Token); } return InString; } I = new Array(); I[0] = new Array(); I[0][1] = new Array(); I[0][1][0] = new Array(); I[0][1][0][0]='Un'; I[0][2]=''; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='apr\u00E8s'; I[1][2]=''; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='cheval'; I[2][2]=''; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='\u00E9v\u00E9nements'; I[3][2]=''; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='cardinal'; I[4][2]=''; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='pouvez-vous'; I[5][2]=''; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='jusqu\'\u00E0'; I[6][2]=''; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='auberge'; I[7][2]=''; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='r\u00E9pondent'; I[8][2]=''; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='dans'; I[9][2]=''; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='attendent'; I[10][2]=''; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='po\u00EAle'; I[11][2]=''; I[12] = new Array(); I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='tuyau'; I[12][2]=''; I[13] = new Array(); I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='partie'; I[13][2]=''; I[14] = new Array(); I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='plafond'; I[14][2]=''; I[15] = new Array(); I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='\u00E9tage'; I[15][2]=''; I[16] = new Array(); I[16][1] = new Array(); I[16][1][0] = new Array(); I[16][1][0][0]='entend'; I[16][2]=''; I[17] = new Array(); I[17][1] = new Array(); I[17][1][0] = new Array(); I[17][1][0][0]='mots'; I[17][2]=''; I[18] = new Array(); I[18][1] = new Array(); I[18][1][0] = new Array(); I[18][1][0][0]='voix'; I[18][2]=''; I[19] = new Array(); I[19][1] = new Array(); I[19][1][0] = new Array(); I[19][1][0][0]='du'; I[19][2]=''; I[20] = new Array(); I[20][1] = new Array(); I[20][1][0] = new Array(); I[20][1][0][0]='au'; I[20][2]=''; I[21] = new Array(); I[21][1] = new Array(); I[21][1][0] = new Array(); I[21][1][0][0]='lui'; I[21][2]=''; I[22] = new Array(); I[22][1] = new Array(); I[22][1][0] = new Array(); I[22][1][0][0]='son'; I[22][2]=''; I[23] = new Array(); I[23][1] = new Array(); I[23][1][0] = new Array(); I[23][1][0][0]='histoire'; I[23][2]=''; I[24] = new Array(); I[24][1] = new Array(); I[24][1][0] = new Array(); I[24][1][0][0]='reine'; I[24][2]=''; I[25] = new Array(); I[25][1] = new Array(); I[25][1][0] = new Array(); I[25][1][0][0]='veux'; I[25][2]=''; I[26] = new Array(); I[26][1] = new Array(); I[26][1][0] = new Array(); I[26][1][0][0]='ce'; I[26][2]=''; I[27] = new Array(); I[27][1] = new Array(); I[27][1][0] = new Array(); I[27][1][0][0]='il va me mettre'; I[27][2]=''; I[28] = new Array(); I[28][1] = new Array(); I[28][1][0] = new Array(); I[28][1][0][0]='roues'; I[28][2]=''; I[29] = new Array(); I[29][1] = new Array(); I[29][1][0] = new Array(); I[29][1][0][0]='Milady'; I[29][2]=''; I[30] = new Array(); I[30][1] = new Array(); I[30][1][0] = new Array(); I[30][1][0][0]='regardent'; I[30][2]=''; I[31] = new Array(); I[31][1] = new Array(); I[31][1][0] = new Array(); I[31][1][0][0]='vois'; I[31][2]=''; I[32] = new Array(); I[32][1] = new Array(); I[32][1][0] = new Array(); I[32][1][0][0]='lendemain'; I[32][2]=''; I[33] = new Array(); I[33][1] = new Array(); I[33][1][0] = new Array(); I[33][1][0][0]='chez'; I[33][2]=''; I[34] = new Array(); I[34][1] = new Array(); I[34][1][0] = new Array(); I[34][1][0][0]='tout'; I[34][2]=''; I[35] = new Array(); I[35][1] = new Array(); I[35][1][0] = new Array(); I[35][1][0][0]='Merci'; I[35][2]=''; I[36] = new Array(); I[36][1] = new Array(); I[36][1][0] = new Array(); I[36][1][0][0]='du'; I[36][2]=''; I[37] = new Array(); I[37][1] = new Array(); I[37][1][0] = new Array(); I[37][1][0][0]='venez'; I[37][2]=''; I[38] = new Array(); I[38][1] = new Array(); I[38][1][0] = new Array(); I[38][1][0][0]='rien'; I[38][2]=''; I[39] = new Array(); I[39][1] = new Array(); I[39][1][0] = new Array(); I[39][1][0][0]='on'; I[39][2]=''; I[40] = new Array(); I[40][1] = new Array(); I[40][1][0] = new Array(); I[40][1][0][0]='un cri'; I[40][2]=''; I[41] = new Array(); I[41][1] = new Array(); I[41][1][0] = new Array(); I[41][1][0][0]='valet'; I[41][2]=''; I[42] = new Array(); I[42][1] = new Array(); I[42][1][0] = new Array(); I[42][1][0][0]='par'; I[42][2]=''; I[43] = new Array(); I[43][1] = new Array(); I[43][1][0] = new Array(); I[43][1][0][0]='Il est mort'; I[43][2]=''; I[44] = new Array(); I[44][1] = new Array(); I[44][1][0] = new Array(); I[44][1][0][0]='verre'; I[44][2]=''; I[45] = new Array(); I[45][1] = new Array(); I[45][1][0] = new Array(); I[45][1][0][0]='disent'; I[45][2]=''; I[46] = new Array(); I[46][1] = new Array(); I[46][1][0] = new Array(); I[46][1][0][0]='\u00E0'; I[46][2]=''; Text = new Array(); Text[0]=''; Text[1]=' soir, peu de temps '; Text[2]=', les trois mousquetaires sont \u00E0 '; Text[3]=' et discutent des '; Text[4]=' lorsque ils rencontrent le '; Text[5]=' Richelieu. "Mousquetaires, '; Text[6]=' m\'escorter '; Text[7]=' l\''; Text[8]=' du Colombier-Rouge?"
"Bien s\u00FBr, Monseigneur," '; Text[9]=' les trois amis.
A\' l\'auberge, '; Text[10]=' la chambre o\u00F9 les mousquetaires '; Text[11]=' le cardinal, il y a un '; Text[12]=' dont le '; Text[13]=' est cass\u00E9 par la moiti\u00E9. La '; Text[14]=' sup\u00E9rieure de ce tuyau passe par le '; Text[15]=' dans la chambre \u00E0 l\''; Text[16]=' du dessus. Athos s\'approche du tuyau et s\'aper\u00E7oit qu\'on '; Text[17]=' des '; Text[18]='. Les mousquetaires se disposent \u00E0 \u00E9couter et entendent la '; Text[19]=' '; Text[20]=' cardinal. "Vous irez parler '; Text[21]=' duc de Buckingham et vous '; Text[22]=' direz que s\'il persiste dans '; Text[23]=' id\u00E9e d\'attaquer la France je rendrai publique l\''; Text[24]=' des diamants de la '; Text[25]='."
"Monseigneur, je '; Text[26]=' bien, mais il faut que quelqu\'un tue '; Text[27]=' d\'Artagnan, '; Text[28]=' des b\u00E2tons dans les '; Text[29]=', " r\u00E9pond la voix de '; Text[30]='.
Les trois amis se '; Text[31]=' et Athos dit:"C\'est bien elle, je '; Text[32]=' qu\'elle n\'a pas chang\u00E9."
Le '; Text[33]=' ils se rendent '; Text[34]=' d\'Artagnan, qui les re\u00E7oit '; Text[35]=' souriant. "'; Text[36]=' de m\'avoir envoy\u00E9 '; Text[37]=' vin, '; Text[38]=', allons le boire tous ensemble."
"Mais nous n\'avons '; Text[39]=' envoy\u00E9!" s\'exclament les trois stup\u00E9faits. Au m\u00EAme instant '; Text[40]=' entend '; Text[41]=' provenir d\'une autre chambre. Les amis se pr\u00E9cipitent et trouvent le '; Text[42]=' de d\'Artagnan '; Text[43]=' terre. '; Text[44]=' empoisonn\u00E9 par un '; Text[45]=' de ce vin que d\'Artagnan a re\u00E7u. "C\'est Milady!" '; Text[46]='-ils. "Il faut l\'arr\u00EAter '; Text[47]=' tout prix!"'; State = new Array(); function StartUp(){ var i = 0; MixWords = new Array(); for (i=0; i -1){ var TotalChars = GetGapValue(i).length; State[i][3] = (TotalChars-State[i][1])/TotalChars; if (State[i][0] > 0){State[i][3] = State[i][3]/2;} if (State[i][3]<0){State[i][3] = 0;} State[i][4] = 1; } else{ //Otherwise, add zero to the array and increment the hints for this item, as a penalty State[i][1]++; State[i][3] = 0; //then set the flag AllCorrect = 0; } } } //Calculate the total score var TotalScore = 0; for (i=0; i'; } Output += YourScoreIs + ' ' + TotalScore + '%.
'; if (AllCorrect == 0){ Output += '
' + Incorrect; } BuildExercise(); WriteFeedback(Output); DisplayExercise(); RestoreCurrentAnswers(); } function TrackFocus(BoxNumber){ CurrentWord = BoxNumber; } function CheckBeginning(Guess, Answer){ var OutString = ''; var i = 0; var UpperGuess = ''; var UpperAnswer = ''; if (CaseSensitive == false) { UpperGuess = Guess.toUpperCase(); UpperAnswer = Answer.toUpperCase(); } else { UpperGuess = Guess; UpperAnswer = Answer; } while (UpperGuess.charAt(i) == UpperAnswer.charAt(i)) { OutString += Guess.charAt(i); i++; } OutString += Answer.charAt(i); return OutString; } function FindLongest(InArray){ if (InArray.length < 1){return -1;} var Longest = 0; for (var i=1; i InArray[Longest].length){ Longest = i; } } return Longest; } function GetGapValue(GNum){ var RetVal = ''; if ((GNum<0)||(GNum>=I.length)){return RetVal;} if (eval('BottomFrame.document.Cloze.Gap' + GNum) != null){ RetVal = eval('BottomFrame.document.Cloze.Gap' + GNum).value; RetVal = TrimString(RetVal); } else{ RetVal = State[GNum][5]; } return RetVal; } function SetGapValue(GNum, Val){ if ((GNum<0)||(GNum>=I.length)){return;} if (eval('BottomFrame.document.Cloze.Gap' + GNum) != null){ eval('BottomFrame.document.Cloze.Gap' + GNum).value = Val; } } function FindCurrent() { var x = 0; FoundCurrent = -1; //Test the current word: //If it's state is not set to already correct, check the word. if (State[CurrentWord][4] != 1){ if (CheckAnswer(CurrentWord, false) < 0){ return CurrentWord; } } x=CurrentWord + 1; while (x -1){return ''} RightBits = new Array(); for (var i=0; i 0){ SetGapValue(CurrGap, HintString); State[CurrGap][1] = State[CurrGap][1] + 1; } WriteFeedback(GiveHint); } function Blank(){ return ' ©Half-Baked Software. Loading... '; } //--> //]]> -->