-->
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]='lives'; I[0][1][1] = new Array(); I[0][1][1][0]='LIVES'; I[0][1][2] = new Array(); I[0][1][2][0]='Lives'; I[0][2]='Steve lives in Amman.'; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='has'; I[1][1][1] = new Array(); I[1][1][1][0]='HAS'; I[1][1][2] = new Array(); I[1][1][2][0]='Has'; I[1][2]='Ronaldo has 2 children.'; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='gets up'; I[2][1][1] = new Array(); I[2][1][1][0]='GETS UP'; I[2][1][2] = new Array(); I[2][1][2][0]='Gets Up'; I[2][2]='Steve gets up at 7:00 everyday.'; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='eats'; I[3][1][1] = new Array(); I[3][1][1][0]='EATS'; I[3][1][2] = new Array(); I[3][1][2][0]='Eats'; I[3][2]='Mohamad eats bread and meat for breakfast.'; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='drinks'; I[4][1][1] = new Array(); I[4][1][1][0]='DRINKS'; I[4][1][2] = new Array(); I[4][1][2][0]='Drinks'; I[4][2]='Steve drinks juice.'; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='has'; I[5][1][1] = new Array(); I[5][1][1][0]='HAS'; I[5][1][2] = new Array(); I[5][1][2][0]='Has'; I[5][2]='Steve has a small car.'; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='drives'; I[6][1][1] = new Array(); I[6][1][1][0]='DRIVES'; I[6][1][2] = new Array(); I[6][1][2][0]='Drives'; I[6][2]='Alia drives to work.'; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='leaves'; I[7][2]='leaves = goes out'; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='arrives'; I[8][2]='Alia arrives at work at 8:00.'; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='works'; I[9][2]='Steve works at the British Council.'; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='sells'; I[10][2]='John sells cars.'; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='leaves'; I[11][2]='Steve leaves the British Council at 8:30 at night.'; I[12] = new Array(); I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='teaches'; I[12][2]='Steve teaches his students.'; I[13] = new Array(); I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='watches'; I[13][2]='Alia watches JTV.'; I[14] = new Array(); I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='eats'; I[14][2]='John eats pizza for dinner.'; I[15] = new Array(); I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='loves'; I[15][2]='Steve loves the British Council.'; I[16] = new Array(); I[16][1] = new Array(); I[16][1][0] = new Array(); I[16][1][0][0]='doesn\'t work'; I[16][2]='Mohamad doesn\'t work on Friday.'; I[17] = new Array(); I[17][1] = new Array(); I[17][1][0] = new Array(); I[17][1][0][0]='goes'; I[17][2]='He goes ...'; I[18] = new Array(); I[18][1] = new Array(); I[18][1][0] = new Array(); I[18][1][0][0]='plays'; I[18][2]='Steve plays tennis.'; I[19] = new Array(); I[19][1] = new Array(); I[19][1][0] = new Array(); I[19][1][0][0]='loves'; I[19][2]=''; Text = new Array(); Text[0]='Ahmad '; Text[1]=' in Zerqa. He is married. He '; Text[2]=' 5 children.

He '; Text[3]=' at 5:30 everyday. He '; Text[4]=' bread and cheese for breakfast. He '; Text[5]=' tea. He '; Text[6]=' a Merecedes car. He usually '; Text[7]=' to work. He '; Text[8]=' home at 7:00. He '; Text[9]=' at work at 8:15. He '; Text[10]=' in a shop in the centre of Amman. He '; Text[11]=' computers.

He '; Text[12]=' the office at 2:30 and goes home. At home he '; Text[13]=' his children and '; Text[14]=' football on TV. He '; Text[15]=' dinner with his wife and children at 8:00. He '; Text[16]=' mansaaf.

On Friday he '; Text[17]='. He '; Text[18]=' to the mosque in the morning. In the afternoon, he '; Text[19]=' football with his children. Ahmed is a very happy man because he '; Text[20]=' his job and his family.



'; 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...'; } //--> //]]>