'; ReadingText+=' 

 <'; ReadingText+='/o:p>

Trovare i seguenti limiti:'; ReadingText+='

'; ReadingText+=' 

'; if (is.CRAPBrowser){ReadingText=ResolveAllURLs(ReadingText);} var NavBar=''; var TitleCode = ''; TitleCode += '' + ExerciseTitle + '
'; TitleCode += '' + ExerciseSubtitle + '
'; TitleCode += '
'; var QButtonsOpener = ''; QButtonsOpener += '
'; QButtonsOpener += ''; var QButtonsCloser = ''; QButtonsCloser += '
'; var TableOpener = ''; var QRow = ''; QRow += ''; QRow += ''; var ARow = ''; var BtnRow = ''; TableCloser = '
'; QRow += '[QNumber]   [Question]
 '; QRow += '
'; ARow += '[AnswerBox]
'; BtnRow += ''; BtnRow += ''; BtnRow += '
'; var LongAnswer = ''; var ShortAnswer = ''; function GoBack(){ var BackSkip = history.length - PreviousPage; if (BackSkip > 0){ history.go((BackSkip+1)*-1); } else{ parent.history.back(); } } function TrapReturn(ShowHint,QNum){ //if not yet answered correctly, call CheckAnswer if (Status[QNum][0] < 1){ CheckAnswer(ShowHint,QNum); return; } //otherwise, move on to the next question if showing serially else{ if (ShowOneByOne == true){ setTimeout('ChangeQ(1)', 50); } } } function ReduceItems(){ var ItemToDump=0; var j=0; while (I.length > QsToShow){ ItemToDump = Math.floor(I.length*Math.random()); for (j=ItemToDump; j<(I.length-1); j++){ I[j] = I[j+1]; } I.length = I.length-1; } } function Shuffle(InArray){ Temp = new Array(); var Len = InArray.length; var j = Len; for (var i=0; i
'; 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 StartUp(){ //Write the top frame WriteFeedback(Instructions); if ((is.mac)&&(is.ns)) { FocusBoxes = false; } //Reduce array if required if (QsToShow < I.length){ ReduceItems(); } //Shuffle stuff if required if (ShuffleQs == true){ I = Shuffle(I); } //Create arrays CreateStatusArrays(); ShowReading(); //Show the first question or all of them if (ShowOneByOne == false){ ShowAllQs(); } else{ ShowQuestion(CurrQNum); } //Focus the first box var Box = eval('BottomFrame.document.QForm0.Guess'); if (Box != null){ Box.focus(); } } I = new Array(); I[0] = new Array(); I[0][0]='Il limite della funzione n.1 è:'; I[0][1] = new Array(); I[0][1][0] = new Array(); I[0][1][0][0]='1/11'; I[0][1][1] = new Array(); I[0][1][1][0]='UN UNDICESIMO'; 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]=''; I[0][1][5] = new Array(); I[0][1][5][0]=''; I[0][1][6] = new Array(); I[0][1][6][0]=''; I[0][1][7] = new Array(); I[0][1][7][0]=''; I[0][1][8] = new Array(); I[0][1][8][0]='9'; I[1] = new Array(); I[1][0]='Il limite della funzione n. 2 è:'; I[1][1] = new Array(); I[1][1][0] = new Array(); I[1][1][0][0]='0'; I[1][1][1] = new Array(); I[1][1][1][0]='ZERO'; I[2] = new Array(); I[2][0]='Il limite della funzione n.3 è:'; I[2][1] = new Array(); I[2][1][0] = new Array(); I[2][1][0][0]='5'; I[2][1][1] = new Array(); I[2][1][1][0]='CINQUE'; I[3] = new Array(); I[3][0]='Il limite della funzione n.4 è:'; I[3][1] = new Array(); I[3][1][0] = new Array(); I[3][1][0][0]='8/11'; I[3][1][1] = new Array(); I[3][1][1][0]='OTTO UNDICESIMI'; I[4] = new Array(); I[4][0]='Il limite della funzione n.5 è:'; I[4][1] = new Array(); I[4][1][0] = new Array(); I[4][1][0][0]='0'; I[4][1][1] = new Array(); I[4][1][1][0]='ZERO'; I[4][1][2] = new Array(); I[4][1][2][0]=''; I[4][1][3] = new Array(); I[4][1][3][0]=''; I[4][1][4] = new Array(); I[4][1][4][0]='5'; I[5] = new Array(); I[5][0]='Il limite della funzione n.6 è:'; I[5][1] = new Array(); I[5][1][0] = new Array(); I[5][1][0][0]='3'; I[5][1][1] = new Array(); I[5][1][1][0]='TRE'; I[5][1][2] = new Array(); I[5][1][2][0]=''; I[5][1][3] = new Array(); I[5][1][3][0]=''; I[5][1][4] = new Array(); I[5][1][4][0]=''; I[5][1][5] = new Array(); I[5][1][5][0]='6'; I[6] = new Array(); I[6][0]='Il limite della funzione n.7 è:'; I[6][1] = new Array(); I[6][1][0] = new Array(); I[6][1][0][0]='2'; I[6][1][1] = new Array(); I[6][1][1][0]='DUE'; I[6][1][2] = new Array(); I[6][1][2][0]=''; I[6][1][3] = new Array(); I[6][1][3][0]=''; I[6][1][4] = new Array(); I[6][1][4][0]=''; I[6][1][5] = new Array(); I[6][1][5][0]=''; I[6][1][6] = new Array(); I[6][1][6][0]='7'; I[7] = new Array(); I[7][0]='Il limite della funzione n.8 è:'; I[7][1] = new Array(); I[7][1][0] = new Array(); I[7][1][0][0]='0'; I[7][1][1] = new Array(); I[7][1][1][0]='ZERO'; I[7][1][2] = new Array(); I[7][1][2][0]=''; I[7][1][3] = new Array(); I[7][1][3][0]=''; I[7][1][4] = new Array(); I[7][1][4][0]=''; I[7][1][5] = new Array(); I[7][1][5][0]=''; I[7][1][6] = new Array(); I[7][1][6][0]=''; I[7][1][7] = new Array(); I[7][1][7][0]='8'; I[8] = new Array(); I[8][0]='Il limite della funzione n.9 è:'; I[8][1] = new Array(); I[8][1][0] = new Array(); I[8][1][0][0]='1/3'; I[8][1][1] = new Array(); I[8][1][1][0]='UN TERZO'; Status = new Array(); function CreateStatusArrays(){ Status.length = 0; for (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; } function ChangeQ(ChangeBy){ var NewNum = CurrQNum + ChangeBy; if ((NewNum >= 0)&&(NewNum Longest){ Longest = I[QNum][1][i][0].length; } } var AnsBox = ''; if (Longest > 20){ AnsBox = LongAnswer; } else{ AnsBox = ReplaceStuff('[AnswerSize]', (Longest + ''), ShortAnswer); } var AnsRow = ReplaceStuff('[AnswerBox]', AnsBox, ARow); Temp += AnsRow; Temp += BtnRow; Temp = ReplaceStuff('[QNumber]', QNum+1, Temp); Temp = ReplaceStuff('[QNum]', QNum, Temp); return Temp; } function DisplayExercise(StuffToDisplay){ //Build the output string var OutString = ''; OutString += ''; OutString += '
'; OutString += '
'; OutString += TitleCode; OutString += ''; OutString += NavBar; OutString += '
'; OutString += ''; OutString += StuffToDisplay; 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 ShowAllQs(){ var Output = ''; for (var i=0; i
'; } Output = Output + BuildQuestion(I.length-1); Output = TableOpener + Output + TableCloser; DisplayExercise(Output); } function ShowQuestion(QNum){ //First, create the Q number readout at the top var Readout = (QNum+1) + '/' + I.length; while (Readout.length < 7){ Readout = ' ' + Readout + ' '; } Readout = QButtonsOpener + Readout + QButtonsCloser; var Output = BuildQuestion(QNum); Output = TableOpener + Output + TableCloser; DisplayExercise(Readout + Output); //Replace the student's answer var Box = eval('BottomFrame.document.QForm' + QNum + '.Guess'); if (Box != null){ if (Status[QNum][3].length > 0){ Box.value = Status[QNum][3]; } Box.focus(); } } var LowerString='abcdefghijklmnopqrstuvwxyz%9A%9C%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9%EA%EB%EC%ED%EE%EF%F0%F1%F2%F3%F4%F5%F6%F8%F9%FA%FB%FC%FD%FE%FF'; var UpperString='ABCDEFGHIJKLMNOPQRSTUVWXYZ%8A%8C%C0%C1%C2%C3%C4%C5%C6%C7%C8%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D8%D9%DA%DB%DC%DD%DE%9F'; LowerString = unescape(LowerString); UpperString = unescape(UpperString); function ConvertCase(InString, Direction){ var FromString = ''; var ToString = ''; if (Direction == 0){ FromString = UpperString; ToString = LowerString; } else{ FromString = LowerString; ToString = UpperString; } var i = 0; j = 0; var OutString = ''; for (i=0; i -1){ j = FromString.indexOf(InString.charAt(i)); OutString += ToString.charAt(j); } else{ OutString += InString.charAt(i); } } return OutString; } function TrimString(InString){ var x = 0 if (InString.length != 0) { while ((escape(InString.charAt(InString.length - 1)) == '%20') || (escape(InString.charAt(InString.length - 1)) == '%0A') || (escape(InString.charAt(InString.length - 1)) == '%0D')){ InString = InString.substring(0, InString.length - 1) } while ((escape(InString.charAt(0)) == '%20') || (escape(InString.charAt(0)) == '%0A') || (escape(InString.charAt(0)) == '%0D')){ InString = InString.substring(1, InString.length) } while (InString.indexOf(' ') != -1) { x = InString.indexOf(' ') InString = InString.substring(0, x) + InString.substring(x+1, InString.length ) } return InString } else { return '' } } function RemovePunctuation(InString){ var OutString = ''; for (i=0; i InArray[Longest].length){ Longest = i; } } return Longest; } function CheckWords(Guess, Answer){ var Start = 0; var End = 0; var LoopCounter = 0; var ReturnList = ''; var i = 0; var j = 0; GuessWords = new Array(); AnswerWords = new Array(); Guess = RemovePunctuation(Guess); Answer = RemovePunctuation(Answer); while (Guess.indexOf(' ', Start) > -1) { End = Guess.indexOf(' ', Start); GuessWords[LoopCounter] = ConvertCase(Guess.substring(Start, End), 0); LoopCounter++; Start = End + 1; } GuessWords[LoopCounter] = ConvertCase(Guess.substring(Start, Guess.length), 0); Start = 0; LoopCounter = 0; while (Answer.indexOf(' ', Start) > -1) { End = Answer.indexOf(' ', Start); AnswerWords[LoopCounter] = Answer.substring(Start, End); LoopCounter++; Start = End + 1; } AnswerWords[LoopCounter] = Answer.substring(Start, Answer.length); ReturnList = ''; for (i = 0; i < GuessWords.length; i++){ for (j = 0; j < AnswerWords.length; j++){ if (GuessWords[i] == ConvertCase(AnswerWords[j], 0)){ ReturnList = ReturnList + AnswerWords[j] + ', ' ; AnswerWords[j] = ''; break; } } } if (ReturnList.length > 0){ ReturnList = ReturnList.substring(0, ReturnList.length - 2); } return ReturnList; } function CalculateScore(){ Score = 0; var DoneQs = 0; for (i=0; i';}; } if (Right > -1){ Status[QNum][0] = 1; Output = CorrectResponse + ' '; if (OtherAnswers.length > 0){ Output += TheseAnswersToo + '
' + OtherAnswers; } //Get the score for this question var HintPenalty = (Status[QNum][2]*10)/CorrectAs[Right].length; Status[QNum][4] = Math.floor((10 - Status[QNum][1]) - HintPenalty); //Check whether the quiz is finished var Finished = true; for (var i=0; i 0){ CorrectBits[0][i] = RealAs[i].substring(0,CorrectBits[0][i].length); } CorrectBits[1][i] = CheckEnd(Guess, CorrectAs[i]); if (CorrectBits[1][i].length > 0){ CorrectBits[1][i] = RealAs[i].substring(RealAs[i].length-CorrectBits[1][i].length,RealAs[i].length); } CorrectBits[2][i] = CorrectBits[0][i] + ' ... ' + CorrectBits[1][i]; CorrectBits[3][i] = CorrectBits[0][i] + RealAs[i].charAt(CorrectBits[0][i].length); if (CorrectBits[3][i].charAt(CorrectBits[3][i].length-1) == ' '){ CorrectBits[3][i] += RealAs[i].charAt(CorrectBits[3][i].length); } CorrectBits[3][i] += '...' } var LongestCorrect = FindLongest(CorrectBits[2]); if (CorrectBits[2][LongestCorrect].length > 5){ Output = ThisMuchIsCorrect + '
' + CorrectBits[2][LongestCorrect]; } else{ if (ShowHint == false){ Output = IncorrectResponse; } } //Include words found in the answer var FoundWords = CheckWords(Guess, CorrectAs[LongestCorrect]) if (FoundWords.length > 0){ Output += '
' + TheseWordsAppear + FoundWords; } if (ShowHint == true){ Output += '
' + GiveHint + CorrectBits[3][LongestCorrect]; } WriteFeedback(Output); //Put the focus back in the box if (FocusBoxes==true){ eval('BottomFrame.document.QForm' + (QNum) + '.Guess').focus(); } } } CharList = new Array(); EscapeList = new Array(); function Webble(InString){ var OutString = ''; var NextChar = ''; var FoundCode = ''; var j = 0; var i = 0; for (i=0; i 0){ OutString += FoundCode; } else{ OutString += NextChar; } } return OutString; } var MacChars = '%80%81%82%83%84%85%86%87%88%89%8A%8B%8C%8D%8E%8F%90%91%92%93%94%95%96%97%98%99%9A'; MacChars += '%9B%9C%9D%9E%9F%A0%A1%A4%A5%A6%A7%A8%AA%AB%AC%AE%AF%B4%B6%BB%BC%BE%BF%C0%C1%C2%C4%C7%C8'; MacChars += '%C9%CA%CB%CC%CD%CE%CF%D0%D1%D2%D3%D4%D5%D6%D8%D9%DA%DB%DC%DD%E0%E1%E2%E3%E4%E5%E6%E7%E8%E9'; MacChars += '%EA%EB%EC%ED%EE%EF%F1%F2%F3%F4%F5%F6%F7%F8%FB%FD'; var WinChars = '%C4%C5%C7%C9%D1%D6%DC%E1%E0%E2%E4%E3%E5%E7%E9%E8%EA%EB%ED%EC%EE%EF%F1%F3%F2%F4'; WinChars += '%F6%F5%FA%F9%FB%FC%86%BA%A7%95%B6%DF%AE%99%92%A8%C6%D8%A5%F0%AA%BA%E6%F8%BF%A1%AC%83%AB%BB'; WinChars += '%85%82%C0%C3%D5%8C%9C%96%97%93%94%91%92%F7%FFY/%A4%8B%9B%87%B7%82%84%89%C2%CA%C1%CB'; WinChars += '%C8%CD%CE%CF%CC%D3%D4%D2%DA%DB%D9%B9%88%98%AF%B0%94'; WinChars = unescape(WinChars); MacChars = unescape(MacChars) function MacStringToWin(InString){ var OutString = ''; for (i=0; i '~') && (MacChars.indexOf(InString.charAt(i)) > -1) ){ OutString += WinChars.charAt(MacChars.indexOf(InString.charAt(i))); } else { OutString += InString.charAt(i); } } return escape(OutString); } function WinStringToMac(InString){ var OutString = ''; for (i=0; i '~') && (WinChars.indexOf(InString.charAt(i)) > -1) ){ OutString += MacChars.charAt(WinChars.indexOf(InString.charAt(i))); } else { OutString += InString.charAt(i); } } return escape(OutString); } function ShowAnswers(QNum){ //If the question isn't done, mark it as done. Score will be 0; Status[QNum][0] = 1; Status[QNum][1] = -1; Status[QNum][2] = -1; //Get the correct answers and put them into a string var Output = TheseCorrect + '
'; for (var i=0; i'; } //Add the current score Output += YourScoreIs + CalculateScore() + '%. '; WriteFeedback(Output); return true; } function ShowReading(){ if (ReadingFrame != null){ if (ReadingURL.length > 0){ ReadingFrame.location.href=ReadingURL; } else{ ReadingFrame.document.clear(); ReadingFrame.document.open(); ReadingFrame.document.write(ReadingText); ReadingFrame.document.close(); } } } function Blank(){ return '
©Half-Baked Software. Loading...
'; } //--> //]]>
-->