'; var bodyTagFrame2=''; var noBorderBodyTagFrame2=''; var soundEnable = 0; var okSound=''; var errSound=''; var warnSound=''; var valid; var nScore; var maxScore; var questions=15; var qstHead; var pageWidth = 80; var groups; var quizTitle="Apparato tegumentario"; var maxtime=2400; var showTimeout = 1; var keycode; var keyword = 'syskey'; var los = 0; var maxvoto = 10; var minvoto = 0; var roundvoto = 0.1; var voto = 0; var silent = 0; var quizRetire = 1; var showReport = 1; var ncols_report = 1; var valutaQuiz = 1; var falseQuests = 0; var invisibleQuests = 0; var auto_repeat = 0; var man_repeat = 0; var n_repeat = 0; var reviewQuiz = 0; var markPercentage = 1; var incl_close_btn = 1; var incl_print_btn = 1; var incl_linkback = 0; var finalMess = ''; var printCpRg=1; var filename = 'quiz tegumentario'; var topChartFile=''; var pesi; var allAnsReport; var author = ''; var mediaDir = 'media'; var questSlide = 1; var lockRightAns = 0; var resultBoxKind = 0; var reportNotation = 2; var remRepAlways = 1; var confirmEachQst = 1; var isResultsPageDark = 0 var compressReport = 0 var ordineDomande; var typeOfQuest; var omitPoint; var nc=0, ns=0, nr; var end_test=0; var userName=""; var identityName=""; var computeMarkErr = 0; var okIcon = "smiling.gif"; var koIcon = "no.gif"; var warnIcon = "warn.gif"; var checkIcon = "check.gif"; function setCookie(cookie_name,cookie_value,minuti) { var expdate= new Date(); cookie_value+="#"; expdate.setTime(expdate.getTime()+(60000*minuti)); document.cookie = cookie_name+"="+escape(cookie_value)+"; expires="+expdate.toGMTString(); } function setTempCookie(cookie_name,cookie_value,minuti) { document.cookie = cookie_name+"="+escape(cookie_value+"#"); } function getCookie(cookie_name) { var arg; var alen; var clen = document.cookie.length; var i=0,j,k; var valore; arg = cookie_name + "="; alen=arg.length while (i'; } } else { if (getBrowser()=="NS") { tagSound = ''; } } return tagSound; } function PlaySound(suonoID) { if (soundEnable==0) return; var thissound=document.getElementById(suonoID); if (thissound!=null) { thissound.Play(); } } var dlgList = new init_array(10); var nDlgs = 0; function MyDialog(dlgId,filename,x,y) { this.dlgId = dlgId; this.filename = filename; this.x = x; this.y = y; this.opened = 0; this.handle = 0; } function CreateDialog(dlgId,filename,x,y) { var my_dialog; var i,found=0; for (i=0; i=0; i--) { if (str.charAt(i)!=' ') break; } iStop = i; if ((iStart!=0)||(iStop!=str.length-1)) return str.substring(iStart,iStop+1); return str; } function rand(n) { return Math.floor(Math.random()*n); } function DataToStringa() { var obj = new Date(); var mese,giorno; var nome=""; var stringa=""; var strData; giorno = obj.getDay(); switch(giorno) { case 0: nome = "Domenica"; break; case 1: nome = "Lunedi'"; break; case 2: nome = "Martedi'"; break; case 3: nome = "Mercoledi'"; break; case 4: nome = "Giovedi'"; break; case 5: nome = "Venerdi'"; break; case 6: nome = "Sabato"; break; } strData = nome+", "+obj.getDate(); mese = obj.getMonth(); switch(mese) { case 0: nome = "Gennaio"; break; case 1: nome = "Febbraio"; break; case 2: nome = "Marzo"; break; case 3: nome = "Aprile"; break; case 4: nome = "Maggio"; break; case 5: nome = "Giugno"; break; case 6: nome = "Luglio"; break; case 7: nome = "Agosto"; break; case 8: nome = "Settembre"; break; case 9: nome = "Ottobre"; break; case 10: nome = "Novembre"; break; case 11: nome = "Dicembre"; } strData += " "+nome+" "+obj.getYear(); strData += " - "; if (obj.getHours()<10) strData += "0" + obj.getHours(); else strData += obj.getHours(); strData += ":"; if (obj.getMinutes()<10) strData += "0" + obj.getMinutes(); else strData += obj.getMinutes(); strData += ":"; if (obj.getSeconds()<10) strData += "0" + obj.getSeconds(); else strData += obj.getSeconds(); return strData; } function SetInnerText(obj,text) { if(document.all) { obj.innerText = text; } else { obj.textContent = text; } } function getBrowserVers() { return parseInt (navigator.appVersion.charAt(0)); } function getBrowser() { var appVers = navigator.appVersion; if (navigator.appName=="Netscape") { if ((appVers.indexOf("Safari")!=-1)&&(appVers.indexOf("Chrome")==-1)) { return "SF"; } else if (appVers.indexOf("Chrome")!=-1) { return "CR"; } return "NS"; } else if (navigator.appName=="Microsoft Internet Explorer") { return "IE"; } else if (navigator.appName=="Opera") { return "OP"; } return ""; } function pluginInstalled(str) { var i; for (i=0; i255)) return "NULL"; car = '%'+dec_to_hex(n); return unescape(car); } function DecodeString(msg) { var i,j,n; var decode_msg=""; var num; var car; n = keyword.length; j=0; for(i=0;i127)) { PrintWrongKeyword(); return ""; } car = '%'+dec_to_hex(num); decode_msg+=unescape(car); j++; } return decode_msg; } function DecodeNumber(i,n,minNum,maxNum) { var num,lung; lung = keyword.length; num=i-keycode[n%lung]; if ((nummaxNum)) PrintWrongKeyword(); return num; } function CodeString(msg) { var i,n; var code_msg=""; var c=0; n = keyword.length; for (i=0;i127) c = 127 + keycode[i%n]; else c = ASCIItoInt(msg.charAt(i)) + keycode[i%n]; if (c<10) code_msg += " "+c; else if (c<100) code_msg += " "+c; else code_msg += ""+c; } return code_msg; } function MakeKeyCode() { var i,num; var car; keycode = new init_IntArray(keyword.length,0); for (i=0;i='a')&&(car<='z')) { keycode[i]=num-97; continue; } if ((car>='A')&&(car<='Z')) { keycode[i]=num-65; continue; } keycode[i]=0; } } function AnsReport(choice,value,rem,data,answer) { this.choice = choice; this.valuation = value; this.remark = rem; this.data = data; this.answer = answer; } function doValuate(n) { if (typeOfQuest[n]==1) doValuateMultiAns(n); else if (typeOfQuest[n]==101) doValuateWithPoints(n); else if (typeOfQuest[n]==2) doValuateBoolAns(n); else if (typeOfQuest[n]==3) doValuateOpenAns(n); else if (typeOfQuest[n]==4) doValuateFillGap(n); else if (typeOfQuest[n]==5) doValuateMatching(n); } function doValuateMultiAns(n) { nScore[n] = getGuessAns(n); maxScore[n] = getNumAns(n); if (nScore[n]==maxScore[n]) valid[n]=1; else valid[n]=-1; } function doValuateWithPoints(n) { nScore[n] = getScore(n); maxScore[n] = ConvertPointToMark(n,nScore[n]); valid[n]=5; } function doValuateBoolAns(n) { nScore[n] = getGuessAns(n); maxScore[n] = getNumAns(n); if (nScore[n]==maxScore[n]) valid[n]=1; else if (nScore[n]==0) valid[n]=-1; else valid[n]=3; } function doValuateFillGap(n) { nScore[n] = getGuessFillGap(n); maxScore[n] = getNumAns(n); if (nScore[n]==maxScore[n]) valid[n]=1; else if (nScore[n]==0) valid[n]=-1; else valid[n]=3; } function doValuateMatching(n) { nScore[n] = getGuessMatch(n); maxScore[n] = getNumAns(n); if (nScore[n]==maxScore[n]) valid[n]=1; else if (nScore[n]==0) valid[n]=-1; else valid[n]=3; } function doValuateOpenAns(n) { nScore[n] = 0; maxScore[n] = 0; valid[n] = 2; } function getGuessAns(n) { var j,guess=0; for (j=0;j0)&&(choice==1)) || ((value<0)&&(choice==0))) return 1; return 0; } function getGuessMatch(n) { var j,guess=0; for (j=0;j0) msg += Lettera(j)+' '; } return msg; } function getNumOfRightAns(n) { var j,value,num=0; for (j=0;j0) num++; } return num; } function getListOfSelAns(n) { var j,value,msg=''; if (typeOfQuest[n]==3) { return allAnsReport[n][0].choice; } for (j=0;j=60) nc++; else ns++; } else if (valid[i]==5) { ratio = 100 * maxScore[i] / maxvoto; if (ratio>=60) nc++; else ns++; } if (valid[i]!=0) nr--; if ((valid[i]==2)||(valid[i]==4)) nexcl++; } if ((questSlide==1)&&(lockRightAns==1)) { if (nc + nexcl == questions) return 1; } else { if (nr==0) return 1; } return 0; } function StoreAnswer(n) { var j; var cookieName = ""; var numOfReport; for (j=0;j numOfReport) { setTempCookie("qmake.aar.length",n+1); } } function RetrieveAnswer(n,numOfItems) { var j; var choice,valuation,remark,data,answer; var cookieName; this.length = numOfItems; for (j=0; j"); if (lockLeftCol==0) doc.writeln(""); for (i=0; i"+lista1[ordine1[i]]); else doc.writeln("