'; OutString += '
'; OutString += NavBar; if (Feedback.length>0){ OutString += '' } OutString += '
'; OutString += ''; OutString += Feedback; OutString += '
'; if (is.CRAPBrowser){OutString=ResolveAllURLs(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('C','H','A','R','L','E','M','A','G','N','E','','','B','','','','L',''); L[1] = new Array('A','','','','','','E','','','','','','','O','','','','I',''); L[2] = new Array('T','','','','','T','I','A','N','A','N','M','E','N','','','','N',''); L[3] = new Array('H','','','','','','N','','','','','','','A','','','','C',''); L[4] = new Array('E','','','','','','K','A','H','N','','','','P','','','','O',''); L[5] = new Array('R','','','','','','A','','','','','','M','A','N','D','E','L','A'); L[6] = new Array('I','','','','','','M','E','I','R','','','','R','','','','N',''); L[7] = new Array('N','','','','','','P','','','','','E','','T','','','','',''); L[8] = new Array('E','','','','','','F','','','','','L','','E','','','','F',''); L[9] = new Array('','','','','','','','','','','','I','','','','','','R',''); L[10] = new Array('','','','','','','B','U','S','H','','Z','','','','','','A',''); L[11] = new Array('','','','','','','','','T','','M','A','O','Z','E','D','O','N','G'); L[12] = new Array('','','','','','','','','A','','','B','','','','','','K',''); L[13] = new Array('','','','','','C','','','L','','','E','','','','','','L',''); L[14] = new Array('','','','','W','A','S','H','I','N','G','T','O','N','','S','D','I',''); L[15] = new Array('','','','','','R','','','N','','','H','','','','','','N',''); L[16] = new Array('','','','','','T','','','','','','','','','','','','',''); L[17] = new Array('','','','','','E','','','','','','','','','','','','',''); L[18] = new Array('','','C','H','U','R','C','H','I','L','L','','','','','','','',''); C = new Array(); C[0] = new Array(1,0,0,0,0,0,2,0,0,0,0,0,0,3,0,0,0,4,0); C[1] = new Array(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,0,5,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); C[4] = new Array(0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0); C[5] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0); C[6] = new Array(0,0,0,0,0,0,8,0,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,9,0,0,0,0,0,0,0); C[8] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0); C[9] = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); C[10] = new Array(0,0,0,0,0,0,11,0,12,0,0,0,0,0,0,0,0,0,0); C[11] = new Array(0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0); C[12] = new Array(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,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0); C[14] = new Array(0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,16,0,0,0); C[15] = new Array(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,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,0,0,0,0,0,0); C[18] = new Array(0,0,17,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('','','','','','','','','','','','','','','','','','',''); A = new Array(); A[1]='Great emperor of Europe in the 8th & 9th century.'; A[5]='Place in China where a rebel stood in front of a line of advancing tanks.'; A[6]='Leader in the 1100\'s who conquered parts of China, Iran, Afghanistan, India, and Russia.'; A[7]='Created solidarity in South Africa after being jailed.'; A[8]='A female prime minister of Israel.'; A[11]='Father and son presidents'; A[13]='Chinese leader who unified China in the 1950\'s.'; A[15]='First president of the United States.'; A[16]='The official abbreviation for Reagan\'s "Star Wars".'; A[17]='Prime minister of England during WWII.'; D = new Array(); D[1]='Female dictator of Russia in the 1700\'s.'; D[2]='The famous book Hitler wrote.'; D[3]=' A French general who tried to take over many countries before being defeated.'; D[4]='American president who freed the slaves.'; D[9]='Queen of England whose mother was executed by King Henry.'; D[10]='Discovered some properties of electricity and was a world political leader.'; D[12]='Russain name for man of steel.'; D[14]='Peanut farmer president.'; 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...'; } //--> //]]> -->