From: Subject: =?iso-8859-1?Q?Question=E1rio-I?= Date: Tue, 7 Jun 2011 16:40:23 +0100 MIME-Version: 1.0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Location: =?iso-8859-1?Q?http://www.prof2000.pt/users/rosaritos/testes/Question=E1r?= =?iso-8859-1?Q?io-I.htm?= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Question=E1rio-I</TIT= LE> <META name=3Dauthor=20 content=3D"Created with Hot Potatoes by Half-Baked Software, registered = to UNREGISTERED."></META> <META name=3Dkeywords=20 content=3D"Hot Potatoes, Hot Potatoes, Half-Baked Software, Windows, = University of Victoria"></META><LINK=20 rel=3Dschema.DC href=3D"http://purl.org/dc/elements/1.1/"> <META name=3DDC:Creator content=3DUNREGISTERED> <META name=3DDC:Creator content=3D"Carlos Tavares"> <META name=3DDC:Title content=3DQuestion=E1rio-I> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type><!-- Made with executable version 6.0 Release = 4 Build 2 --><!-- The following insertion allows you to add your own = code directly to this head tag from the configuration screen --> <STYLE type=3Dtext/css>BODY { BACKGROUND-COLOR: #ffffff; FONT-FAMILY: Geneva, Arial; COLOR: #000000; = MARGIN-LEFT: 5%; FONT-SIZE: small; MARGIN-RIGHT: 5% } P { TEXT-ALIGN: left; MARGIN: 0px; FONT-SIZE: 100% } TABLE { COLOR: #000000; FONT-SIZE: 100% } DIV { COLOR: #000000; FONT-SIZE: 100% } SPAN { COLOR: #000000; FONT-SIZE: 100% } TD { COLOR: #000000; FONT-SIZE: 100% } DIV.Titles { TEXT-ALIGN: center; PADDING-BOTTOM: 0.5em; PADDING-LEFT: 0.5em; = PADDING-RIGHT: 0.5em; COLOR: #5f6ba0; PADDING-TOP: 0.5em } BUTTON { DISPLAY: inline; FONT-FAMILY: Geneva, Arial; FONT-SIZE: 100% } .ExerciseTitle { COLOR: #5f6ba0; FONT-SIZE: 140% } .ExerciseSubtitle { COLOR: #5f6ba0; FONT-SIZE: 120% } DIV.StdDiv { BORDER-BOTTOM: #000000 1px solid; TEXT-ALIGN: center; BORDER-LEFT: = #000000 1px solid; PADDING-BOTTOM: 0.5em; BACKGROUND-COLOR: #46adb9; = PADDING-LEFT: 0.5em; PADDING-RIGHT: 0.5em; MARGIN-BOTTOM: 1px; COLOR: = #000000; FONT-SIZE: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: = #000000 1px solid; PADDING-TOP: 0.5em } .RTLText { TEXT-ALIGN: right; FONT-FAMILY: "Simplified Arabic", "Traditional = Arabic", "Times New Roman", Geneva, Arial; DIRECTION: rtl; FONT-SIZE: = 150% } .CentredRTLText { TEXT-ALIGN: center; FONT-FAMILY: "Simplified Arabic", "Traditional = Arabic", "Times New Roman", Geneva, Arial; DIRECTION: rtl; FONT-SIZE: = 150% } BUTTON P.RTLText { TEXT-ALIGN: center } .RTLGapBox { TEXT-ALIGN: right; FONT-FAMILY: "Times New Roman", Geneva, Arial; = DIRECTION: rtl; FONT-SIZE: 150% } .Guess { FONT-WEIGHT: bold } .CorrectAnswer { FONT-WEIGHT: bold } DIV#Timer { TEXT-ALIGN: center; PADDING-BOTTOM: 0.25em; PADDING-LEFT: 0.25em; = PADDING-RIGHT: 0.25em; COLOR: #5f6ba0; MARGIN-LEFT: auto; MARGIN-RIGHT: = auto; PADDING-TOP: 0.25em } SPAN#TimerText { BORDER-BOTTOM: 1px solid; BORDER-LEFT: 1px solid; PADDING-BOTTOM: = 0.25em; PADDING-LEFT: 0.25em; PADDING-RIGHT: 0.25em; DISPLAY: none; = COLOR: #5f6ba0; BORDER-TOP: 1px solid; FONT-WEIGHT: bold; BORDER-RIGHT: = 1px solid; PADDING-TOP: 0.25em } SPAN.Instructions { =09 } DIV.ExerciseText { =09 } .FeedbackText { COLOR: #5f6ba0 } .FeedbackText SPAN.CorrectAnswer { COLOR: #5f6ba0 } .FeedbackText SPAN.Guess { COLOR: #5f6ba0 } .FeedbackText SPAN.Answer { COLOR: #5f6ba0 } .LeftItem { TEXT-ALIGN: left; COLOR: #000000; FONT-SIZE: 100% } .RightItem { COLOR: #000000; FONT-SIZE: 100%; FONT-WEIGHT: bold } SPAN.CorrectMark { =09 } INPUT { FONT-FAMILY: Geneva, Arial; FONT-SIZE: 120% } TEXTAREA { FONT-FAMILY: Geneva, Arial; FONT-SIZE: 120% } SELECT { FONT-SIZE: 100% } DIV.Feedback { Z-INDEX: 1; BORDER-BOTTOM: 1px solid; POSITION: absolute; TEXT-ALIGN: = center; BORDER-LEFT: 1px solid; PADDING-BOTTOM: 5px; BACKGROUND-COLOR: = #ffffff; PADDING-LEFT: 5px; WIDTH: 34%; PADDING-RIGHT: 5px; DISPLAY: = none; COLOR: #5f6ba0; FONT-SIZE: 100%; BORDER-TOP: 1px solid; TOP: 33%; = BORDER-RIGHT: 1px solid; PADDING-TOP: 5px; LEFT: 33% } DIV.LeftContainer { BORDER-BOTTOM-STYLE: none; PADDING-BOTTOM: 2px; BORDER-RIGHT-STYLE: = none; PADDING-LEFT: 0px; WIDTH: 49.8%; PADDING-RIGHT: 0px; = BORDER-TOP-STYLE: none; MARGIN-BOTTOM: 0px; FLOAT: left; = BORDER-LEFT-STYLE: none; PADDING-TOP: 2px } DIV.RightContainer { BORDER-BOTTOM-STYLE: none; PADDING-BOTTOM: 2px; BORDER-RIGHT-STYLE: = none; PADDING-LEFT: 0px; WIDTH: 49.8%; PADDING-RIGHT: 0px; = BORDER-TOP-STYLE: none; MARGIN-BOTTOM: 0px; FLOAT: right; = BORDER-LEFT-STYLE: none; PADDING-TOP: 2px } .ReadingText { TEXT-ALIGN: left } #ReadingDiv H3.ExerciseSubtitle { COLOR: #000000 } DIV.ExerciseDiv { COLOR: #000000 } TABLE.FlashcardTable { POSITION: relative; BORDER-BOTTOM-COLOR: #000000; TEXT-ALIGN: center; = PADDING-BOTTOM: 0px; BACKGROUND-COLOR: transparent; BORDER-TOP-COLOR: = #000000; MARGIN: 2em 5%; PADDING-LEFT: 0px; WIDTH: 90%; PADDING-RIGHT: = 0px; COLOR: #000000; BORDER-RIGHT-COLOR: #000000; BORDER-LEFT-COLOR: = #000000; PADDING-TOP: 0px } TABLE.FlashcardTable TR { BORDER-BOTTOM-STYLE: none; PADDING-BOTTOM: 0px; BORDER-RIGHT-STYLE: = none; BACKGROUND-COLOR: #46adb9; MARGIN: 0px; PADDING-LEFT: 0px; = PADDING-RIGHT: 0px; BORDER-TOP-STYLE: none; BORDER-LEFT-STYLE: none; = PADDING-TOP: 0px } TABLE.FlashcardTable TD.Showing { BORDER-BOTTOM: 1px solid; TEXT-ALIGN: center; BORDER-LEFT: 1px solid; = PADDING-BOTTOM: 2em; BACKGROUND-COLOR: #46adb9; MARGIN: 0px; = PADDING-LEFT: 2em; WIDTH: 50%; PADDING-RIGHT: 2em; DISPLAY: table-cell; = COLOR: #000000; FONT-SIZE: 140%; BORDER-TOP: 1px solid; BORDER-RIGHT: = 1px solid; PADDING-TOP: 2em } TABLE.FlashcardTable TD.Hidden { DISPLAY: none } DIV#SegmentDiv { TEXT-ALIGN: center; MARGIN-TOP: 2em; MARGIN-BOTTOM: 2em } A.ExSegment { COLOR: #000000; FONT-SIZE: 120%; FONT-WEIGHT: bold; TEXT-DECORATION: = none } SPAN.RemainingWordList { FONT-STYLE: italic } DIV.DropLine { BORDER-BOTTOM: #5f6ba0 1px solid; POSITION: absolute; TEXT-ALIGN: = center; WIDTH: 80% } .ClozeWordList { TEXT-ALIGN: center; FONT-WEIGHT: bold } DIV.ClozeBody { TEXT-ALIGN: left; LINE-HEIGHT: 2; MARGIN-TOP: 2em; MARGIN-BOTTOM: 2em } SPAN.GapSpan { FONT-WEIGHT: bold } TABLE.CrosswordGrid { PADDING-BOTTOM: 0px; BACKGROUND-COLOR: #000000; MARGIN: auto auto 1em; = PADDING-LEFT: 0px; PADDING-RIGHT: 0px; BORDER-COLLAPSE: collapse; = PADDING-TOP: 0px } TABLE.CrosswordGrid TBODY TR TD { BORDER-BOTTOM: #000000 1px solid; TEXT-ALIGN: center; BORDER-LEFT: = #000000 1px solid; PADDING-BOTTOM: 1px; MARGIN: 0px; PADDING-LEFT: 1px; = WIDTH: 1.5em; PADDING-RIGHT: 1px; HEIGHT: 1.5em; COLOR: #000000; = FONT-SIZE: 140%; VERTICAL-ALIGN: middle; BORDER-TOP: #000000 1px solid; = BORDER-RIGHT: #000000 1px solid; PADDING-TOP: 1px } TABLE.CrosswordGrid SPAN { COLOR: #000000 } TABLE.CrosswordGrid TD.BlankCell { BACKGROUND-COLOR: #000000; COLOR: #000000 } TABLE.CrosswordGrid TD.LetterOnlyCell { TEXT-ALIGN: center; BACKGROUND-COLOR: #ffffff; COLOR: #000000; = VERTICAL-ALIGN: middle; FONT-WEIGHT: bold } TABLE.CrosswordGrid TD.NumLetterCell { TEXT-ALIGN: left; PADDING-BOTTOM: 1px; BACKGROUND-COLOR: #ffffff; = PADDING-LEFT: 1px; PADDING-RIGHT: 1px; COLOR: #000000; VERTICAL-ALIGN: = top; FONT-WEIGHT: bold; PADDING-TOP: 1px } .NumLetterCellText { COLOR: #000000; CURSOR: pointer } .GridNum { COLOR: #000000; FONT-SIZE: 66%; VERTICAL-ALIGN: super; FONT-WEIGHT: = bold; TEXT-DECORATION: none } .GridNum:hover { COLOR: #000000 } .GridNum:visited { COLOR: #000000 } TABLE#Clues { MARGIN: auto; VERTICAL-ALIGN: top } TABLE#Clues TD { VERTICAL-ALIGN: top } TABLE.ClueList { MARGIN: auto } TD.ClueNum { TEXT-ALIGN: right; VERTICAL-ALIGN: top; FONT-WEIGHT: bold } TD.Clue { TEXT-ALIGN: left } DIV#ClueEntry { TEXT-ALIGN: left; MARGIN-BOTTOM: 1em } DIV.Keypad { TEXT-ALIGN: center } DIV.Keypad BUTTON { BACKGROUND-COLOR: #ffffff; WIDTH: 2em; FONT-FAMILY: Geneva, Arial; = COLOR: #000000; FONT-SIZE: 120% } DIV.QuestionNavigation { TEXT-ALIGN: center } .QNum { MARGIN: 0em 1em 0.5em; VERTICAL-ALIGN: middle; FONT-WEIGHT: bold } TEXTAREA { FONT-FAMILY: Geneva, Arial } .QuestionText { =09 } .Answer { LETTER-SPACING: 0.1em; FONT-SIZE: 120% } .PartialAnswer { LETTER-SPACING: 0.1em; COLOR: #5f6ba0; FONT-SIZE: 120% } .Highlight { BACKGROUND-COLOR: #ffff00; COLOR: #000000; FONT-SIZE: 120%; = FONT-WEIGHT: bold } OL.QuizQuestions { TEXT-ALIGN: left; LIST-STYLE-TYPE: none } LI.QuizQuestion { BORDER-BOTTOM: 1px solid; BORDER-LEFT: 0px solid; PADDING-BOTTOM: 1em; = PADDING-LEFT: 1em; PADDING-RIGHT: 1em; BORDER-TOP: 0px solid; = BORDER-RIGHT: 0px solid; PADDING-TOP: 1em } OL.MCAnswers { TEXT-ALIGN: left; PADDING-BOTTOM: 1em; LIST-STYLE-TYPE: upper-alpha; = PADDING-LEFT: 1em; PADDING-RIGHT: 1em; PADDING-TOP: 1em } OL.MCAnswers LI { MARGIN-BOTTOM: 1em } OL.MSelAnswers { TEXT-ALIGN: left; PADDING-BOTTOM: 1em; LIST-STYLE-TYPE: lower-alpha; = PADDING-LEFT: 1em; PADDING-RIGHT: 1em; PADDING-TOP: 1em } DIV.ShortAnswer { PADDING-BOTTOM: 1em; PADDING-LEFT: 1em; PADDING-RIGHT: 1em; = PADDING-TOP: 1em } .FuncButton { BORDER-BOTTOM: #23565c 2px solid; TEXT-ALIGN: center; BORDER-LEFT: = #a2d6dc 2px solid; PADDING-BOTTOM: 3px; BACKGROUND-COLOR: #46adb9; = PADDING-LEFT: 6px; PADDING-RIGHT: 6px; COLOR: #000000; BORDER-TOP: = #a2d6dc 2px solid; CURSOR: pointer; BORDER-RIGHT: #23565c 2px solid; = PADDING-TOP: 3px } .FuncButtonUp { BORDER-BOTTOM: #23565c 2px solid; TEXT-ALIGN: center; BORDER-LEFT: = #a2d6dc 2px solid; PADDING-BOTTOM: 3px; BACKGROUND-COLOR: #000000; = PADDING-LEFT: 6px; PADDING-RIGHT: 6px; COLOR: #46adb9; BORDER-TOP: = #a2d6dc 2px solid; CURSOR: pointer; BORDER-RIGHT: #23565c 2px solid; = PADDING-TOP: 3px } .FuncButtonDown { BORDER-BOTTOM: #a2d6dc 2px solid; TEXT-ALIGN: center; BORDER-LEFT: = #23565c 2px solid; PADDING-BOTTOM: 3px; BACKGROUND-COLOR: #000000; = PADDING-LEFT: 6px; PADDING-RIGHT: 6px; COLOR: #46adb9; BORDER-TOP: = #23565c 2px solid; CURSOR: pointer; BORDER-RIGHT: #a2d6dc 2px solid; = PADDING-TOP: 3px } DIV.NavButtonBar { TEXT-ALIGN: center; BACKGROUND-COLOR: #ff80c0; MARGIN: 2px 0px; CLEAR: = both; FONT-SIZE: 100% } .NavButton { BORDER-BOTTOM: #7f4060 2px solid; BORDER-LEFT: #ffbfdf 2px solid; = BACKGROUND-COLOR: #ff80c0; COLOR: #000000; BORDER-TOP: #ffbfdf 2px = solid; CURSOR: pointer; BORDER-RIGHT: #7f4060 2px solid } .NavButtonUp { BORDER-BOTTOM: #7f4060 2px solid; BORDER-LEFT: #ffbfdf 2px solid; = BACKGROUND-COLOR: #000000; COLOR: #ff80c0; BORDER-TOP: #ffbfdf 2px = solid; CURSOR: pointer; BORDER-RIGHT: #7f4060 2px solid } .NavButtonDown { BORDER-BOTTOM: #ffbfdf 2px solid; BORDER-LEFT: #7f4060 2px solid; = BACKGROUND-COLOR: #000000; COLOR: #ff80c0; BORDER-TOP: #7f4060 2px = solid; CURSOR: pointer; BORDER-RIGHT: #ffbfdf 2px solid } A { COLOR: #0000cc } A:visited { COLOR: #0000ff } A:hover { COLOR: #0000cc } DIV.CardStyle { BORDER-BOTTOM: 1px solid; POSITION: absolute; BORDER-LEFT: 1px solid; = PADDING-BOTTOM: 5px; BACKGROUND-COLOR: #46adb9; PADDING-LEFT: 5px; = PADDING-RIGHT: 5px; FONT-FAMILY: Geneva, Arial; COLOR: #000000; = FONT-SIZE: 100%; OVERFLOW: visible; BORDER-TOP: 1px solid; TOP: -50px; = BORDER-RIGHT: 1px solid; PADDING-TOP: 5px; LEFT: -50px } .rtl { TEXT-ALIGN: right; FONT-SIZE: 140% } </STYLE> <SCRIPT type=3Dtext/javascript> //<![CDATA[ <!-- function Client(){ //if not a DOM browser, hopeless this.min =3D false; if (document.getElementById){this.min =3D true;}; this.ua =3D navigator.userAgent; this.name =3D navigator.appName; this.ver =3D navigator.appVersion; =20 //Get data about the browser this.mac =3D (this.ver.indexOf('Mac') !=3D -1); this.win =3D (this.ver.indexOf('Windows') !=3D -1); //Look for Gecko this.gecko =3D (this.ua.indexOf('Gecko') > 1); if (this.gecko){ this.geckoVer =3D = parseInt(this.ua.substring(this.ua.indexOf('Gecko')+6, this.ua.length)); if (this.geckoVer < 20020000){this.min =3D false;} } =09 //Look for Firebird this.firebird =3D (this.ua.indexOf('Firebird') > 1); =09 //Look for Safari this.safari =3D (this.ua.indexOf('Safari') > 1); if (this.safari){ this.gecko =3D false; } =09 //Look for IE this.ie =3D (this.ua.indexOf('MSIE') > 0); if (this.ie){ this.ieVer =3D parseFloat(this.ua.substring(this.ua.indexOf('MSIE')+5, = this.ua.length)); if (this.ieVer < 5.5){this.min =3D false;} } =09 //Look for Opera this.opera =3D (this.ua.indexOf('Opera') > 0); if (this.opera){ this.operaVer =3D = parseFloat(this.ua.substring(this.ua.indexOf('Opera')+6, = this.ua.length)); if (this.operaVer < 7.04){this.min =3D false;} } if (this.min =3D=3D false){ alert('Your browser may not be able to handle this page.'); } =09 //Special case for the horrible ie5mac this.ie5mac =3D (this.ie&&this.mac&&(this.ieVer<6)); } var C =3D new Client(); //for (prop in C){ // alert(prop + ': ' + C[prop]); //} //CODE FOR HANDLING NAV BUTTONS AND FUNCTION BUTTONS //[strNavBarJS] function NavBtnOver(Btn){ if (Btn.className !=3D 'NavButtonDown'){Btn.className =3D = 'NavButtonUp';} } function NavBtnOut(Btn){ Btn.className =3D 'NavButton'; } function NavBtnDown(Btn){ Btn.className =3D 'NavButtonDown'; } //[/strNavBarJS] function FuncBtnOver(Btn){ if (Btn.className !=3D 'FuncButtonDown'){Btn.className =3D = 'FuncButtonUp';} } function FuncBtnOut(Btn){ Btn.className =3D 'FuncButton'; } function FuncBtnDown(Btn){ Btn.className =3D 'FuncButtonDown'; } function FocusAButton(){ if (document.getElementById('CheckButton1') !=3D null){ document.getElementById('CheckButton1').focus(); } else{ if (document.getElementById('CheckButton2') !=3D null){ document.getElementById('CheckButton2').focus(); } else{ document.getElementsByTagName('button')[0].focus(); } } } //CODE FOR HANDLING DISPLAY OF POPUP FEEDBACK BOX var topZ =3D 1000; function ShowMessage(Feedback){ var Output =3D Feedback + '<br /><br />'; document.getElementById('FeedbackContent').innerHTML =3D Output; var FDiv =3D document.getElementById('FeedbackDiv'); topZ++; FDiv.style.zIndex =3D topZ; FDiv.style.top =3D TopSettingWithScrollOffset(30) + 'px'; FDiv.style.display =3D 'block'; ShowElements(false, 'input'); ShowElements(false, 'select'); ShowElements(false, 'object'); //Focus the OK button setTimeout("document.getElementById('FeedbackOKButton').focus()", 50); =09 // } function ShowElements(Show, TagName){ //Special for IE bug -- hide all the form elements that will show = through the popup if (C.ie){ var Els =3D document.getElementsByTagName(TagName); for (var i=3D0; i<Els.length; i++){ if (Show =3D=3D true){ Els[i].style.display =3D 'inline'; } else{ Els[i].style.display =3D 'none'; } } }=20 } function HideFeedback(){ document.getElementById('FeedbackDiv').style.display =3D 'none'; ShowElements(true, 'input'); ShowElements(true, 'select'); ShowElements(true, 'object'); if (Finished =3D=3D true){ Finish(); } } //GENERAL UTILITY FUNCTIONS AND VARIABLES //PAGE DIMENSION FUNCTIONS function PageDim(){ //Get the page width and height this.W =3D 600; this.H =3D 400; this.W =3D document.getElementsByTagName('body')[0].clientWidth; this.H =3D document.getElementsByTagName('body')[0].clientHeight; } var pg =3D null; function GetPageXY(El) { var XY =3D {x: 0, y: 0}; while(El){ XY.x +=3D El.offsetLeft; XY.y +=3D El.offsetTop; El =3D El.offsetParent; } return XY; } function GetScrollTop(){ if (document.documentElement && document.documentElement.scrollTop){ return document.documentElement.scrollTop; } else{ if (document.body){ return document.body.scrollTop; } else{ return window.pageYOffset; } } } function GetViewportHeight(){ if (window.innerHeight){ return window.innerHeight; } else{ return document.getElementsByTagName('body')[0].clientHeight; } } function TopSettingWithScrollOffset(TopPercent){ var T =3D Math.floor(GetViewportHeight() * (TopPercent/100)); return GetScrollTop() + T;=20 } //CODE FOR AVOIDING LOSS OF DATA WHEN BACKSPACE KEY INVOKES = history.back() var InTextBox =3D false; function SuppressBackspace(e){=20 if (InTextBox =3D=3D true){return;} if (C.ie) { thisKey =3D window.event.keyCode; } else { thisKey =3D e.keyCode; } var Suppress =3D false; if (thisKey =3D=3D 8) { Suppress =3D true; } if (Suppress =3D=3D true){ if (C.ie){ window.event.returnValue =3D false;=09 window.event.cancelBubble =3D true; } else{ e.preventDefault(); } } } if (C.ie){ document.attachEvent('onkeydown',SuppressBackspace); window.attachEvent('onkeydown',SuppressBackspace); } else{ if (window.addEventListener){ window.addEventListener('keypress',SuppressBackspace,false); } } function ReduceItems(InArray, ReduceToSize){ var ItemToDump=3D0; var j=3D0; while (InArray.length > ReduceToSize){ ItemToDump =3D Math.floor(InArray.length*Math.random()); InArray.splice(ItemToDump, 1); } } function Shuffle(InArray){ var Num; var Temp =3D new Array(); var Len =3D InArray.length; var j =3D Len; for (var i=3D0; i<Len; i++){ Temp[i] =3D InArray[i]; } for (i=3D0; i<Len; i++){ Num =3D Math.floor(j * Math.random()); InArray[i] =3D Temp[Num]; for (var k=3DNum; k < (j-1); k++) { Temp[k] =3D Temp[k+1]; } j--; } return InArray; } function WriteToInstructions(Feedback) { document.getElementById('InstructionsDiv').innerHTML =3D Feedback; } function EscapeDoubleQuotes(InString){ return InString.replace(/"/g, '"') } function TrimString(InString){ var x =3D 0; if (InString.length !=3D 0) { while ((InString.charAt(InString.length - 1) =3D=3D = '\u0020') || (InString.charAt(InString.length - 1) =3D=3D '\u000A') || = (InString.charAt(InString.length - 1) =3D=3D '\u000D')){ InString =3D InString.substring(0, = InString.length - 1) } while ((InString.charAt(0) =3D=3D '\u0020') || = (InString.charAt(0) =3D=3D '\u000A') || (InString.charAt(0) =3D=3D = '\u000D')){ InString =3D InString.substring(1, = InString.length) } while (InString.indexOf(' ') !=3D -1) { x =3D InString.indexOf(' ') InString =3D InString.substring(0, x) + = InString.substring(x+1, InString.length) } return InString; } else { return ''; } } function FindLongest(InArray){ if (InArray.length < 1){return -1;} var Longest =3D 0; for (var i=3D1; i<InArray.length; i++){ if (InArray[i].length > InArray[Longest].length){ Longest =3D i; } } return Longest; } //UNICODE CHARACTER FUNCTIONS function IsCombiningDiacritic(CharNum){ var Result =3D (((CharNum >=3D 0x0300)&&(CharNum <=3D = 0x370))||((CharNum >=3D 0x20d0)&&(CharNum <=3D 0x20ff))); Result =3D Result || (((CharNum >=3D 0x3099)&&(CharNum <=3D = 0x309a))||((CharNum >=3D 0xfe20)&&(CharNum <=3D 0xfe23))); return Result; } function IsCJK(CharNum){ return ((CharNum >=3D 0x3000)&&(CharNum < 0xd800)); } //SETUP FUNCTIONS //BROWSER WILL REFILL TEXT BOXES FROM CACHE IF NOT PREVENTED function ClearTextBoxes(){ var NList =3D document.getElementsByTagName('input'); for (var i=3D0; i<NList.length; i++){ if ((NList[i].id.indexOf('Guess') > -1)||(NList[i].id.indexOf('Gap') > = -1)){ NList[i].value =3D ''; } if (NList[i].id.indexOf('Chk') > -1){ NList[i].checked =3D ''; } } } //EXTENSION TO ARRAY OBJECT function Array_IndexOf(Input){ var Result =3D -1; for (var i=3D0; i<this.length; i++){ if (this[i] =3D=3D Input){ Result =3D i; } } return Result; } Array.prototype.indexOf =3D Array_IndexOf; //IE HAS RENDERING BUG WITH BOTTOM NAVBAR function RemoveBottomNavBarForIE(){ if ((C.ie)&&(document.getElementById('Reading') !=3D null)){ if (document.getElementById('BottomNavBar') !=3D null){ = document.getElementById('TheBody').removeChild(document.getElementById('B= ottomNavBar')); } } } //HOTPOTNET-RELATED CODE var HPNStartTime =3D (new Date()).getTime(); var SubmissionTimeout =3D 30000; var Detail =3D ''; //Global that is used to submit tracking data function Finish(){ //If there's a form, fill it out and submit it if (document.store !=3D null){ Frm =3D document.store; Frm.starttime.value =3D HPNStartTime; Frm.endtime.value =3D (new Date()).getTime(); Frm.mark.value =3D Score; Frm.detail.value =3D Detail; Frm.submit(); } } //JQUIZ CORE JAVASCRIPT CODE var CurrQNum =3D 0; var CorrectIndicator =3D ':-)'; var IncorrectIndicator =3D 'X'; var YourScoreIs =3D 'A tua pontuação é:'; var ContinuousScoring =3D true; var CorrectFirstTime =3D 'Perguntas respondidas correctamente à = primeira:'; var ShowCorrectFirstTime =3D true; var ShuffleQs =3D true; var ShuffleAs =3D true; var DefaultRight =3D 'Correcto:'; var DefaultWrong =3D 'Tenta novamente:'; var QsToShow =3D 3; var Score =3D 0; var Finished =3D false; var Qs =3D null; var QArray =3D new Array(); var ShowingAllQuestions =3D false; var ShowAllQuestionsCaption =3D 'Mostrar todas as perguntas:'; var ShowOneByOneCaption =3D 'Mostrar uma a uma:'; var State =3D new Array(); var Feedback =3D ''; var TimeOver =3D false; var strInstructions =3D ''; //The following variable can be used to add a message explaining that //the question is finished, so no further marking will take place. var strQuestionFinished =3D ''; function CompleteEmptyFeedback(){ var QNum, ANum; for (QNum=3D0; QNum<I.length; QNum++){ //Only do this if not multi-select if (I[QNum][2] !=3D '3'){ for (ANum =3D 0; ANum<I[QNum][3].length; ANum++){ if (I[QNum][3][ANum][1].length < 1){ if (I[QNum][3][ANum][2] > 0){ I[QNum][3][ANum][1] =3D DefaultRight; } else{ I[QNum][3][ANum][1] =3D DefaultWrong; } } } } } } function SetUpQuestions(){ var AList =3D new Array();=20 var QList =3D new Array(); var i, j; Qs =3D document.getElementById('Questions'); while (Qs.getElementsByTagName('li').length > 0){ QList.push(Qs.removeChild(Qs.getElementsByTagName('li')[0])); } var DumpItem =3D 0; if (QsToShow > QList.length){ QsToShow =3D QList.length; } while (QsToShow < QList.length){ DumpItem =3D Math.floor(QList.length*Math.random()); for (j=3DDumpItem; j<(QList.length-1); j++){ QList[j] =3D QList[j+1]; } QList.length =3D QList.length-1; } if (ShuffleQs =3D=3D true){ QList =3D Shuffle(QList); } if (ShuffleAs =3D=3D true){ var As; for (var i=3D0; i<QList.length; i++){ As =3D QList[i].getElementsByTagName('ol')[0]; if (As !=3D null){ AList.length =3D 0; while (As.getElementsByTagName('li').length > 0){ AList.push(As.removeChild(As.getElementsByTagName('li')[0])); } AList =3D Shuffle(AList); for (j=3D0; j<AList.length; j++){ As.appendChild(AList[j]); } } } } =09 for (i=3D0; i<QList.length; i++){ Qs.appendChild(QList[i]); QArray[QArray.length] =3D QList[i]; } //Show the first item QArray[0].style.display =3D ''; =09 //Now hide all except the first item for (i=3D1; i<QArray.length; i++){ QArray[i].style.display =3D 'none'; } =09 SetQNumReadout(); =09 SetFocusToTextbox(); } function SetFocusToTextbox(){ //if there's a textbox, set the focus in it if (QArray[CurrQNum].getElementsByTagName('input')[0] !=3D null){ QArray[CurrQNum].getElementsByTagName('input')[0].focus(); } else{ if (QArray[CurrQNum].getElementsByTagName('textarea')[0] !=3D null){ QArray[CurrQNum].getElementsByTagName('textarea')[0].focus();=09 } } } function ChangeQ(ChangeBy){ //The following line prevents moving to another question until the = current //question is answered correctly. Uncomment it to enable this behaviour. = // if (State[CurrQNum][0] =3D=3D -1){return;} if (((CurrQNum + ChangeBy) < 0)||((CurrQNum + ChangeBy) >=3D = QArray.length)){return;} QArray[CurrQNum].style.display =3D 'none'; CurrQNum +=3D ChangeBy; QArray[CurrQNum].style.display =3D ''; SetQNumReadout(); SetFocusToTextbox(); } function SetQNumReadout(){ document.getElementById('QNumReadout').innerHTML =3D (CurrQNum+1) + ' / = ' + QArray.length; if ((CurrQNum+1) >=3D QArray.length){ if (document.getElementById('NextQButton') !=3D null){ document.getElementById('NextQButton').style.visibility =3D 'hidden'; } } else{ if (document.getElementById('NextQButton') !=3D null){ document.getElementById('NextQButton').style.visibility =3D = 'visible'; } } if (CurrQNum <=3D 0){ if (document.getElementById('PrevQButton') !=3D null){ document.getElementById('PrevQButton').style.visibility =3D 'hidden'; } } else{ if (document.getElementById('PrevQButton') !=3D null){ document.getElementById('PrevQButton').style.visibility =3D = 'visible'; } } } I=3Dnew Array(); I[0]=3Dnew Array();I[0][0]=3D100; I[0][1]=3D''; I[0][2]=3D'1'; I[0][3]=3Dnew Array(); I[0][3][0]=3Dnew Array('A formiga sentiu-se gelar.','',1,100,1); I[1]=3Dnew Array();I[1][0]=3D100; I[1][1]=3D''; I[1][2]=3D'1'; I[1][3]=3Dnew Array(); I[1][3][0]=3Dnew Array('Quem a salvou de morrer gelada foi um raio de = sol.','',1,100,1); I[2]=3Dnew Array();I[2][0]=3D100; I[2][1]=3D''; I[2][2]=3D'1'; I[2][3]=3Dnew Array(); I[2][3][0]=3Dnew Array('Quando a neve derreteu, a formiga sentiu-se = livre.','',1,100,1); function StartUp(){ RemoveBottomNavBarForIE(); //If there's only one question, no need for question navigation controls if (QsToShow < 2){ document.getElementById('QNav').style.display =3D 'none'; } =09 //Stash the instructions so they can be redisplayed strInstructions =3D = document.getElementById('InstructionsDiv').innerHTML; =09 =09 =09 CompleteEmptyFeedback(); SetUpQuestions(); ClearTextBoxes(); CreateStatusArray(); =09 setTimeout('StartTimer()', 50); =09 //Check search string for q parameter if (document.location.search.length > 0){ if (ShuffleQs =3D=3D false){ var JumpTo =3D = parseInt(document.location.search.substring(1,document.location.search.le= ngth))-1; if (JumpTo <=3D QsToShow){ ChangeQ(JumpTo); } } } } function ShowHideQuestions(){ FuncBtnOut(document.getElementById('ShowMethodButton')); document.getElementById('ShowMethodButton').style.display =3D 'none'; if (ShowingAllQuestions =3D=3D false){ for (var i=3D0; i<QArray.length; i++){ QArray[i].style.display =3D ''; } document.getElementById('Questions').style.listStyleType =3D = 'decimal'; document.getElementById('OneByOneReadout').style.display =3D 'none'; document.getElementById('ShowMethodButton').innerHTML =3D = ShowOneByOneCaption; ShowingAllQuestions =3D true; } else{ for (var i=3D0; i<QArray.length; i++){ if (i !=3D CurrQNum){ QArray[i].style.display =3D 'none'; } } document.getElementById('Questions').style.listStyleType =3D 'none'; document.getElementById('OneByOneReadout').style.display =3D ''; document.getElementById('ShowMethodButton').innerHTML =3D = ShowAllQuestionsCaption; ShowingAllQuestions =3D false;=09 } document.getElementById('ShowMethodButton').style.display =3D 'inline'; } function CreateStatusArray(){ var QNum, ANum; //For each item in the item array for (QNum=3D0; QNum<I.length; QNum++){ //Check if the question still exists (hasn't been nuked by showing a = random selection) if (document.getElementById('Q_' + QNum) !=3D null){ State[QNum] =3D new Array(); State[QNum][0] =3D -1; //Score for this q; -1 shows question not done = yet State[QNum][1] =3D new Array(); //answers for (ANum =3D 0; ANum<I[QNum][3].length; ANum++){ State[QNum][1][ANum] =3D 0; //answer not chosen yet; when chosen, = will store its position in the series of choices } State[QNum][2] =3D 0; //tries at this q so far State[QNum][3] =3D 0; //incrementing percent-correct values of = selected answers State[QNum][4] =3D 0; //penalties incurred for hints State[QNum][5] =3D ''; //Sequence of answers chosen by number } else{ State[QNum] =3D null; } } } function CalculateOverallScore(){ var TotalWeighting =3D 0; var TotalScore =3D 0; =09 for (var QNum=3D0; QNum<State.length; QNum++){ if (State[QNum] !=3D null){ if (State[QNum][0] > -1){ TotalWeighting +=3D I[QNum][0]; TotalScore +=3D (I[QNum][0] * State[QNum][0]); } } } if (TotalWeighting > 0){ Score =3D Math.floor((TotalScore/TotalWeighting)*100); } else{ //if TotalWeighting is 0, no questions so far have any value, so=20 //no penalty should be shown. Score =3D 100;=20 } } function CheckFinished(){ var FB =3D ''; var AllDone =3D true; for (var QNum=3D0; QNum<State.length; QNum++){ if (State[QNum] !=3D null){ if (State[QNum][0] < 0){ AllDone =3D false; } } } if (AllDone =3D=3D true){ =09 //Report final score and submit if necessary CalculateOverallScore(); FB =3D YourScoreIs + ' ' + Score + '%.'; if (ShowCorrectFirstTime =3D=3D true){ var CFT =3D 0; for (QNum=3D0; QNum<State.length; QNum++){ if (State[QNum] !=3D null){ if (State[QNum][0] >=3D 1){ CFT++; } } } FB +=3D '<br />' + CorrectFirstTime + ' ' + CFT + '/' + QsToShow; } WriteToInstructions(FB); =09 Finished =3D=3D true; window.clearInterval(Interval); TimeOver =3D true; Locked =3D true; =09 Finished =3D true; Detail =3D '<?xml version=3D"1.0"?><hpnetresult><fields>'; for (QNum=3D0; QNum<State.length; QNum++){ if (State[QNum] !=3D null){ if (State[QNum][5].length > 0){ Detail +=3D '<field><fieldname>Question #' + (QNum+1) + = '</fieldname><fieldtype>question-tracking</fieldtype><fieldlabel>Q ' + = (QNum+1) + = '</fieldlabel><fieldlabelid>QuestionTrackingField</fieldlabelid><fielddat= a>' + State[QNum][5] + '</fielddata></field>'; } } } Detail +=3D '</fields></hpnetresult>'; setTimeout('Finish()', SubmissionTimeout); } } function TimesUp(){ document.getElementById('Timer').innerHTML =3D 'O teu tempo expirou!'; TimeOver =3D true; Finished =3D true; ShowMessage('O teu tempo expirou!'); =09 //Set all remaining scores to 0 for (var QNum=3D0; QNum<State.length; QNum++){ if (State[QNum] !=3D null){ if (State[QNum][0] < 0){ State[QNum][0] =3D 0; } } } CheckFinished(); } //CORE CODE FOR CHECKING SHORT ANSWER GUESSES AGAINST ANSWER ARRAYS var CaseSensitive =3D false; var ShowAlsoCorrect =3D true; var PleaseEnter =3D 'Escreve uma hipótese, por favor'; var HybridTries =3D 2; var PartlyIncorrect =3D 'A resposta está parcialmente = incorrecta:'; var CorrectList =3D 'Respostas correctas:'; var NextCorrect =3D 'Próxima letra correcta na resposta:'; var CurrBox =3D null; function TrackFocus(BoxID){ InTextBox =3D true; CurrBox =3D document.getElementById(BoxID); } function LeaveGap(){ InTextBox =3D false; } function TypeChars(Chars){ if (CurrBox !=3D null){ // if (CurrBox.style.display !=3D 'none'){ CurrBox.value +=3D Chars; CurrBox.focus(); // } } } function CheckGuess(Guess, Answer, CaseSensitive, PercentCorrect, = Feedback){ this.Guess =3D Guess; this.Answer =3D Answer; this.PercentCorrect =3D PercentCorrect; this.Feedback =3D Feedback; if (CaseSensitive =3D=3D false){ this.WorkingGuess =3D Guess.toLowerCase(); this.WorkingAnswer =3D Answer.toLowerCase(); } else{ this.WorkingGuess =3D Guess; this.WorkingAnswer =3D Answer; =09 } this.Hint =3D ''; this.HintPenalty =3D 1/Answer.length; this.CorrectStart =3D ''; this.WrongMiddle =3D ''; this.CorrectEnd =3D ''; this.PercentMatch =3D 0; this.DoCheck(); } function CheckGuess_DoCheck(){ //Check if it's an exact match if (this.WorkingAnswer =3D=3D this.WorkingGuess){ this.PercentMatch =3D 100; this.CorrectStart =3D this.Guess; return; } //Figure out how much of the beginning is correct var i =3D 0; var CorrectChars =3D 0; while (this.WorkingAnswer.charAt(i) =3D=3D = this.WorkingGuess.charAt(i)){ i++; CorrectChars++; } //Stash the hint this.Hint =3D this.Answer.charAt(i); =09 this.CorrectStart =3D this.Guess.substring(0, i); =09 //If there's more to the answer, look at the rest of it if (i<this.Guess.length){ =09 //Figure out how much of the end is correct var j =3D this.WorkingGuess.length-1; var k =3D this.WorkingAnswer.length-1; while ((j>=3Di)&&((this.WorkingAnswer.charAt(k) =3D=3D = this.WorkingGuess.charAt(j))&&(CorrectChars < this.Answer.length))){ CorrectChars++; j--; k--; } this.CorrectEnd =3D this.Guess.substring(j+1, this.Guess.length); this.WrongMiddle =3D this.Guess.substring(i, j+1); } if (TrimString(this.WrongMiddle).length < 1){this.WrongMiddle =3D '_';} //Calculate match score based on how much of the guess is correct if (CorrectChars < this.Answer.length){ this.PercentMatch =3D Math.floor(100*CorrectChars)/this.Answer.length; } else{ this.PercentMatch =3D Math.floor((100 * = CorrectChars)/this.Guess.length); }=09 } CheckGuess.prototype.DoCheck =3D CheckGuess_DoCheck; function CheckAnswerArray(CaseSensitive){ this.CaseSensitive =3D CaseSensitive; this.Answers =3D new Array(); this.Score =3D 0; this.Feedback =3D ''; this.Hint =3D ''; this.HintPenalty =3D 0; this.MatchedAnswerLength =3D 1; this.CompleteMatch =3D false; this.MatchNum =3D -1; } function CheckAnswerArray_AddAnswer(Guess, Answer, PercentCorrect, = Feedback){ this.Answers.push(new CheckGuess(Guess, Answer, this.CaseSensitive, = PercentCorrect, Feedback)); } CheckAnswerArray.prototype.AddAnswer =3D CheckAnswerArray_AddAnswer; function CheckAnswerArray_ClearAll(){ this.Answers.length =3D 0; } CheckAnswerArray.prototype.ClearAll =3D CheckAnswerArray_ClearAll; function CheckAnswerArray_GetBestMatch(){ //First check for a 100% match for (var i=3D0; i<this.Answers.length; i++){ if (this.Answers[i].PercentMatch =3D=3D 100){ this.Feedback =3D this.Answers[i].Feedback; this.Score =3D this.Answers[i].PercentCorrect; this.CompleteMatch =3D true; this.MatchNum =3D i; return; } } //Now check for the best alternative match var PercentMatch =3D 0; var BestMatch =3D -1; for (i=3D0; i<this.Answers.length; i++){ if ((this.Answers[i].PercentMatch > = PercentMatch)&&(this.Answers[i].PercentCorrect =3D=3D 100)){ BestMatch =3D i; PercentMatch =3D this.Answers[i].PercentMatch; } } if (BestMatch > -1){ this.Score =3D this.Answers[BestMatch].PercentMatch; this.Feedback =3D PartlyIncorrect + ' '; this.Feedback +=3D '<span class=3D"PartialAnswer">' + = this.Answers[BestMatch].CorrectStart; this.Feedback +=3D '<span class=3D"Highlight">' + = this.Answers[BestMatch].WrongMiddle + '</span>'; this.Feedback +=3D this.Answers[BestMatch].CorrectEnd + '</span>'; this.Hint =3D '<span class=3D"PartialAnswer">' + = this.Answers[BestMatch].CorrectStart; this.Hint +=3D '<span class=3D"Highlight">' + = this.Answers[BestMatch].Hint + '</span></span>'; this.HintPenalty =3D this.Answers[BestMatch].HintPenalty; } else{ this.Score =3D 0; this.Feedback =3D ''; } } CheckAnswerArray.prototype.GetBestMatch =3D = CheckAnswerArray_GetBestMatch; function CheckShortAnswer(QNum){ //bail if question doesn't exist or exercise finished if ((State[QNum].length < 1)||(Finished =3D=3D true)){return;} =09 //bail if question already complete if (State[QNum][0] > -1){return;} //Get the guess var G =3D document.getElementById('Q_' + QNum + '_Guess').value; =09 //If no guess, bail with message; no penalty if (G.length < 1){ ShowMessage(PleaseEnter); return; } //Increment tries State[QNum][2]++; =09 //Create a check object var CA =3D new CheckAnswerArray(CaseSensitive); CA.ClearAll(); for (var ANum=3D0; ANum<I[QNum][3].length; ANum++){ CA.AddAnswer(G, I[QNum][3][ANum][0], I[QNum][3][ANum][3], = I[QNum][3][ANum][1]); } CA.GetBestMatch(); =09 //Store any match in the state tracking field if (CA.MatchNum > -1){ State[QNum][5] +=3D String.fromCharCode(65+CA.MatchNum) + ','; } //Add the percent correct value for this answer to the Q State (works = for all //situations, wrong or right) State[QNum][3] +=3D CA.Score; =09 //Now branch, based on the nature of the match //Is it a complete match? if (CA.CompleteMatch =3D=3D true){ =09 //Is it with a wrong answer, or a right answer? if (CA.Score =3D=3D 100){ //It's right CalculateShortAnsQuestionScore(QNum); //Get correct answer list if required, assuming there are any other = correct alternatives if (ShowAlsoCorrect =3D=3D true){ var AlsoCorrectList =3D GetCorrectList(QNum, G, false); if (AlsoCorrectList.length > 0){ CA.Feedback +=3D '<br />' + CorrectList + '<br />' + = AlsoCorrectList; } }=09 =09 //Get the overall score and add it to the feedback if (ContinuousScoring =3D=3D true){ CalculateOverallScore(); CA.Feedback +=3D '<br />' + YourScoreIs + ' ' + Score + '%.'; WriteToInstructions(YourScoreIs + ' ' + Score + '%.'); } ShowMessage(CA.Feedback); //Put the answer in ReplaceGuessBox(QNum, G); CheckFinished(); return; } } =09 //Otherwise, it's a match to a predicted wrong/partially correct, or a = partial //match to a right answer if (CA.Feedback.length < 1){CA.Feedback =3D DefaultWrong;} //Remove any previous score unless exercise is finished (6.0.3.8+) if (Finished =3D=3D false){ WriteToInstructions(strInstructions); }=09 ShowMessage(CA.Feedback); //If necessary, switch a hybrid question to m/c if (State[QNum][2] >=3D HybridTries){ SwitchHybridDisplay(QNum); } } function CalculateShortAnsQuestionScore(QNum){ var Tries =3D State[QNum][2] + State[QNum][4]; //include tries and hint = penalties; var PercentCorrect =3D State[QNum][3]; var HintPenalties =3D State[QNum][4]; //Make sure it's not already complete if (State[QNum][0] < 0){ if (HintPenalties >=3D 1){ State[QNum][0] =3D 0; } else{ State[QNum][0] =3D (PercentCorrect/(100*Tries)); } if (State[QNum][0] < 0){ State[QNum][0] =3D 0; } } } function SwitchHybridDisplay(QNum){ if (document.getElementById('Q_' + QNum + '_Hybrid_MC') !=3D null){ document.getElementById('Q_' + QNum + '_Hybrid_MC').style.display =3D = ''; if (document.getElementById('Q_' + QNum + '_SA') !=3D null){ document.getElementById('Q_' + QNum + '_SA').style.display =3D = 'none'; } } } function GetCorrectArray(QNum){ var Result =3D new Array(); for (var ANum=3D0; ANum<I[QNum][3].length; ANum++){ if (I[QNum][3][ANum][2] =3D=3D 1){ //This is an acceptable correct = answer Result.push(I[QNum][3][ANum][0]); } }=09 return Result; } function GetCorrectList(QNum, Answer, IncludeAnswer){ var As =3D GetCorrectArray(QNum); var Result =3D ''; for (var ANum=3D0; ANum<As.length; ANum++){ if ((IncludeAnswer =3D=3D true)||(As[ANum] !=3D Answer)){ Result +=3D As[ANum] + '<br />'; } } return Result; } function GetFirstCorrectAnswer(QNum){ var As =3D GetCorrectArray(QNum); if (As.length > 0){ return As[0]; } else{ return ''; } } function ReplaceGuessBox(QNum, Ans){ if (document.getElementById('Q_' + QNum + '_SA') !=3D null){ var El =3D document.getElementById('Q_' + QNum + '_SA'); while (El.childNodes.length > 0){ El.removeChild(El.childNodes[0]); } var A =3D document.createElement('span'); A.setAttribute('class', 'Answer'); var T =3D document.createTextNode(Ans); A.appendChild(T); El.appendChild(A); } } function ShowAnswers(QNum){ //bail if question doesn't exist or exercise finished if ((State[QNum].length < 1)||(Finished =3D=3D true)){return;} =09 //Get the answer list to display var Ans =3D GetCorrectList(QNum, '', false); Ans =3D CorrectList + '<br />' + Ans; =09 //Display feedback ShowMessage(Ans); =09 //Set the score for this question to 0 if no=20 if (State[QNum][0] < 1){ State[QNum][0] =3D 0; } //Get the first correct answer var FirstAns =3D GetFirstCorrectAnswer(QNum); =09 //Replace the textbox ReplaceGuessBox(QNum, FirstAns); =09 //Remove any current score WriteToInstructions(strInstructions); =09 //This may be the last, so check finished status CheckFinished(); } function ShowHint(QNum){ //bail if question doesn't exist or exercise finished if ((State[QNum].length < 1)||(Finished =3D=3D true)){return;} =09 //bail if question already complete if (State[QNum][0] > -1){return;} //Get the guess var G =3D document.getElementById('Q_' + QNum + '_Guess').value; =09 //If no guess, give the first correct bit if (G.length < 1){ var Ans =3D GetFirstCorrectAnswer(QNum); var Hint =3D Ans.charAt(0); ShowMessage(NextCorrect + '<br />' + Hint); //Penalty for hint State[QNum][4] +=3D (1/Ans.length); return; } //Increment tries State[QNum][2]++; =09 //Create a check object var CA =3D new CheckAnswerArray(CaseSensitive); CA.ClearAll(); for (var ANum=3D0; ANum<I[QNum][3].length; ANum++){ //Use only correct answers if (I[QNum][3][ANum][2] =3D=3D 1){ CA.AddAnswer(G, I[QNum][3][ANum][0], I[QNum][3][ANum][3], = I[QNum][3][ANum][1]); } } CA.GetBestMatch(); if (CA.CompleteMatch =3D=3D true){ //It's right! CheckShortAnswer(QNum); return; } else{ if (CA.Hint.length > 0){ ShowMessage(NextCorrect + '<br />' + CA.Hint); State[QNum][4] +=3D CA.HintPenalty; } else{ ShowMessage(DefaultWrong + '<br />' + NextCorrect + '<br />' + = GetFirstCorrectAnswer(QNum).charAt(0)); } } } //CODE FOR HANDLING TIMER //Timer code var Seconds =3D 300; var Interval =3D null; function StartTimer(){ Interval =3D window.setInterval('DownTime()',1000); document.getElementById('TimerText').style.display =3D 'inline'; } function DownTime(){ var ss =3D Seconds % 60; if (ss<10){ ss=3D'0' + ss + ''; } var mm =3D Math.floor(Seconds / 60); if (document.getElementById('Timer') =3D=3D null){ return; } document.getElementById('TimerText').innerHTML =3D mm + ':' + ss; if (Seconds < 1){ window.clearInterval(Interval); TimeOver =3D true; TimesUp(); } Seconds--; } //--> //]]> </SCRIPT> <META name=3DGENERATOR content=3D"MSHTML 8.00.6001.18876"></HEAD> <BODY id=3DTheBody onload=3DStartUp()><!-- BeginTopNavButtons --> <DIV id=3DTopNavBar class=3DNavButtonBar><BUTTON = onblur=3DNavBtnOut(this)=20 onmouseup=3DNavBtnOut(this) class=3DNavButton onfocus=3DNavBtnOver(this) = onmouseover=3DNavBtnOver(this) onmouseout=3DNavBtnOut(this)=20 onmousedown=3DNavBtnDown(this) onclick=3D"location=3D'2=BA ano.htm'; = return false;"=20 type=3Dsubmit>=CDndice</BUTTON><BUTTON onblur=3DNavBtnOut(this)=20 onmouseup=3DNavBtnOut(this) class=3DNavButton onfocus=3DNavBtnOver(this) = onmouseover=3DNavBtnOver(this) onmouseout=3DNavBtnOut(this)=20 onmousedown=3DNavBtnDown(this)=20 onclick=3D"location=3D'QUESTION=C1RIO-II.htm'; return false;"=20 type=3Dsubmit>=3D></BUTTON> </DIV><!-- EndTopNavButtons --> <DIV class=3DTitles> <H2 class=3DExerciseTitle>Question=E1rio-I</H2> <DIV id=3DTimer><SPAN id=3DTimerText>  </SPAN></DIV></DIV> <DIV id=3DInstructionsDiv class=3DStdDiv> <P id=3DInstructions>L=EA atentamente o texto, responde correctamente = =E0s perguntas e=20 verifica a tua resposta. Se precisares de ajuda clica no bot=E3o=20 "Pista".</P></DIV> <DIV class=3DLeftContainer> <DIV id=3DReading class=3DStdDiv> <DIV id=3DReadingDiv> <H3 class=3DExerciseSubtitle>A FORMIGA E A NEVE</H3> <DIV class=3DReadingText>Um dia andava a formiga a trabalhar no campo, = quando as=20 nuvens deixaram cair sobre a terra um manto branco de neve.<BR>Debaixo = da neve,=20 a formiguita sentiu-se gelar. Pediu ajuda =E0 ave do c=E9u, ao cabrito = do monte e ao=20 vento que passou.<BR>Ningu=E9m a ajudou.<BR>Foi ent=E3o que uma janela = azul se abriu=20 entre as nuvens. Por ela passou um raio de sol que derreteu a neve.<BR>E = a=20 formiguita sentiu-se livre...<BR><BR>Maria da Gl=F3ria=20 Caldeira</DIV></DIV></DIV></DIV> <DIV class=3DRightContainer> <DIV id=3DMainDiv class=3DStdDiv> <DIV id=3DQNav class=3DQuestionNavigation> <P style=3D"TEXT-ALIGN: right"><BUTTON onblur=3DFuncBtnOut(this) = id=3DShowMethodButton=20 onmouseup=3DFuncBtnOver(this) class=3DFuncButton = onfocus=3DFuncBtnOver(this)=20 onmouseover=3DFuncBtnOver(this) onmouseout=3DFuncBtnOut(this)=20 onmousedown=3DFuncBtnDown(this) onclick=3D"ShowHideQuestions(); return = false;"=20 type=3Dsubmit>Mostrar todas as perguntas:</BUTTON> </P> <DIV id=3DOneByOneReadout><BUTTON onblur=3DFuncBtnOut(this) = id=3DPrevQButton=20 onmouseup=3DFuncBtnOver(this) class=3DFuncButton = onfocus=3DFuncBtnOver(this)=20 onmouseover=3DFuncBtnOver(this) onmouseout=3DFuncBtnOut(this)=20 onmousedown=3DFuncBtnDown(this) onclick=3D"ChangeQ(-1); return false;"=20 type=3Dsubmit><=3D</BUTTON> <SPAN id=3DQNumReadout = class=3DQNum> </SPAN><BUTTON=20 onblur=3DFuncBtnOut(this) id=3DNextQButton onmouseup=3DFuncBtnOver(this) = class=3DFuncButton onfocus=3DFuncBtnOver(this) = onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this)=20 onclick=3D"ChangeQ(1); return false;" type=3Dsubmit>=3D></BUTTON> = <BR></DIV></DIV> <OL id=3DQuestions class=3DQuizQuestions> <LI style=3D"DISPLAY: none" id=3DQ_0 class=3DQuizQuestion> <P class=3DQuestionText>Como se sentiu a formiga debaixo da neve?</P> <DIV id=3DQ_0_SA class=3DShortAnswer> <FORM onsubmit=3D"return false;" method=3Dpost action=3D""> <DIV><TEXTAREA onblur=3DLeaveGap() id=3DQ_0_Guess = class=3DShortAnswerBox onfocus=3D"TrackFocus('Q_0_Guess')" rows=3D2 = cols=3D29></TEXTAREA><BR><BR><BUTTON=20 onblur=3DFuncBtnOut(this) onmouseup=3DFuncBtnOut(this) = class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this)=20 onclick=3DCheckShortAnswer(0) type=3Dsubmit>Verifica</BUTTON><BUTTON=20 onblur=3DFuncBtnOut(this) onmouseup=3DFuncBtnOut(this) = class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this) = onclick=3DShowHint(0)=20 type=3Dsubmit>Pista</BUTTON><BUTTON onblur=3DFuncBtnOut(this)=20 onmouseup=3DFuncBtnOut(this) class=3DFuncButton = onfocus=3DFuncBtnOver(this)=20 onmouseover=3DFuncBtnOver(this) onmouseout=3DFuncBtnOut(this)=20 onmousedown=3DFuncBtnDown(this) onclick=3DShowAnswers(0) = type=3Dsubmit>Mostrar=20 resposta</BUTTON></DIV></FORM></DIV></LI> <LI style=3D"DISPLAY: none" id=3DQ_1 class=3DQuizQuestion> <P class=3DQuestionText>Quem a salvou de morrer gelada?</P> <DIV id=3DQ_1_SA class=3DShortAnswer> <FORM onsubmit=3D"return false;" method=3Dpost action=3D""> <DIV><TEXTAREA onblur=3DLeaveGap() id=3DQ_1_Guess = class=3DShortAnswerBox onfocus=3D"TrackFocus('Q_1_Guess')" rows=3D3 = cols=3D29></TEXTAREA><BR><BR><BUTTON=20 onblur=3DFuncBtnOut(this) onmouseup=3DFuncBtnOut(this) = class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this)=20 onclick=3DCheckShortAnswer(1) type=3Dsubmit>Verifica</BUTTON><BUTTON=20 onblur=3DFuncBtnOut(this) onmouseup=3DFuncBtnOut(this) = class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this) = onclick=3DShowHint(1)=20 type=3Dsubmit>Pista</BUTTON><BUTTON onblur=3DFuncBtnOut(this)=20 onmouseup=3DFuncBtnOut(this) class=3DFuncButton = onfocus=3DFuncBtnOver(this)=20 onmouseover=3DFuncBtnOver(this) onmouseout=3DFuncBtnOut(this)=20 onmousedown=3DFuncBtnDown(this) onclick=3DShowAnswers(1) = type=3Dsubmit>Mostrar=20 resposta</BUTTON></DIV></FORM></DIV></LI> <LI style=3D"DISPLAY: none" id=3DQ_2 class=3DQuizQuestion> <P class=3DQuestionText>O que sentiu a formiga quando a neve = derreteu?</P> <DIV id=3DQ_2_SA class=3DShortAnswer> <FORM onsubmit=3D"return false;" method=3Dpost action=3D""> <DIV><TEXTAREA onblur=3DLeaveGap() id=3DQ_2_Guess = class=3DShortAnswerBox onfocus=3D"TrackFocus('Q_2_Guess')" rows=3D3 = cols=3D29></TEXTAREA><BR><BR><BUTTON=20 onblur=3DFuncBtnOut(this) onmouseup=3DFuncBtnOut(this) = class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this)=20 onclick=3DCheckShortAnswer(2) type=3Dsubmit>Verifica</BUTTON><BUTTON=20 onblur=3DFuncBtnOut(this) onmouseup=3DFuncBtnOut(this) = class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this) = onclick=3DShowHint(2)=20 type=3Dsubmit>Pista</BUTTON><BUTTON onblur=3DFuncBtnOut(this)=20 onmouseup=3DFuncBtnOut(this) class=3DFuncButton = onfocus=3DFuncBtnOver(this)=20 onmouseover=3DFuncBtnOver(this) onmouseout=3DFuncBtnOut(this)=20 onmousedown=3DFuncBtnDown(this) onclick=3DShowAnswers(2) = type=3Dsubmit>Mostrar=20 resposta</BUTTON></DIV></FORM></DIV></LI></OL></DIV></DIV> <DIV id=3DFeedbackDiv class=3DFeedback> <DIV id=3DFeedbackContent class=3DFeedbackText></DIV><BUTTON = onblur=3DFuncBtnOut(this)=20 id=3DFeedbackOKButton onmouseup=3DFuncBtnOut(this) class=3DFuncButton=20 onfocus=3DFuncBtnOver(this) onmouseover=3DFuncBtnOver(this)=20 onmouseout=3DFuncBtnOut(this) onmousedown=3DFuncBtnDown(this)=20 onclick=3D"HideFeedback(); return false;" = type=3Dsubmit> OK </BUTTON>=20 </DIV><!-- BeginBottomNavButtons --> <DIV id=3DBottomNavBar class=3DNavButtonBar><BUTTON = onblur=3DNavBtnOut(this)=20 onmouseup=3DNavBtnOut(this) class=3DNavButton onfocus=3DNavBtnOver(this) = onmouseover=3DNavBtnOver(this) onmouseout=3DNavBtnOut(this)=20 onmousedown=3DNavBtnDown(this) onclick=3D"location=3D'2=BA ano.htm'; = return false;"=20 type=3Dsubmit>=CDndice</BUTTON><BUTTON onblur=3DNavBtnOut(this)=20 onmouseup=3DNavBtnOut(this) class=3DNavButton onfocus=3DNavBtnOver(this) = onmouseover=3DNavBtnOver(this) onmouseout=3DNavBtnOut(this)=20 onmousedown=3DNavBtnDown(this)=20 onclick=3D"location=3D'QUESTION=C1RIO-II.htm'; return false;"=20 type=3Dsubmit>=3D></BUTTON> </DIV><!-- EndBottomNavButtons --><!-- = BeginSubmissionForm --><!-- EndSubmissionForm --></BODY></HTML>