'; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += ''; ResultForm += '
'; var NavBar=''; NavBar+='
'; NavBar+=''; NavBar+=''; NavBar+=''; NavBar+='
'; if (is.CRAPBrowser){NavBar=ResolveAllURLs(NavBar);} var TitleCode = ''; TitleCode += '' + ExerciseTitle + '
'; TitleCode += '' + ExerciseSubtitle + '
'; TitleCode += '
'; var WordBox = ''; var ClozeOpener = ''; ClozeOpener += ''; var Buttons = '
'; ClozeOpener += '
'; var ClozeCloser = '
'; Buttons += '
'; Buttons += ''; Buttons += ''; Buttons += '
'; var GapCode = ''; var ClueButton = ''; ClueButton = ''; function GoBack(){ var BackSkip = history.length - PreviousPage; if (BackSkip > 0){ history.go((BackSkip+1)*-1); } else{ parent.history.back(); } } function BuildExercise(){ var OutString = ''; var ClozeStuff = ''; for (var i=0; i'; } else{ GapLen = I[i][1][0][0].length; if (GapLen < 3){GapLen = 3;} Gap = ReplaceStuff('[strGapSize]', GapLen, GapCode); Gap = ReplaceStuff('[strGapName]', 'Gap' + i + '', Gap); Gap = ReplaceStuff('[strItemNum]', i + '', Gap); Gap = ReplaceStuff('[strValue]', State[i][5], Gap); ClozeStuff += Gap; //Create and add the clue button if (I[i][2].length > 0){ Btn = ReplaceStuff('[strItemNum]', i + '', ClueButton); ClozeStuff += Btn; } } } //Add the last bit if (Text.length > I.length){ ClozeStuff += Text[Text.length-1]; } //Put the final pieces together OutString = ClozeOpener + ClozeStuff + ClozeCloser + Buttons; BuiltCloze = 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 += ''; OutString += NavBar; OutString += '
'; if (WordBox.length > 0){ OutString += WordBox; } OutString += ''; OutString += BuiltCloze; 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 ShowClue(ItemNum){ //alert(ItemNum); State[ItemNum][0] = 1; WriteFeedback(I[ItemNum][2]); } function SaveCurrentAnswers(){ for (var i=0; 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; } I = new Array(); I[0] = new Array(); I[0][1] = new Array(); I[0][1][0] = new Array(); I[0][1][0][0]='set up'; I[0][2]='set up; set on; sat up; sat on'; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='throughout'; I[1][1][1] = new Array(); I[1][1][1][0]='in'; I[1][2]='from; throughout; into; at'; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='smaller'; I[2][2]='littler; more small; more little; smaller'; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='a little'; I[3][2]='some; more; a few; a little'; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='much'; I[4][2]='much; whole; lot; a lot whole'; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='at the age'; I[5][2]='of the age; at years; at the age; with age'; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='the'; I[6][2]=''; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='college'; I[7][2]='the college; college; a college; colleges'; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='were'; I[8][2]='had; have been; were; was'; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='unluckily'; I[9][2]='if necessary; as if; unluckily; luckily'; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='them'; I[10][2]='them; it; on; so'; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='trouble'; I[11][2]='troubles; problem; trouble; problems'; I[12] = new Array(); I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='if'; I[12][1][1] = new Array(); I[12][1][1][0]='when'; I[12][1][2] = new Array(); I[12][1][2][0]='whenever'; I[12][1][3] = new Array(); I[12][1][3][0]='in case'; I[12][2]='so; whether; if; also'; I[13] = new Array(); I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='took'; I[13][2]='went; took; had; got'; I[14] = new Array(); I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='been'; I[14][2]='had; seem; been; were'; I[15] = new Array(); I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='did'; I[15][2]='made; wrote; did; had'; I[16] = new Array(); I[16][1] = new Array(); I[16][1][0] = new Array(); I[16][1][0][0]='sat'; I[16][2]='sat; sit; sits; sitted'; I[17] = new Array(); I[17][1] = new Array(); I[17][1][0] = new Array(); I[17][1][0][0]='because'; I[17][2]='because; why; how; which'; I[18] = new Array(); I[18][1] = new Array(); I[18][1][0] = new Array(); I[18][1][0][0]='done'; I[18][2]='done; ended; finish; did'; I[19] = new Array(); I[19][1] = new Array(); I[19][1][0] = new Array(); I[19][1][0][0]='their'; I[19][2]='him; hers; their; theirs'; I[20] = new Array(); I[20][1] = new Array(); I[20][1][0] = new Array(); I[20][1][0][0]='us'; I[20][2]='to; for; us; we'; I[21] = new Array(); I[21][1] = new Array(); I[21][1][0] = new Array(); I[21][1][0][0]='So'; I[21][2]='After; Also; When; So'; I[22] = new Array(); I[22][1] = new Array(); I[22][1][0] = new Array(); I[22][1][0][0]='was going'; I[22][2]='goes; was going; will; must'; I[23] = new Array(); I[23][1] = new Array(); I[23][1][0] = new Array(); I[23][1][0][0]='cry'; I[23][2]='cried; cry; crying; to cry'; I[24] = new Array(); I[24][1] = new Array(); I[24][1][0] = new Array(); I[24][1][0][0]='for me'; I[24][2]='that I; for me; I; for I'; I[25] = new Array(); I[25][1] = new Array(); I[25][1][0] = new Array(); I[25][1][0][0]='years'; I[25][2]='years; year; year\'s; years\''; I[26] = new Array(); I[26][1] = new Array(); I[26][1][0] = new Array(); I[26][1][0][0]='by'; I[26][2]='with; when; by; if'; I[27] = new Array(); I[27][1] = new Array(); I[27][1][0] = new Array(); I[27][1][0][0]='that'; I[27][2]='which; that; when; whom'; I[28] = new Array(); I[28][1] = new Array(); I[28][1][0] = new Array(); I[28][1][0][0]='I was doing'; I[28][2]='I was doing; I do; I had done; I was done'; I[29] = new Array(); I[29][1] = new Array(); I[29][1][0] = new Array(); I[29][1][0][0]='than'; I[29][2]='of; than; that; much'; Text = new Array(); Text[0]='In this country (the USA) education is '; Text[1]=' in an interesting way. For example biology and science, and science in general, we learn it three times '; Text[2]=' our education. In elementary school when we are '; Text[3]=' it\'s simple. You take the same subject again in high school and it gets '; Text[4]=' deeper and more detailed. When you get into college it\'s even further detailed and and you have to know '; Text[5]=' more and to perform much better. Now, I went back to college '; Text[6]=' of forty something, I don\'t remember exactly: forty-four, I think. And I had four children. One was out of '; Text[7]=' house married, one was away at '; Text[8]=' and I had the two little ones at home; they '; Text[9]=' about six and seven, seven and eight. And '; Text[10]=' many times they would have school holidays when I didn\'t have a holiday. Colleges don\'t give you many holidays - you just take '; Text[11]=' and then you get in '; Text[12]='. But '; Text[13]=' they were at home and I had to go to school I took them with me. And they '; Text[14]=' part in the classroom. One in particular - my little girl: must\'ve '; Text[15]=' about six, I guess, maybe seven.
Once we were in a music class, and before that she '; Text[16]=' my music homework with me; we were supposed to write a simple song to teach elementary school children; and she '; Text[17]=' with me and wrote the song, also '; Text[18]=' she was familiar with the piano as I was, and we had my homework '; Text[19]='. And I didn\'t know she brought it with her when I took her to college. Now the teacher wanted every student to get up and play '; Text[20]=' song. And he was desperate for help, didn\'t know what to do to make '; Text[21]=' sing, and students were afraid to get up in their own classroom and play their songs. '; Text[22]=' he puts on an act saying he '; Text[23]=' to cry if noone played; but she couldn\'t bear to see him '; Text[24]=', so she said: "don\'t cry, I\'ll do it, I\'ll play for you". And she got up and she played her song. And he was very anxious then '; Text[25]=' to take her to a music teacher immediately for proper lessons, she should have started when she was five '; Text[26]=' old, she should\'ve started before. And she got piano lessons for a long time and almost used it as a career - but you never get rich '; Text[27]=' playing the piano here. So that was the end of the story.
Other things '; Text[28]=' we did were like this. I took them many times. I\'ve pictures with them on campus. A lot of the students knew them, the teachers knew them.
And my children decided to do what '; Text[29]=' and and went to college a lot longer '; Text[30]=' I did. They\'re both doctors now. And so to heck with the piano.'; State = new Array(); function StartUp(){ //Try to get user name UserName = prompt('Please enter your name and ID number',''); UserName += ''; if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ UserName = prompt('Please enter your name and ID number',''); UserName += ''; if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ window.location = PreviousPage; } } var i = 0; State.length = 0; for (i=0; i -1){ var TotalChars = GetGapValue(i).length; State[i][3] = (TotalChars-State[i][1])/TotalChars; if (State[i][0] > 0){State[i][3] = State[i][3]/2;} if (State[i][3]<0){State[i][3] = 0;} State[i][4] = 1; } else{ //Otherwise, add zero to the array and increment the hints for this item, as a penalty State[i][1]++; State[i][3] = 0; //then set the flag AllCorrect = 0; } } } //Calculate the total score var TotalScore = 0; for (i=0; i'; } Output += YourScoreIs + ' ' + TotalScore + '%.
'; if (AllCorrect == 0){ Output += '
' + Incorrect; } BuildExercise(); WriteFeedback(Output); if (AllCorrect==1){ setTimeout('SendResults(' + TotalScore + ')', 50); return; } DisplayExercise(); RestoreCurrentAnswers(); } function TrackFocus(BoxNumber){ CurrentWord = BoxNumber; } function CheckBeginning(Guess, Answer){ var OutString = ''; var i = 0; var UpperGuess = ''; var UpperAnswer = ''; if (CaseSensitive == false) { UpperGuess = Guess.toUpperCase(); UpperAnswer = Answer.toUpperCase(); } else { UpperGuess = Guess; UpperAnswer = Answer; } while (UpperGuess.charAt(i) == UpperAnswer.charAt(i)) { OutString += Guess.charAt(i); i++; } OutString += Answer.charAt(i); return OutString; } function FindLongest(InArray){ if (InArray.length < 1){return -1;} var Longest = 0; for (var i=1; i InArray[Longest].length){ Longest = i; } } return Longest; } function GetGapValue(GNum){ var RetVal = ''; if ((GNum<0)||(GNum>=I.length)){return RetVal;} if (eval('BottomFrame.document.Cloze.Gap' + GNum) != null){ RetVal = eval('BottomFrame.document.Cloze.Gap' + GNum).value; RetVal = TrimString(RetVal); } else{ RetVal = State[GNum][5]; } return RetVal; } function SetGapValue(GNum, Val){ if ((GNum<0)||(GNum>=I.length)){return;} if (eval('BottomFrame.document.Cloze.Gap' + GNum) != null){ eval('BottomFrame.document.Cloze.Gap' + GNum).value = Val; } } function FindCurrent() { var x = 0; FoundCurrent = -1; //Test the current word: //If it's state is not set to already correct, check the word. if (State[CurrentWord][4] != 1){ if (CheckAnswer(CurrentWord, false) < 0){ return CurrentWord; } } x=CurrentWord + 1; while (x -1){return ''} RightBits = new Array(); for (var i=0; i 0){ SetGapValue(CurrGap, HintString); State[CurrGap][1] = State[CurrGap][1] + 1; } WriteFeedback(GiveHint); } 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 Blank(){ return '
©Half-Baked Software. Loading...
'; } //--> //]]>
-->