'; //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 + 'Down: ' + 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('S','','','','','','','','','','','','D','A','L','L','E','','','D'); L[1] = new Array('A','L','L','O','','','','','','','','','','T','','','','','','A'); L[2] = new Array('L','','','','A','','','','','','','','','R','','','','D','E','L'); L[3] = new Array('A','B','B','A','I','N','O','','','S','T','U','D','I','O','','','E','',''); L[4] = new Array('','','A','','','','','','','O','','','','O','','D','','L','',''); L[5] = new Array('S','A','L','O','T','T','O','','','L','','','','','N','E','G','L','I',''); L[6] = new Array('O','','C','','E','','','','G','A','R','A','G','E','','G','','E','',''); L[7] = new Array('F','','O','','T','','','','','I','','','','','','L','','','',''); L[8] = new Array('F','','N','','T','','R','I','P','O','S','T','I','G','L','I','O','','',''); L[9] = new Array('I','','E','','O','','','','I','','','','','','','','','S','',''); L[10] = new Array('T','','','','','','','C','A','M','E','R','A','D','A','L','E','T','T','O'); L[11] = new Array('T','','','','','','','','N','','','','','','','','','A','',''); L[12] = new Array('A','S','C','E','N','S','O','R','E','','','','S','','','D','','N','E','L'); L[13] = new Array('','','','','','','','','R','','C','U','C','I','N','A','','Z','',''); L[14] = new Array('C','O','R','R','I','D','O','I','O','','A','','A','','','I','','A','','D'); L[15] = new Array('','','','','','','','','T','I','N','E','L','L','O','','B','','','E'); L[16] = new Array('','','','','','','','','T','','T','','A','','','','A','G','L','I'); L[17] = new Array('S','O','G','G','I','O','R','N','O','','I','','','','','','G','','',''); L[18] = new Array('','','','','','','','','L','','N','','','','','','N','E','I',''); L[19] = new Array('','I','N','G','R','E','S','S','O','','A','R','M','A','D','I','O','','',''); C = new Array(); C[0] = new Array(1,0,0,0,0,0,0,0,0,0,0,0,2,3,0,0,0,0,0,4); C[1] = new Array(5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[2] = new Array(0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0); C[3] = new Array(8,0,9,0,0,0,0,0,0,10,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,11,0,0,0,0); C[5] = new Array(12,0,0,0,13,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0); C[6] = new Array(0,0,0,0,0,0,0,0,15,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,0,0,0); C[8] = new Array(0,0,0,0,0,0,16,0,17,0,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,18,0,0); C[10] = new Array(0,0,0,0,0,0,0,19,0,0,0,0,0,0,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,0,0,0); C[12] = new Array(20,0,0,0,0,0,0,0,0,0,0,0,21,0,0,22,0,23,0,0); C[13] = new Array(0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0); C[14] = new Array(25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26); C[15] = new Array(0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,28,0,0,0); C[16] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,0,0,0); C[17] = new Array(30,0,0,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,31,0,0,0); C[19] = new Array(0,32,0,0,0,0,0,0,0,0,33,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('','','','','','','','','','','','','','','','','','','',''); G[19] = new Array('','','','','','','','','','','','','','','','','','','',''); A = new Array(); A[2]='da+le'; A[5]='a+lo'; A[7]='di+il'; A[8]='La finestra sul tetto'; A[10]='Stanza con i libri e la scrivania'; A[12]='Stanza dove sedersi in compagnia di amici'; A[14]='in+gli'; A[15]='Stanza per la macchina'; A[16]='Stanza chiusa per conservare oggetti'; A[19]='La stanza per dormire'; A[20]='Un macchinario che trasporta persone'; A[23]='in_il'; A[24]='La stanza dove preparare il cibo'; A[25]='Lo spazio fra le camere'; A[27]='Area dove mangiare'; A[29]='a+gli'; A[30]='La stanza dove ricevere ospiti'; A[31]='in+il'; A[32]='Lo spazio alla entrata della casa'; A[33]='Lo spazio dove conservare i vestiti'; D = new Array(); D[1]='La stanza dove fare una festa'; D[3]='La zona di entrata di un palazzo'; D[4]='da+il'; D[6]='a+i'; D[7]='di+le'; D[9]='La zona aperta della casa dove tenere le piante'; D[10]='La zona piu\' alta di una casa o di un palazzo, sotto il tetto'; D[11]='di+gli'; D[12]='Il locale sotto il tetto'; D[13]='La copertura della casa'; D[17]='La zona davanti alla porta di un appartamento'; D[18]='Uno dei locali della casa'; D[21]='L\'area dove salire da un piano all\'altro'; D[22]='da+i'; D[24]='Il locale sotto la casa per tenere il vino'; D[26]='di+i'; D[28]='Il locale dove curare l\'igiene personale'; 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©Half-Baked Software. Loading...'; } //--> //]]>