'; 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]='fredda'; I[0][1][1] = new Array(); I[0][1][1][0]='rigida'; I[0][1][2] = new Array(); I[0][1][2][0]='bassa'; I[0][2]=''; I[1] = new Array(); I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='alza'; I[1][2]=''; I[2] = new Array(); I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='aumenta'; I[2][1][1] = new Array(); I[2][1][1][0]='sale'; I[2][2]=''; I[3] = new Array(); I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='modesta'; I[3][1][1] = new Array(); I[3][1][1][0]='moderata'; I[3][1][2] = new Array(); I[3][1][2][0]='bassa'; I[3][1][3] = new Array(); I[3][1][3][0]='poca'; I[3][2]=''; I[4] = new Array(); I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='aumentano'; I[4][2]=''; I[5] = new Array(); I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='l\'escursione termica'; I[5][2]=''; I[6] = new Array(); I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='meridionale'; I[6][2]=''; I[7] = new Array(); I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='media'; I[7][2]=''; I[8] = new Array(); I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='montagna'; I[8][2]=''; I[9] = new Array(); I[9][1] = new Array(); I[9][1][0] = new Array(); I[9][1][0][0]='media'; I[9][2]=''; I[10] = new Array(); I[10][1] = new Array(); I[10][1][0] = new Array(); I[10][1][0][0]='\u00E8 lontana dal mare'; I[10][1][1] = new Array(); I[10][1][1][0]='\u00E8 distante dal mare'; I[10][1][2] = new Array(); I[10][1][2][0]='non si trova sul mare'; I[10][2]=''; I[11] = new Array(); I[11][1] = new Array(); I[11][1][0] = new Array(); I[11][1][0][0]='abbondante'; I[11][1][1] = new Array(); I[11][1][1][0]='grande'; I[11][1][2] = new Array(); I[11][1][2][0]='grossa'; I[11][1][3] = new Array(); I[11][1][3][0]='tanta'; I[11][2]=''; I[12] = new Array(); I[12][1] = new Array(); I[12][1][0] = new Array(); I[12][1][0][0]='regolare'; I[12][1][1] = new Array(); I[12][1][1][0]='costante'; I[12][1][2] = new Array(); I[12][1][2][0]='omogeneo'; I[12][1][3] = new Array(); I[12][1][3][0]='uniforme'; I[12][2]=''; I[13] = new Array(); I[13][1] = new Array(); I[13][1][0] = new Array(); I[13][1][0][0]='caldo'; I[13][2]=''; I[14] = new Array(); I[14][1] = new Array(); I[14][1][0] = new Array(); I[14][1][0][0]='tirrenica'; I[14][1][1] = new Array(); I[14][1][1][0]='del Tirreno'; I[14][1][2] = new Array(); I[14][1][2][0]='del mar Tirreno'; I[14][2]=''; I[15] = new Array(); I[15][1] = new Array(); I[15][1][0] = new Array(); I[15][1][0][0]='adriatica'; I[15][1][1] = new Array(); I[15][1][1][0]='dell\'Adriatico'; I[15][1][2] = new Array(); I[15][1][2][0]='dell\'adriatico'; I[15][1][3] = new Array(); I[15][1][3][0]='del mar Adriatico'; I[15][2]=''; I[16] = new Array(); I[16][1] = new Array(); I[16][1][0] = new Array(); I[16][1][0][0]='nord'; I[16][1][1] = new Array(); I[16][1][1][0]='nord-est'; I[16][1][2] = new Array(); I[16][1][2][0]='nordest'; I[16][1][3] = new Array(); I[16][1][3][0]='Nord'; I[16][2]=''; I[17] = new Array(); I[17][1] = new Array(); I[17][1][0] = new Array(); I[17][1][0][0]='corrente del golfo'; I[17][1][1] = new Array(); I[17][1][1][0]='corrente del golfo del Messico'; I[17][2]=''; Text = new Array(); Text[0]='Se una localit\u00E0 di montagna \u00E8 esposta a Nord, la temperatura \u00E8 pi\u00F9 '; Text[1]='.
Se diminuisce l\'altitudine, la temperatura si '; Text[2]='.
Se ci avviciniamo all\'equatore, la temperatura '; Text[3]='.
Se una localit\u00E0 si trova sul mare, l\'escursione termica \u00E8 '; Text[4]='.
Se aumenta l\'altitudine, le precipitazioni '; Text[5]='
Se una localit\u00E0 \u00E8 lontana dal mare, '; Text[6]='
aumenta.
Il versante '; Text[7]=' di una montagna \u00E8 pi\u00F9 caldo del versante settentrionale.
Gran parte dell\'Europa ha un clima temperato perch\u00E9 si trova ad una '; Text[8]=' latitudine.
Il clima \u00E8 freddo in Europa o nelle zone di '; Text[9]=' o nelle zone vicino al polo nord.
A Milano il clima \u00E8 temperato continentale, temperato perch\u00E9 Milano si trova ad una '; Text[10]=' latitudine, continentale perch\u00E9 '; Text[11]='.
I fiumi atlantici hanno portata '; Text[12]=' e regime '; Text[13]=' per via delle precipitazioni recate dai venti occidentali.
Il clima marittimo mediterraneo \u00E8 pi\u00F9 '; Text[14]=' del clima marittimo atlantico.
In Italia la costa '; Text[15]=' ha precipitazioni maggiori ed una temperatura pi\u00F9 elevata rispetto alla costa '; Text[16]=' perch\u00E9 \u00E8 protetta dalle montagne delle Alpi e degli Appennini.
Sull\'Europa centro-orientale soffiano venti freddi e secchi provenienti da '; Text[17]='
Sulle coste della Scandinavia la temperatura \u00E8 meno fredda a causa della '; Text[18]=' '; 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...
'; } //--> //]]>
-->