Site hosted by Angelfire.com: Build your free website today!
'; 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]='had'; I[0][1][1] = new Array(); I[0][1][1][0]='had'; I[0][2]='They had a holiday.'; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='got up'; I[1][1][1] = new Array(); I[1][1][1][0]='got up'; I[1][2]='Ali got up at 7:00'; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='took'; I[2][1][1] = new Array(); I[2][1][1][0]='Took'; I[2][2]='Heba took a bus to work.'; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='bought'; I[3][1][1] = new Array(); I[3][1][1][0]='BOUGHT'; I[3][2]='Yusef bought a car.'; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='left'; I[4][1][1] = new Array(); I[4][1][1][0]='Left'; I[4][2]='We left the house at 10:00'; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='arrived'; I[5][1][1] = new Array(); I[5][1][1][0]='Arrived'; I[5][2]='Rania arrived at 10:30.'; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='walked'; I[6][1][1] = new Array(); I[6][1][1][0]='Walked'; I[6][2]='John walked to the office.'; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='ate'; I[7][1][1] = new Array(); I[7][1][1][0]='Ate'; I[7][2]='Adel ate meat.'; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='drank'; I[8][2]='Nehad drank tea.'; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='was'; I[9][2]='The food was hot.'; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='went'; I[10][1][1] = new Array(); I[10][1][1][0]='Went'; I[10][2]='Christeen went shopping.'; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='bought'; I[11][1][1] = new Array(); I[11][1][1][0]='Bought'; I[11][2]='Julia bought a new computer.'; I[12] = new Array(); I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='went'; I[12][1][1] = new Array(); I[12][1][1][0]='Went'; I[12][2]='Kaled went to the office.'; I[13] = new Array(); I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='was'; I[13][1][1] = new Array(); I[13][1][1][0]='Was'; I[13][2]='The weather was cold.'; I[14] = new Array(); I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='swam'; I[14][1][1] = new Array(); I[14][1][1][0]='Swam'; I[14][2]='He swam in the pool.'; I[15] = new Array(); I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='played'; I[15][1][1] = new Array(); I[15][1][1][0]='Played'; I[15][2]='She played tennis.'; I[16] = new Array(); I[16][1] = new Array(); I[16][1][0] = new Array(); I[16][1][0][0]='didn\'t play'; I[16][1][1] = new Array(); I[16][1][1][0]='Didn\'t play'; I[16][2]='Hanan didn\'t play football.'; I[17] = new Array(); I[17][1] = new Array(); I[17][1][0] = new Array(); I[17][1][0][0]='talked'; I[17][1][1] = new Array(); I[17][1][1][0]='Talked'; I[17][2]='She talked to her friend.'; I[18] = new Array(); I[18][1] = new Array(); I[18][1][0] = new Array(); I[18][1][0][0]='got'; I[18][1][1] = new Array(); I[18][1][1][0]='Got'; I[18][2]='We got on the train.'; I[19] = new Array(); I[19][1] = new Array(); I[19][1][0] = new Array(); I[19][1][0][0]='returned'; I[19][1][1] = new Array(); I[19][1][1][0]='Returned'; I[19][2]='I returned to London.'; I[20] = new Array(); I[20][1] = new Array(); I[20][1][0] = new Array(); I[20][1][0][0]='was'; I[20][1][1] = new Array(); I[20][1][1][0]='Was'; I[20][2]='Everyone was happy.'; I[21] = new Array(); I[21][1] = new Array(); I[21][1][0] = new Array(); I[21][1][0][0]='enjoyed'; I[21][1][1] = new Array(); I[21][1][1][0]='Enjoyed'; I[21][2]='Jenna enjoyed her holiday.'; Text = new Array(); Text[0]='Hanan and her family '; Text[1]=' a holiday. They '; Text[2]=' at 5 o\'clock and '; Text[3]=' a taxi to the bus station. At the bus station they '; Text[4]=' tickets for Aqaba. The bus '; Text[5]=' at 6:15. They '; Text[6]=' in Aqaba at 10 o\'clock.

Hanan and her family '; Text[7]=' to a restaurant. They '; Text[8]=' fish and '; Text[9]=' orange juice. The food '; Text[10]=' delicious. Then they '; Text[11]=' shopping. They '; Text[12]=' new shoes and shirts. At 3:00 they '; Text[13]=' to the beach. The view '; Text[14]=' beautiful. They '; Text[15]=' in the sea. Hanan\'s brothers '; Text[16]=' football, but Hanan '; Text[17]=' football. She '; Text[18]=' to her mother.

At 6:30 they '; Text[19]=' back on the bus and '; Text[20]=' to Amman. Everyone '; Text[21]=' tired and happy. They really '; Text[22]=' their holiday.
'; State = new Array(); function StartUp(){ 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); 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 Blank(){ return '©Half-Baked Software. Loading...'; } //--> //]]>