'; //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','','','','','','','','M','','U','','','',''); L[1] = new Array('','','A','G','R','I','G','E','N','T','O','','','A','','R','O','M','A',''); L[2] = new Array('','','','','','R','','','','','R','','','T','','B','','','S',''); L[3] = new Array('','P','E','S','C','A','R','A','','','V','E','N','E','Z','I','A','','S',''); L[4] = new Array('','E','','','','C','','','P','','I','','','R','','N','','','I',''); L[5] = new Array('','R','','','','U','','C','A','S','E','R','T','A','','O','','','S',''); L[6] = new Array('','U','','P','I','S','A','','D','','T','','','','','','','','I',''); L[7] = new Array('','G','','','','A','','B','O','L','O','G','N','A','','','','','',''); L[8] = new Array('','I','','M','','','','','V','','','E','','','C','','','','',''); L[9] = new Array('S','A','L','E','R','N','O','','A','','','N','A','P','O','L','I','','',''); L[10] = new Array('A','','','S','','','','','','','','O','','','M','','','','','S'); L[11] = new Array('S','','','S','','','','','','','','V','E','R','O','N','A','','','I'); L[12] = new Array('S','','F','I','R','E','N','Z','E','','','A','','','','','N','','','E'); L[13] = new Array('A','','','N','','','','','','','','','','','','','C','','','N'); L[14] = new Array('R','','P','A','L','E','R','M','O','','','','','','','A','O','S','T','A'); L[15] = new Array('I','','','','','','','I','','','','','','','','','N','','R',''); L[16] = new Array('','','B','A','R','I','','L','','','','','P','A','R','M','A','','E',''); L[17] = new Array('','','','S','','','','A','','','','','','','','','','','N',''); L[18] = new Array('','','','T','O','R','I','N','O','','','','','T','R','I','E','S','T','E'); L[19] = new Array('','','','I','','','','O','','','','','','','','','','','O',''); C = new Array(); C[0] = new Array(0,0,0,0,0,1,0,0,0,0,0,0,0,2,0,3,0,0,0,0); C[1] = new Array(0,0,4,0,0,0,0,0,0,0,5,0,0,0,0,6,0,0,7,0); C[2] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[3] = new Array(0,8,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0); C[4] = new Array(0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0); C[5] = new Array(0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0); C[6] = new Array(0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[7] = new Array(0,0,0,0,0,0,0,13,0,0,0,14,0,0,0,0,0,0,0,0); C[8] = new Array(0,0,0,15,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0); C[9] = new Array(17,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0); C[10] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19); C[11] = new Array(0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,21,0,0,0); C[12] = new Array(0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[13] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[14] = new Array(0,0,23,0,0,0,0,24,0,0,0,0,0,0,0,25,0,0,26,0); C[15] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[16] = new Array(0,0,27,28,0,0,0,0,0,0,0,0,29,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,0,0,0); C[18] = new Array(0,0,0,30,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0); C[19] = new Array(0,0,0,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('','','','','','','','','','','','','','','','','','','',''); G[19] = new Array('','','','','','','','','','','','','','','','','','','',''); A = new Array(); A[4]='C\'e\' la valle dei templi'; A[6]='C\'e\' l\'isola Tiberina'; A[8]='Patria di D\'Annunzio'; A[9]='C\'e\' il ponte dei Sospiri'; A[11]='C\'e\' uan famosa vilal reale'; A[12]='C\'e\' il Parco dei Miracoli'; A[13]='La dotta'; A[17]='C\'era la prima universita\' di medicina'; A[18]='C\'e\' il Mastio Angioino'; A[20]='C\'e\' una famosa Arena'; A[22]='C\'e\' Palazzo Pitti'; A[23]='E\' nella Conca d\'oro'; A[25]='La antica Augusta Pretoria'; A[27]='Sede della Fiera del Levante'; A[29]='C\'e\' una famosa Certosa'; A[30]='C\'e\' la Mole Antonelliana'; A[31]='C\'e\' la cattedrale di San Giusto'; D = new Array(); D[1]='C\'e\' l\'orecchio di Dionigi'; D[2]='Sono famosi i Sassi'; D[3]='Patria di Raffaello'; D[5]='C\'e\' il pozzo di San Patrizio'; D[7]='La citta\' del "poverello"'; D[8]='C\'e\' la Fontana Maggiore con scene di vita contadina'; D[10]='C\'e\' il Palazzo della Ragione'; D[14]='Uno dei piu\' grandi porti italiani'; D[15]='La citta\' dello stretto'; D[16]='Citta\' sul lago omonimo'; D[17]='Capoluogo vicino al Golfo dell\'Asinara'; D[19]='C\'e\' la Torre del Mangia'; D[21]='Porto delle Marche '; D[24]='C\'e\' il Castello Sforzesco'; D[26]='C\'e\' il Castello del Buon Consiglio'; D[28]='C\'e\' un famoso spumante'; 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...'; } //--> //]]>