'; 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 += Buttons1; OutString += BuiltExercise; OutString += Buttons2; OutString += BuiltClues; OutString += NavBar; 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 BuildClue(ClueNum,x,y,Across){ var OutString = ''; if (Across == true){ if (ClueNum >= A.length){ return ''; } if (A[ClueNum] == null){ return ''; } OutString = ClueNum + '. ' + A[ClueNum]; OutString += GetAnswer; OutString = ReplaceStuff('[BoxName]', 'BA'+ClueNum, OutString); //Find out how long the answer is AnsLength = 0; i = x; j = y; while (j= D.length){ return ''; } if (D[ClueNum] == null){ return ''; } OutString = ClueNum + '. ' + D[ClueNum]; OutString += GetAnswer; OutString = ReplaceStuff('[BoxName]', 'BD'+ClueNum, OutString); //Find out how long the answer is AnsLength = 0; i = x; j = y; while (i 0){ AcrossClues += BuildClue(C[i][j], i, j, true); DownClues += BuildClue(C[i][j], i, j, false); } } } OutString += ''; OutString += CluesAcross + '

' + AcrossClues + '

'; OutString += ''; OutString += CluesDown + '

' + DownClues + '
' OutString += ''; BuiltClues = OutString; } function ShowClue(ClueNum,x,y){ var OutString = ''; var AnsLength = 0; var i; var j; CurrBoxElement = ClueNum; if (A[ClueNum] != null){ OutString = OutString + 'Horizontalement ' + ClueNum + '. ' + A[ClueNum]; OutString += GetAnswer; OutString = ReplaceStuff('[BoxName]', 'BA'+ClueNum, OutString); //Find out how long the answer is AnsLength = 0; i = x; j = y; while (j 0){ OutString += '
'; } OutString = OutString + 'Verticalement ' + ClueNum + '. ' + D[ClueNum]; OutString += GetAnswer; OutString = ReplaceStuff('[BoxName]', 'BD'+ClueNum, OutString); //Find out how long the answer is AnsLength = 0; i = x; j = y; while (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; } L = new Array(); L[0] = new Array('','','P','E','R','U','V','I','E','N','','','','','','',''); L[1] = new Array('F','','O','','','','','','','','','','','','','',''); L[2] = new Array('R','','R','','F','','','','','','','','','','','',''); L[3] = new Array('A','U','T','R','I','C','H','I','E','N','','','','','','',''); L[4] = new Array('N','','U','','N','','','','','','','','','','','',''); L[5] = new Array('\u00C7','','G','','L','','','','','','M','','','','','',''); L[6] = new Array('A','','A','','A','M','E','R','I','C','A','I','N','','','',''); L[7] = new Array('I','','I','','N','','','','','','R','','','','','',''); L[8] = new Array('S','','S','','D','','C','H','I','N','O','I','S','','','',''); L[9] = new Array('','','','','A','','','','','','C','','','','','',''); L[10] = new Array('B','R','E','S','I','L','I','E','N','','A','N','G','L','A','I','S'); L[11] = new Array('','','S','','S','','','','','','I','','','','','',''); L[12] = new Array('','','P','','','','','','T','U','N','I','S','I','E','N',''); L[13] = new Array('I','T','A','L','I','E','N','','','','','','U','','','',''); L[14] = new Array('','','G','','','','','','B','E','L','G','E','','','',''); L[15] = new Array('','','N','','','','','','','','','','D','','','',''); L[16] = new Array('','R','O','U','M','A','I','N','','','','','O','','','',''); L[17] = new Array('','','L','','','','','','','','','','I','','','',''); L[18] = new Array('','','','','','','','','','','','','S','','','',''); C = new Array(); C[0] = new Array(0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[1] = new Array(2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[2] = new Array(0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0); C[3] = new Array(4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[4] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[5] = new Array(0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0); C[6] = new Array(0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0); C[7] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[8] = new Array(0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0); C[9] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[10] = new Array(8,0,9,0,0,0,0,0,0,0,10,0,0,0,0,0,0); C[11] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[12] = new Array(0,0,0,0,0,0,0,0,11,0,0,0,12,0,0,0,0); C[13] = new Array(13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[14] = new Array(0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0); C[15] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[16] = new Array(0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[17] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[18] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); G = new Array(); G[0] = new Array('','','','','','','','','','','','','','','','',''); G[1] = new Array('','','','','','','','','','','','','','','','',''); G[2] = new Array('','','','','','','','','','','','','','','','',''); G[3] = new Array('','','','','','','','','','','','','','','','',''); G[4] = new Array('','','','','','','','','','','','','','','','',''); G[5] = new Array('','','','','','','','','','','','','','','','',''); G[6] = new Array('','','','','','','','','','','','','','','','',''); G[7] = new Array('','','','','','','','','','','','','','','','',''); G[8] = new Array('','','','','','','','','','','','','','','','',''); G[9] = new Array('','','','','','','','','','','','','','','','',''); G[10] = new Array('','','','','','','','','','','','','','','','',''); G[11] = new Array('','','','','','','','','','','','','','','','',''); G[12] = new Array('','','','','','','','','','','','','','','','',''); G[13] = new Array('','','','','','','','','','','','','','','','',''); G[14] = new Array('','','','','','','','','','','','','','','','',''); G[15] = new Array('','','','','','','','','','','','','','','','',''); G[16] = new Array('','','','','','','','','','','','','','','','',''); G[17] = new Array('','','','','','','','','','','','','','','','',''); G[18] = new Array('','','','','','','','','','','','','','','','',''); A = new Array(); A[1]='Habitant du Pérou'; A[4]='Habitant de l\'Autriche'; A[6]='Habitant des États-Unis'; A[7]='Habitant de la Chine'; A[8]='Habitant du Brésil'; A[10]='Habitant de l\'Angleterre'; A[11]='Habitant de la Tunisie'; A[13]='Habitant de l\'Italie'; A[14]='Habitant de la Belgique'; A[15]='Habitant de la Roumanie'; D = new Array(); D[1]='Habitant du Portugal'; D[2]='Habitant de la France'; D[3]='Habitant de la Finlande'; D[5]='Habitant du Maroc'; D[9]='Habitant de l\'Espagne'; D[12]='Habitant de la Suède'; function StartUp(){ BuildExercise(); BuildCompleteClues(); WriteFeedback(Instructions); DisplayExercise(); } function CheckAnswers(){ var AllCorrect = true; var TotLetters = 0; var CorrectLetters = 0; //Check each letter for (var i=0; i'; } Output += YourScoreIs + ' ' + Score + '%.
'; if (AllCorrect == false){ Output += '
' + Incorrect; Penalties++; } BuildExercise(); WriteFeedback(Output); DisplayExercise(); } function DoNothing(){} function Blank(){ return ' ©Half-Baked Software. Loading... '; } //--> //]]> -->