var c=new Array();var d=new Array();var u=0;var strNum=0;var rdnum;var wrong=0;var score;
function v(p){var blnB=0;var w;w="<table border=0 cellpadding=0 cellspacing=0 width='100%'>";w=w+"<tr><td align='left' valign='top'>&nbsp;<span class='target'>";if(l=="E") {w=w+"<!--Word-->";}else if(l=="F"){w=w+"<!--Mot-->";} w=w+"<!--&nbsp;: -->";w=w+"</span><span class='text'>"+s[p][2]+"&nbsp;"; if (s[p][4]!="-") {w= w+"("+s[p][4]+")&nbsp;";}/*if s[4]*/ w= w+ "</span>"; if (s[p][11]!="N") {w=w+" <span style='position:relative;top:0.4ex'>&nbsp;<img border=0 id='"+s[p][0];w=w+"' src='http://www.linguistmail.com/gif/sound.gif'";w=w+" style='cursor:hand'>&nbsp;</span><span onclick='stop()' style='cursor:hand;position:relative;top:0.4ex'><img border=0 src='http://www.linguistmail.com/gif/stop.gif'></span>";} w= w+"<br /><span class='source'>";w=w+"&nbsp;";if(l=="E") {w=w+"<!--Translation-->";} else if (l=="F") {w=w+"<!--Traduction-->";} w=w+"<!--&nbsp;: --></span><span class='translation'>"+t[p][1]+"&nbsp;</span>";if (t[p][2] != "" && t[p][2]!="-") {w=w+"<span class='source'> <font size=1>("+t[p][2]+")</font> ";}w=w+"</span>"; if (s[p][5]!="") { var g=new String(s[p][5]);var a=g.split("%");w=w+"<br /><span class='grammar'>"; for (var i=1;i<a.length;i++) { switch(a[i].charAt(0)) { case "E":{if (l=="E") {w=w+"&nbsp;<font size=1>Gender</font>";} else if (l=="F") {w=w+"&nbsp;<font size=1>Genre</font>";} if (g.charAt(2)=="d") {w= w+"&nbsp;: <em>de</em>&nbsp;";}/*if Dutch de*/ else if (g.charAt(2)=="h") {w= w+"&nbsp;: <em>het</em>&nbsp;";}/*if Dutch het*/ else {w= w+"&nbsp;: <em>"+g.charAt(2)+"</em>&nbsp;";}/*else*/ if (i==a.length-2) {if (a[i+1].charAt(0)=="U") w=w+"<br />";}/*if*/}/*caseE*/break; case "U":{if (l=="E") {w=w+"&nbsp;<font size=1>Plural</font>";} else if (l=="F") {w=w+"&nbsp;<font size=1>Pluriel</font>";} w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em>&nbsp;";}/*caseU*/break; case "X":{if (i>1) {w= w+ "<br />";} if (l=="E") {w=w+"&nbsp;Explanation";} else if (l=="F") {w=w+"&nbsp;Explication";} w=w+"&nbsp;: "+a[i].substring(1,a[i].length)+"&nbsp;";}/*caseX*/break; case "R":{if (l=="E") {w=w+"&nbsp;<font size=1>Present</font>";} else if(l=="F"){w=w+"&nbsp;<font size=1>Présent</font>";} w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em><br />&nbsp;";}/*caseR*/break; case "P":{if(l=="E"){w=w+"<font size=1>Past</font>";} else if(l=="F"){w=w+"<font size=1>Passé</font>";} w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em><br />";}/*caseP*/break; case "T":{if(l=="E"){w=w+"&nbsp;<font size=1>Past participle</font>";}else if(l=="F"){w=w+"&nbsp;<font size=1>Participe passé</font>";} w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em>"; if (i==a.length-2) w=w+"<br />&nbsp;";}/*caseT*/break; case "F":{if(l=="E"){w=w+"<font size=1>Future</font>";} else if(l=="F"){w=w+"<font size=1>Futur</font>";} w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em></font></span>";}/*caseF*/break; case "I":{if (l=="E"){w=w+"&nbsp;Infinitive";}else if(l=="F"){w=w+"&nbsp;Infinitif";}w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em>&nbsp;";}/*caseI*/break; case "B":{w=w+"</span><p><table border=0 cellpadding=2 cellspacing=1 width='95%'>"; if (blnB==0) {w=w+"<tr><td colspan=2><font size=1><strong>"+gr[a[i].substring(1,a[i].length)][1]+"</strong></font></td></tr>";} w=w+"<tr><td valign='top'><strong>&nbsp;</strong></td><td><font size=1>"+gr[a[i].substring(1,a[i].length)][3]+"</font></td></tr></table></p>";blnB=1;}/*caseB*/break; }/*switch*/}/*for*/w=w+"</td></tr></table>";}/*if*/ else {w=w;} document.all.voc.innerHTML=w;document.all.sound.innerHTML="&nbsp;";c[u]=new Array(6);c[u][0]=s[p][2];c[u][1]=s[p][3];c[u][2]=t[p][1];c[u][3]=t[p][2];c[u][4]="test";c[u][5]=s[p][0];u+=1;} function cw(h) { if(h=="with") {for (var j=0;j<u;j++) { if(c[j][0]==c[j][1]) {alert(c[j][0]+" ("+c[j][2]+")");}/*if*/ else {if (s[0][1]=="linguistmail") { alert(c[j][0]+" -> "+c[j][1]+" ("+c[j][2]+")");}/*else*/ else{alert(c[j][0]+" ("+c[j][2]+")");}} }/*for*/}/*if h*/ else if(h=="without") {for (var j=0;j<u;j++) { if(c[j][0]==c[j][1]) {alert(c[j][0]);}/*if*/ else {if (s[0][1]=="linguistmail") { alert(c[j][0]+" -> "+c[j][1]);}/*else*/ else {alert(c[j][0]);}} }/*for*/}/*else h*/ else if(h=="reverse") {for (var j=0;j<u;j++) if(c[j][2]!="-") {{ if (c[j][3]==""){alert(c[j][2]);} else {alert(c[j][2]+" ("+c[j][3]+")");} }}/*for*/ }/*else h*/ } function test() {document.all.myanswer.focus();document.all.myanswer.value="";document.all.theanswer.innerHTML="&nbsp;"; if(u!=0 && u>strNum) {document.all.voc.innerHTML=""; document.all.thequestion.innerHTML=""; document.all.theanswer.innerHTML="&nbsp;"; document.all.myanswer.value=""; rdnum=Math.floor(Math.random()*u); while (c[rdnum][4]!="test") { rdnum=Math.floor(Math.random()*u); }/*while*/ if (c[rdnum][4]=="test" && u>strNum) {if(l=="E"){document.all.listen.innerHTML="<input alt='Listen' type='image' id='"+c[rdnum][5]+"' src='http://www.linguistmail.com/gif/sound.gif'> <input alt='Arrêter' type='image' onclick='stop()' id='stop' src='http://www.linguistmail.com/gif/stop.gif'> <input type='button' value='Test' onclick='test()' name='thetest2'>";}else if(l=="F"){document.all.listen.innerHTML="<input alt='Ecouter' type='image' id='"+c[rdnum][5]+"' src='http://www.linguistmail.com/gif/sound.gif'> <input alt='Arrêter' type='image' onclick='stop()' id='stop' src='http://www.linguistmail.com/gif/stop.gif'> <input type='button' value='Test' onclick='test()' name='thetest2'>";} document.all.thequestion.innerHTML=c[rdnum][2]; if(c[rdnum][3]!="" && c[rdnum][3]!="-") {document.all.thequestion.innerHTML=document.all.thequestion.innerHTML+" <font size=1>("+c[rdnum][3]+")</font>"} document.all.thequestion.innerHTML=document.all.thequestion.innerHTML+"";document.all.first.innerHTML="";}/*if*/ strNum+=1; }/*if(u!=0 &&)*/ else {document.all.thequestion.innerHTML=""; if(u!=0){for(var ls=0;ls<strNum;ls++) {if(c[ls][4]=="right") {wrong+=1;}/*if(c[ls][4]*/}/*for*/ score=(wrong/strNum)*100;score=Math.round(score);/*document.all.thequestion.innerHTML="score = "+score+"% (#"+wrong+"/"+strNum+")";*/document.all.thetest2.value="Test";u=0;strNum=0;}/*if(u!=0)*/ if(l=="E"){alert("You have to click on a word in order to test it");}/*if l*/ else if(l=="F"){alert("Vous devez cliquer sur un mot pour pouvoir le tester");}/*else if l*/}/*else*/ } function check() {if (u!=0) {var rest=u-strNum;/*was [1]*/ if(c[rdnum][0]==document.all.myanswer.value) {c[rdnum][4]="right"; if(l=="E") {if(rest!=0){document.all.theanswer.innerHTML="<font color='#00cc00'><strong>RIGHT!</strong></font>"+" <font size=1>[test(s) still available : "+rest+"]</font>";}/*rest!=0*/ else{/*document.all.thetest2.value="Score";*/document.all.theanswer.innerHTML="<font color='#00cc00'><strong>RIGHT!</strong></font>";}/*rest!=0*/ }/*l==E*/ else if(l=="F") {if(rest!=0){document.all.theanswer.innerHTML="<font color='#00cc00'><strong>CORRECT!</strong></font>"+" <font size=1>[test(s) encore disponible(s) : "+rest+"]</font>";}/*rest!=0*/ else{/*document.all.thetest2.value="Score";*/document.all.theanswer.innerHTML="<font color='#00cc00'><strong>CORRECT!</strong></font>";}/*rest!=0*/ }/*l==F*/ }/*if*/ else {c[rdnum][4]="wrong"; if(l=="E") {if(rest!=0){document.all.theanswer.innerHTML="<font color='#ff0000'><strong>WRONG!</strong></font>"+" <font size=1>[test(s) still available : "+rest+"]</font>";}/*rest!=0*/ else{/*document.all.thetest2.value="Score";*/document.all.theanswer.innerHTML="<font color='#ff0000'><strong>WRONG!</strong></font>";}/*rest!=0*/ }/*l==E*/ else if(l=="F") {if(rest!=0){document.all.theanswer.innerHTML="<font color='#ff0000'><strong>FAUX!</strong></font>"+" <font size=1>[test(s) encore diponible(s) : "+rest+"]</font>";} document.all.myanswer.value=c[rdnum][1];document.all.myanswer.focus();}/*rest!=0*/ else{/*document.all.thetest2.value="Score";*/document.all.theanswer.innerHTML="<font color='#ff0000'><strong>FAUX!</strong></font>";}/*rest!=0*/ }/*l==F*/ }/*u!=0*/ } function stop(){document.all.sound.innerHTML="";}