'; //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]='Germany'; I[0][2]=''; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='Wilhelm'; I[1][2]=''; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='Bismarck'; I[2][2]=''; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='Reichstag'; I[3][2]=''; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='foreign'; I[4][2]=''; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='Austria-Hungary'; I[5][1][1] = new Array(); I[5][1][1][0]='Austro-Hungary'; I[5][1][2] = new Array(); I[5][1][2][0]='Austria Hungary'; I[5][2]=''; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='Hapsburg'; I[6][1][1] = new Array(); I[6][1][1][0]='Habsburg'; I[6][2]=''; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='Italy'; I[7][2]=''; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='Adowa'; I[8][2]=''; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='allies'; I[9][1][1] = new Array(); I[9][1][1][0]='Allies'; I[9][1][2] = new Array(); I[9][1][2][0]='Allied Nations'; I[9][2]=''; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='Turkey'; I[10][2]=''; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='Bulgaria'; I[11][2]=''; Text = new Array(); Text[0]='On the side of the Central Powers, '; Text[1]=' was far and away the dominant partner. The industrial state had expanded rapidly at the end of the nineteenth and beginning of the twentieth centuries. Its peoples were hard working, conscientious and patriotic. Kaiser '; Text[2]=' II had taken over from his successful father in 1888. Wilhelm was an ambitious leader who was keen to see Germany take its rightful place on the world stage. His aggressive foreign policy stance saw the resignation of the almost universally admired chancellor and diplomat Otto von '; Text[3]=' in 1890. The '; Text[4]=' (German Parliament) could exert considerable influence on Wilhelm and his Chancellor if it wanted to, however it tended to concentrate its power on domestic issues and pretty much left Wilhelm alone to pursue his overseas ambitions. Wilhelm took most of the important '; Text[5]=' policy decisions until the outbreak of the war.

'; Text[6]=' was very much the junior power to its German neighbour to the north. Despite having a very long history, the ruling house of '; Text[7]=' ruled over a fractious conglomeration of small nations. Slavs, germans, muslims, catholics, orthodox Christians were all under the same umbrella nation. These nationalities were as likely to fight each other or to fight against their overlords as they were to fight against any external threats. This fractured empire was much weaker than its size and reputation would have the other European powers believe.

Technically, '; Text[8]=' was a member of the Triple Alliance from 1882. They had only united into a single country in 1859. It was therefore a relatively weak and inexperienced player on the international scene. It got itself into an awful mess in its colonies in 1896. An Italian army was defeated by a native Ethiopian army at the Battle of '; Text[9]='. For a modern European army to be defeated by a native army was extremely embarrassing for the young nation. In the end, Italy joined the '; Text[10]=' in 1915.

Before the outbreak of the war, Germany had also spent diplomatic energy on creating good relations with '; Text[11]='. This effort was ultimately repaid in October 1914, when the Ottomans confirmed that they would join with the Central Powers. Likewise, '; Text[12]=', seeing the imminent defeat of Serbia, joined with the Central Powers in October 1915.'; 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... '; } //--> //]]> -->