'; } else{ NumLetterCell += '[ClueNum]'; } NumLetterCell += ' [Letter]'; var GridCloser = ''; var Buttons = '
'; Buttons += ''; Buttons += ''; Buttons += '
'; var Buttons1 = ReplaceStuff('[Num]', '1', Buttons); var Buttons2 = ReplaceStuff('[Num]', '2', Buttons); var GetAnswerOpener = '
'; var GetAnswer = ' '; GetAnswer += ' '; GetAnswer += ''; var GetAnswerCloser = '
'; function GoBack(){ var BackSkip = history.length - PreviousPage; if (BackSkip > 0){ history.go((BackSkip+1)*-1); } else{ parent.history.back(); } } function BuildExercise(){ var OutString = ''; var Temp = ''; var GridStuff = GridOpener; for (var i=0; i 0){ Temp = NumLetterCell; Temp = ReplaceStuff('[ClueNum]', C[i][j], Temp); //Add location info Temp = ReplaceStuff('[x]', i, Temp); Temp = ReplaceStuff('[y]', j, Temp); } //Otherwise add a blank cell else{ Temp = LetterOnlyCell; } //If the cell is already answered, add the letter from the Guess array if (G[i][j] != ''){ Temp = ReplaceStuff('[Letter]', G[i][j], Temp); } //Otherwise, put in a non-breaking space else{ Temp = ReplaceStuff('[Letter]', ' ', Temp); } GridStuff += Temp; } } GridStuff += GridRowCloser; } GridStuff += GridCloser; //Put the final pieces together OutString = GridStuff; BuiltExercise = OutString; } function WriteFeedback(Feedback) { if (is.CRAPBrowser){Feedback=ResolveAllURLs(Feedback);} //Build the output string var OutString = ''; OutString += ''; OutString += ''; 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 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){ OutString += '
'; } OutString = OutString + 'Vertical: ' + 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('M','I','C','H','E','L','A','N','G','E'); L[1] = new Array('O','','O','','','I','R','E','','N'); L[2] = new Array('D','E','L','A','U','N','A','Y','','S'); L[3] = new Array('I','','Z','','R','','B','','E','E'); L[4] = new Array('G','I','A','C','O','M','E','T','T','I'); L[5] = new Array('L','O','','A','M','I','S','','R','G'); L[6] = new Array('I','N','G','R','E','S','','P','E','N'); L[7] = new Array('A','','A','C','T','E','U','R','','A'); L[8] = new Array('N','A','D','A','R','','R','I','E','N'); L[9] = new Array('I','R','E','N','E','','E','T','','T'); C = new Array(); C[0] = new Array(1,0,2,0,0,3,4,5,0,6); C[1] = new Array(0,0,0,0,0,7,0,0,0,0); C[2] = new Array(8,0,0,0,9,0,0,0,0,0); C[3] = new Array(0,0,0,0,0,0,0,0,10,0); C[4] = new Array(11,12,0,13,0,14,0,0,0,0); C[5] = new Array(15,0,0,16,0,0,0,0,17,0); C[6] = new Array(18,0,19,0,0,0,0,20,0,0); C[7] = new Array(0,0,21,0,0,0,22,0,0,0); C[8] = new Array(23,24,0,0,0,0,25,0,0,0); C[9] = new Array(26,0,0,0,0,0,27,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('','','','','','','','','',''); A = new Array(); A[1]='le "Bacchus" fut sa première statue de grande taille'; A[7]='colère'; A[8]='Apollinaire qualifie son art d\'orphisme '; A[10]='fin de journée'; A[11]='sculpteur'; A[15]='saint de la manche'; A[16]='30 Millions...il paraît, en France'; A[17]='renseignement'; A[18]='il a son violon'; A[20]='pour écrire anglais'; A[21]='il rêve à Oscar'; A[23]='photographe volant'; A[25]='vraiment pas grand chose'; A[26]='prénom feminin'; A[27]='il est extra'; D = new Array(); D[1]='cubiste'; D[2]='Variété de navet '; D[3]='toile '; D[4]='ont leurs doit les chiffres'; D[5]='maréchal d\'empire'; D[6]='Kandinsky en fut un'; D[9]='servant à déterminer la sensité de l\'urine'; D[10]='rien à signaler'; D[12]='molécule'; D[13]='entrave à la liberté'; D[14]='sur le rouge ou le noir à la roulette'; D[19]='On lui doit des cantates (Comala, 1846), des sonates, 7 ouvertures, 8 symphonies.'; D[20]='qui n\'est plus à prendre'; D[22]='aurochs'; D[24]='altesse royale'; function StartUp(){ BuildExercise(); 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...'; } //--> //]]>