'; //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]='5,000'; I[0][1][1] = new Array(); I[0][1][1][0]=''; I[0][1][2] = new Array(); I[0][1][2][0]=''; I[0][1][3] = new Array(); I[0][1][3][0]=''; I[0][1][4] = new Array(); I[0][1][4][0]='Five thousand'; I[0][2]='A number'; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='chop down'; I[1][1][1] = new Array(); I[1][1][1][0]='cut down'; I[1][2]='How do you remove trees'; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='firewood'; I[2][2]='People used this to keep themselves warm'; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='hunters'; I[3][2]='People who try to kill animals for food'; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='gatherers'; I[4][2]='People who collect nuts and berries for food'; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='homes'; I[5][2]='Somewhere to live'; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='granite'; I[6][2]='The hard stone found all over Dartmoor'; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='circles'; I[7][2]='What shape is this?'; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='pray'; I[8][2]='How do you communicate with gods?'; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='marriage'; I[9][2]='When two people join together to form a family'; Text = new Array(); Text[0]='About '; Text[1]=' years ago, farming was introduced to Dartmoor. Land was now needed to grow crops. It seems as if the Neolithic farmers started farming on the open clearings on the higher ground. However, these openings would soon run out of space. The farmers would then either '; Text[2]=' neighbouring trees or would start fires to clear large amounts of area quickly. Farmers would also need wood for '; Text[3]=' in the winter, to use for building or for tools. The pressure on the trees was very great. The large forests were broken up into smaller and smaller clumps of trees.

Farmers do not move around as much as '; Text[4]=' and '; Text[5]='. Therefore, these farmers built themselves '; Text[6]='. These were usually made of the '; Text[7]=' stone that is so plentiful on Dartmoor. The remains of many of these can still be seen today on Dartmoor. They also built themselves stone '; Text[8]=' and burial mounds. It is not known why they made these stone circles. Possibly, they were used for places to '; Text[9]=' to the gods of nature to help the farmers\' crops grow, or to thank them after a good harvest. They could also have been used for '; Text[10]=' or death ceremonies. It seems as if death was very important to Neolithic man - It seems as if they spent a lot of time and effort building their burial mounds. '; 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... '; } //--> //]]> -->