'; //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]='mobile'; I[0][2]=''; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='Cavalry'; I[1][2]=''; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='machine'; I[2][2]=''; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='wire'; I[3][2]=''; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='trenches'; I[4][2]=''; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='collapse'; I[5][2]=''; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='deeper'; I[6][2]=''; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='alarm'; I[7][2]=''; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='bags'; I[8][2]=''; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='straight'; I[9][2]=''; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='communication'; I[10][2]=''; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='more'; I[11][2]=''; I[12] = new Array(); I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='telephone'; I[12][2]=''; I[13] = new Array(); I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='Gas'; I[13][2]=''; I[14] = new Array(); I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='artillery'; I[14][2]=''; I[15] = new Array(); I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='mobile'; I[15][2]=''; Text = new Array(); Text[0]='At the outbreak of war, all participants were expecting a short, '; Text[1]=' war. '; Text[2]=' units were held in reserve ready to rush through and exploit any holes in the enemy\'s defences. World War One was not to follow the intended script. In 1914, advancing German soldiers were gradually slowed down by a combination of '; Text[3]=' guns, barbed '; Text[4]=', artillery and '; Text[5]='. This lethal combination would give a decisive advantage to the defender.

The first attempts at trench construction were rather hurriedly done. They lacked specialist tools and engineers who were experienced in building them. These hastily constructed defences were prone to flooding and could '; Text[6]=' if enemy shells fell nearby. However, they still managed to achieve their objective: they provided shelter for defending troops and made it much more dangerous for any attacking soldiers who had to advance towards them.

As the front line stabilised at the end of 1914, trench construction would gradually become more elaborate and sophisticated. Trenches would become '; Text[7]=' and dug outs would be provided to allow soldiers to eat, drink and sleep closer to the front line.

Trench construction was an arduous task. On average, it would take 450 men six hours to build a section of 250 yards of trench. They would then have to add the paraphernalia of other materials; barbed wire, board walks, '; Text[8]=' bells and sand '; Text[9]=' to prevent the sides from collapsing. Space had to be found for stores, first aid posts, communications equipment and headquarters posts. The trenches were never built in '; Text[10]=' lines. They were usually zig zagged in order to stop enemy troops who had entered a trench system from firing down the length of the trench line.

Over time, '; Text[11]=' and support trenches were added. These would allow for reserves to be brought up to the front line in relative safety. They could also allow for secondary lines of defences for troops to fall back to if necessary.

After their initial successes and territorial gains in early 1914, the Germans took a much more defensive stature than the Allied forces did. Consequently, German trench systems would tend to be far '; Text[12]=' sophisticated and well-equipped than their Allied equivalent trenches. German forces would occasionally build elaborate trench systems in their rear areas and would deliberately retreat back into them. The Allied forces would advance into ground that the Germans felt was difficult to defend and had cleared.

The specially constructed German trenches could have been built with concrete and have had electricity, '; Text[13]=' lines and relatively roomy accomodation. The British and French forces meanwhile, would have had to make do with constructing a new trench system in range of German forces.

Artillery and machine guns could do little to forces hiding in their deep dugouts. Only a direct hit from the largest calibre guns would have had any chance of destroying a dug out. However, the one weapon that did provide a threat to the Trench defensive system was that of Mustard '; Text[14]='. Being heavier than air, it would force soldiers out of the relative safety of their trenches. Unfortunately for military planners, the poisonous gas was at the mercy of the wind and gas was as likely to clear a side\'s own trenches as it was the enemy\'s.

It was the German army who came up with the first really effective force for dealing with Trench defences. These Stormtrooper units were basically tough, self-reliant infantry who carried their own machine guns, mortars and flame throwers with them. They would coordinate their attacks with '; Text[15]=' and would often advance behind a creeping barrage. They looked to exploit gaps and would try and avoid serious opposition. They looked to cause havoc in the communication and support trenches. In 1918, these tactics proved decisive in breaking through the Allied Trench system. It was only when the German troops were out of their trenches that the Allies could counter attack and push the German forces back towards Germany. Having fought in trenches for four long years, the final months of the war were remarkably '; Text[16]='.
'; 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... '; } //--> //]]> -->