Make your own free website on Tripod.com
'; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += '
'; var NavBar=''; NavBar+='
'; NavBar+=''; NavBar+=''; NavBar+=''; NavBar+=''; NavBar+='
'; if (is.CRAPBrowser){NavBar=ResolveAllURLs(NavBar);} var TitleCode = ''; TitleCode += '' + ExerciseTitle + '
'; TitleCode += '' + ExerciseSubtitle + '
'; TitleCode += '
'; var GridOpener = ''; var GridRowOpener = ''; var GridRowCloser = ''; var BlankCell = ''; var LetterOnlyCell = ''; var NumLetterCell = ''; var GridCloser = '
 [Letter]'; if (! is.CRAPBrowser){ NumLetterCell += '[ClueNum]'; } else{ NumLetterCell += '[ClueNum]'; } NumLetterCell += ' [Letter]
'; 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 + '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('','','','','','','','','','','','L','I','B','Y','A','N','','','','','','',''); L[1] = new Array('I','N','D','O','N','E','S','I','A','N','','A','','','','','','','','','','','',''); L[2] = new Array('T','','U','','','C','','','','','','B','','','','','','','','','','','',''); L[3] = new Array('A','','T','','','U','','','','','','E','','','','','','','','','','','',''); L[4] = new Array('L','','C','','P','A','K','I','S','T','A','N','I','','','','','','I','R','A','Q','I',''); L[5] = new Array('I','','H','','','D','','','','','','E','','','','','','','','','','','R',''); L[6] = new Array('A','','','','P','O','R','T','U','G','E','S','E','','W','','','','','','','','I',''); L[7] = new Array('N','','','','','R','','','','','','E','','','E','','','T','U','R','K','I','S','H'); L[8] = new Array('','','','','','I','','','','','','','S','','L','','','','','U','','','H',''); L[9] = new Array('','','M','A','L','A','Y','S','I','A','N','','U','','S','P','A','N','I','S','H','','',''); L[10] = new Array('','','','','','N','','','','','O','','D','','H','','','','','S','','','',''); L[11] = new Array('','','','','','','N','I','G','E','R','I','A','N','','','P','O','L','I','S','H','',''); L[12] = new Array('I','','','','','','','','','','W','','N','','','','','','','A','','','',''); L[13] = new Array('S','','','J','A','P','A','N','E','S','E','','E','G','Y','P','T','I','O','N','','','',''); L[14] = new Array('R','','','','','','','','','','G','','S','','','','','','','','','','',''); L[15] = new Array('A','','','','','R','','','','','I','','E','N','G','L','I','S','H','','','','',''); L[16] = new Array('E','','','','M','O','R','O','C','C','A','N','','','','','N','','','','','','',''); L[17] = new Array('L','','','','','M','','','','','N','','','S','A','U','D','I','','','','','',''); L[18] = new Array('I','R','A','N','I','A','N','','','','','','','','','','I','','','','','','',''); L[19] = new Array('','','','','','N','','','','H','U','N','G','A','R','I','A','N','','','','','',''); L[20] = new Array('P','E','R','U','V','I','A','N','','','','','','','','','N','','','','','','',''); L[21] = new Array('','','','','','A','','','','','','','','','','','','','','','','','',''); L[22] = new Array('','','F','I','N','N','I','S','H','','','','','','','','','','','','','','',''); L[23] = new Array('','','R','','','','','','','','','','','','','','','','','','','','',''); L[24] = new Array('','G','E','R','M','A','N','','','','','','','','','','','','','','','','',''); L[25] = new Array('','','N','','','','','','','','','','','','','','','','','','','','',''); L[26] = new Array('','','C','','','','','','','','','','','','','','','','','','','','',''); L[27] = new Array('','T','H','I','','','','','','','','','','','','','','','','','','','',''); C = new Array(); C[0] = new Array(0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0); C[1] = new Array(2,0,3,0,0,4,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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[4] = new Array(0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,7,0); C[5] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[6] = new Array(0,0,0,0,8,0,0,0,0,0,0,0,0,0,9,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,10,0,11,0,0,0,0); C[8] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0); C[9] = new Array(0,0,13,0,0,0,0,0,0,0,14,0,0,0,15,0,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,0,0,0,0,0); C[11] = new Array(0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0); C[12] = new Array(18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[13] = new Array(0,0,0,19,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0); C[14] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[15] = new Array(0,0,0,0,0,21,0,0,0,0,0,0,22,0,0,0,23,0,0,0,0,0,0,0); C[16] = new Array(0,0,0,0,24,0,0,0,0,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,25,0,0,0,0,0,0,0,0,0,0); C[18] = new Array(26,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[19] = new Array(0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[20] = new Array(28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[21] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[22] = new Array(0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[23] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[24] = new Array(0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[25] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[26] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[27] = new Array(0,31,0,0,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('','','','','','','','','','','','','','','','','','','','','','','',''); G[20] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[21] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[22] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[23] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[24] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[25] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[26] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); G[27] = new Array('','','','','','','','','','','','','','','','','','','','','','','',''); A = new Array(); A[1]='Libya'; A[2]='Indonesia'; A[5]='Pakistan'; A[6]='Iraq'; A[8]='Portugal'; A[10]='Turky'; A[13]='Malaysia'; A[15]='Spain'; A[16]='NIgeria'; A[17]='Poland'; A[19]='Japan'; A[20]='Egypt'; A[22]='England'; A[24]='Morocco'; A[25]='Saudi Arabia'; A[26]='Irain'; A[27]='Hungry'; A[28]='Peru'; A[29]='Finland'; A[30]='Germany'; A[31]='Thailand'; D = new Array(); D[1]='Lebanon'; D[2]='Italy'; D[3]='Holland'; D[4]='Ecuador'; D[7]='Ireland'; D[9]='Wales'; D[11]='Russia'; D[12]='Sudan'; D[14]='Norway'; D[18]='Isreal'; D[21]='Romania'; D[23]='India'; D[29]='France'; function StartUp(){ //Try to get user name UserName = prompt('Please enter your name:',''); UserName += ''; if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ UserName = prompt('Please enter your name:',''); UserName += ''; if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ window.location = PreviousPage; } } 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); if (AllCorrect == true){ setTimeout('SendResults(' + Score + ')', 50); return; } DisplayExercise(); } function SendResults(Score){ var today = new Date; var NewName = '' + today.getTime(); var NewWin = window.open('', NewName, 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,,width=400,height=300'); NewWin.document.clear(); NewWin.document.open(); NewWin.document.write(ResultForm); NewWin.document.close(); NewWin.document.Results.Score.value = Score + '%'; NewWin.document.Results.realname.value = UserName; NewWin.document.Results.End_Time.value = (new Date()).toLocaleString(); NewWin.document.Results.Start_Time.value = StartTime; NewWin.document.Results.submit(); } function DoNothing(){} function Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]>