'; } 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 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(); } } } //Reading text/timer code var min var sec var ShowReadingAgain = 'Afficher le texte à nouveau:'; function DownTime(mm,ss){ min = mm; sec = ss; if (sec==0) { sec = 60; min--; } sec--; if (sec<10){ sec="0" + sec; } if (TimerFrame.document.TimerForm.face == null){ return; } TimerFrame.document.TimerForm.face.value= min+":"+sec; if ((min==0) && (sec==0)){ TimesUp() } else{ setTimeout('DownTime(min,sec)',1000) } } function StartReading(){ Stuff='Temps restant:'; Stuff+=' '; WriteToTimer(Stuff); ShowReading(); timeoutID=setTimeout('DownTime(30,0)',1000); } function TimesUp() { var Stuff=''; if (ShowReadingAgain.length > 0) { Stuff+=''; WriteToTimer(Stuff); } WriteToReading('Temps écoulé:'); } function WriteToReading(Stuff) { if (is.CRAPBrowser){Stuff=ResolveAllURLs(Stuff);} ReadingFrame.document.clear(); ReadingFrame.document.open(); ReadingFrame.document.writeln (''); ReadingFrame.document.writeln (''); ReadingFrame.document.writeln ('
'); ReadingFrame.document.writeln ('
') ReadingFrame.document.writeln (''); ReadingFrame.document.writeln (Stuff); ReadingFrame.document.writeln ('
'); ReadingFrame.document.close(); } function WriteToTimer(Stuff){ if (is.CRAPBrowser){Stuff=ResolveAllURLs(Stuff);} TimerFrame.document.clear(); TimerFrame.document.open(); TimerFrame.document.writeln (''); TimerFrame.document.writeln (''); TimerFrame.document.writeln ('
'); TimerFrame.document.writeln ('
') TimerFrame.document.writeln (''); TimerFrame.document.writeln (Stuff); TimerFrame.document.writeln ('
'); TimerFrame.document.close(); } 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('R','E','N','O','V','A','T','I','O','N'); L[1] = new Array('E','M','','X','','E','','M','','U'); L[2] = new Array('M','I','M','O','G','R','A','P','H','E'); L[3] = new Array('B','S','','','','E','','R','',''); L[4] = new Array('R','E','M','O','D','E','L','E','E','S'); L[5] = new Array('A','','U','','U','','A','S','','I'); L[6] = new Array('N','U','A','N','C','A','S','S','E','S'); L[7] = new Array('D','','','O','A','X','','I','','E'); L[8] = new Array('T','E','I','N','T','E','R','O','N','S'); L[9] = new Array('','U','N','E','','R','E','N','E',''); C = new Array(); C[0] = new Array(1,2,0,3,0,4,0,5,0,6); C[1] = new Array(7,0,0,0,0,0,0,0,0,0); C[2] = new Array(8,0,0,0,0,0,0,0,0,0); C[3] = new Array(9,0,0,0,0,0,0,0,0,0); C[4] = new Array(10,0,11,0,12,0,13,0,0,14); C[5] = new Array(0,0,0,0,0,0,15,0,0,0); C[6] = new Array(16,0,0,17,0,18,0,0,0,0); C[7] = new Array(0,0,0,19,0,0,0,0,0,0); C[8] = new Array(20,21,22,0,0,0,23,0,24,0); C[9] = new Array(0,25,0,0,0,26,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('','','','','','','','','',''); A = new Array(); A[1]='rétablissement dans l\'état premier'; A[7]='réunion de sardines'; A[8]='Marceau en fut un'; A[9]='bulletin de souscription'; A[10]='restructurées'; A[15]='le meilleur'; A[16]='ne contrastasses pas'; A[19]='15,1,24'; A[20]='colorerons légérement'; A[25]='première page'; A[26]='prénom de Magritte'; D = new Array(); D[1]='peintre aux nombreux autoportraits'; D[2]='transmise'; D[3]='sigle'; D[4]='peu dense'; D[5]='celle de Monet est célèbre'; D[6]='peut être académique'; D[11]='transforma'; D[12]='à l\'éffigie d\'un noble'; D[13]='épuisé'; D[14]='situées'; D[17]='une heure du jour chez les romains de l\'antiquité'; D[18]='diriger'; D[21]='avoir conjugué'; D[22]='les branchés le sont'; D[23]='note'; D[24]='négation'; function StartUp(){ BuildExercise(); WriteFeedback(Instructions); DisplayExercise(); if (TimerFrame != null) { Stuff=''; } Output += YourScoreIs + ' ' + Score + '%.
'; if (AllCorrect == false){ Output += '
' + Incorrect; Penalties++; } BuildExercise(); WriteFeedback(Output); DisplayExercise(); } function DoNothing(){} function Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]>