var nS=false; var d=new Array(); 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'>"; /*if (s[p][2]!=s[p][3]) {*/w=w+"&nbsp;"; if(l=="E") {w=w+"<font size=1>. Text";}else if(l=="F"){w=w+"<font size=1>. Texte";}w=w+"&nbsp;:</font> "; w=w+" <span class='text'>"+s[p][2]+"&nbsp;</span>"; w=w+"<br />"; /*}s[p][2]!=s[p][3]*/ w=w+"&nbsp;";if(l=="E"){w=w+"<font size=1>. Dictionary";}else if(l=="F"){w=w+"<font size=1>. Dictionnaire";} w=w+"&nbsp;: </font><span class='dictionary'>"+s[p][3]+"</span>"; if (s[p][4]!="" && s[p][4]!="$") {w=w+"<span class='target'> <font size=1>("+s[p][4]+")</font> ";} w=w+"</span>"; if (ipa==1) {w=w+"<br />&nbsp;"; if(l=="E") {w=w+"<font size=1>. Pronunciation";} else if(l=="F") {w=w+"<font size=1>. Prononciation";} w=w+"&nbsp;: </font>[&nbsp;<span style='position:relative;top:0.4ex'><img border=0 src='http://users.skynet.be/bk243601/10F15600663642/gif/"+s[p][0]+".gif'></span>&nbsp;]"; }/*ipa==1*/ w=w+"<br />&nbsp;";if(l=="E") {w=w+"<font size=1>. Translation";} else if (l=="F") {w=w+"<font size=1>. Traduction";} w=w+"&nbsp;: </font><span class='translation'>"+t[p][1]+"</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 /><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 />&nbsp;";}/*if*/}/*caseE*/break; case "U":{if (l=="E") {w=w+"<font size=1>Plural</font>";} else if (l=="F") {w=w+"<font size=1>Pluriel</font>";} w=w+"&nbsp;: <em>"+a[i].substring(1,a[i].length)+"</em>&nbsp;";}/*caseU*/break; case "X":{if (l=="E") {w=w+"&nbsp;<font size=1>Explanation</font>";} else if (l=="F") {w=w+"&nbsp;<font size=1>Explication</font>";} 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 />&nbsp;";}/*caseP*/break; case "T":{if(l=="E"){w=w+"<font size=1>Past participle</font>";}else if(l=="F"){w=w+"<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;<font size=1>Infinitive</font>";} else if(l=="F"){w=w+"&nbsp;<font size=1>Infinitif</font>";} 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) {document.all.hp.innerHTML="<input type='button' value='Check it' name='check' onclick='check()'>&nbsp;&nbsp;<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; if(c[rdnum][1]==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="";}