home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2002 September
/
Chip_2002-09_cd1.bin
/
tema
/
neural
/
webtest
/
CDfanglostroj
/
slova
/
top.js
< prev
next >
Wrap
Text File
|
2001-06-21
|
6KB
|
1 lines
pgcount=40;seccount=4;pganscount=3;imgsubdir='img/';questsubdir='znacky/';function V(){i[1]=new Array("VÜechna slovφΦka",1,40);i[2]=new Array("I - Hracφ plocha",1,18);i[3]=new Array("II - MφΦ",19,28);i[4]=new Array("III - HrßΦi",29,40)}function W(){b[1]='rozm∞ry';b[2]='hracφ plocha';b[3]='pomeznφ Φßra';b[4]='brankovß Φßra';b[5]='dΘlka';b[6]='Üφ°ka';b[7]='mezinßrodnφ utkßnφ (mno₧. Φφslo)';b[8]='vyznaΦenφ';b[9]='Φßry';b[10]='·zemφ';b[11]='ohraniΦujφcφ Φßry';b[12]='st°edovß Φßra';b[13]='st°edovß znaΦka';b[14]='brankovΘ ·zemφ';b[15]='pokutovΘ ·zemφ';b[16]='branky';b[17]='brankovΘ tyΦe';b[18]='b°evno';a[1]='dimensions';a[2]='field of play';a[3]='touch line';a[4]='goal line';a[5]='length';a[6]='width';a[7]='international matches';a[8]='markings';a[9]='lines';a[10]='area';a[11]='boundary lines';a[12]='halfway line';a[13]='centre mark';a[14]='goal area';a[15]='penalty area';a[16]='goals';a[17]='goalposts';a[18]='crossbar';b[19]='mφΦ';b[20]='kulat²';b[21]='zhotoven² z k∙₧e';b[22]='obvod';b[23]='vßha';b[24]='hra, utkßnφ';b[25]='tlak';b[26]='v²m∞na';b[27]='poÜkozen² mφΦ';b[28]='hra je p°eruÜena';a[19]='ball';a[20]='spherical';a[21]='made of leather';a[22]='circumference';a[23]='weight';a[24]='match';a[25]='pressure';a[26]='replacement';a[27]='defective ball';a[28]='the match is stopped';b[29]='hrßΦi';b[30]='dv∞ dru₧stva';b[31]='sestßvajφcφ';b[32]='jedenßct';b[33]='brankß°';b[34]='mΘn∞ ne₧';b[35]='sedm';b[36]='sout∞₧';b[37]='nßhradnφci';b[38]='pravidla, hernφ °ßd';b[39]='rozhodΦφ';b[40]='st°φdßnφ';a[29]='players';a[30]='two teams';a[31]='consisting';a[32]='eleven';a[33]='goalkeeper';a[34]='fewer than';a[35]='seven';a[36]='competition';a[37]='substitutes';a[38]='rules';a[39]='referee';a[40]='substitution'}var b=new Array(pgcount+1);var a=new Array(pgcount+1);var i=new Array(seccount+1);V();var q=0;var r=0;var w=0;var p=1;var o=pgcount;var v=1;var J=pgcount;var u=false;var C=false;var t=false;var T=0;var P=0;var O=1;var m=new Array(pgcount+1);var k=new Array(pgcount+1);var S=new String('abcdefghijklmnopqrstuvwxyz');var s=1000000;var h=0;var l=new Array(pganscount);var n=0;var j=0;function Q(){r=0;w=0;q=0;j=0;for(idx=0;idx<=pgcount;idx++){m[idx]=0;k[idx]=0;}}function E(c,e){tmpS=b[c];b[c]=b[e];b[e]=tmpS;tmpS=a[c];a[c]=a[e];a[e]=tmpS;tmpN=m[c];m[c]=m[e];m[e]=tmpN;tmpN=k[c];k[c]=k[e];k[e]=tmpN;}function F(f,d){expand=d-f;for(idx=f;idx<=d;idx++){rnd=Math.round(Math.random()*expand)+f;if(rnd!=idx)E(idx,rnd)}}function R(f,d,z,x,y){c=d;if(!z)z=s;if(!x)x=s;if(!y)y=s;while(c>=f){if((m[c]>=z)||(k[c]>=x)||(m[c]+k[c]>=y)){d--;for(e=c;e<=d;e++)E(e,e+1);}c--;}return d-f+1}function K(g,I){if(h==0){h=p-1;I=false;doask=true;getnext=true;j=0;}else{if(I){list=g.elements[0];answer=list.options[list.selectedIndex].value;if(t||!j)q++;if(answer==n){doask=true;getnext=true;if(t||!j){k[h]++;r++;}j=0}else{doask=u;getnext=u;if(t||!j){m[h]++;w++;}j=-1}}else{doask=true;getnext=false;j=1;}}if(getnext){h++;j=0;if(h>o){newqcount=R(p,o,T,P,O);o=p+newqcount-1;h=p;if(C)F(p,o)}if(h<=o){l[0]=h;n=0;for(idx=1;idx<pganscount;idx++){ansrange=J-v;somesame=true;while(somesame){rnd=Math.round(Math.random()*ansrange)+v;somesame=false;for(subidx=0;subidx<idx;subidx++)if(a[l[subidx]]==a[rnd])somesame=true}l[idx]=rnd}for(idx=0;idx<pganscount;idx++){rnd=Math.round(Math.random()*(pganscount-1));if(rnd!=idx){tmp=l[idx];l[idx]=l[rnd];l[rnd]=tmp;if(n==idx)n=rnd;else if(n==rnd)n=idx}}}}L();if(h>o){G(g);return;}if(doask)checkpar="true";else checkpar="false";with(parent.frames[2].document){open('text/html','replace');writeln('<html>');writeln('<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">');writeln('<body bgcolor="white">');writeln('<form name="InputForm">');writeln('<h2>'+b[h]+'</h2>');writeln('Tento v²raz znamenß:');writeln('<ol type="a">');for(idx=0;idx<pganscount;idx++){if((!doask)&&(idx==n))writeln('<b><font color="navy">');writeln('<li>'+a[l[idx]]);if((!doask)&&(idx==n))writeln('</font></b>')}writeln('</ol>');if(doask){writeln('Vyberte prosφm odpov∞∩: ');writeln('<select name="ansselect">');for(idx=0;idx<pganscount;idx++)write('<option value="',idx,'">'+S.charAt(idx)+') ');writeln('</select>');writeln('a stiskn∞te tlaΦφtko ')}else{writeln('Sprßvnß odpov∞∩ je vytiÜt∞na <font color="navy"><b>modr²m tuΦn²m pφsmem.</font></b><br>')}writeln('<input type="button" value="DalÜφ " onClick="parent.frames[0].K(this.form, '+checkpar+')">');writeln('<input type="button" value="Konec" onClick="parent.frames[0].G(this.form)">');writeln('</form></body></html>');close()}}function D(g,f,d,U,B){f=Number(f);if(f<1)f=1;d=Number(d);if(d>pgcount)d=pgcount;u=U;C=B;W();if(B)F(f,d);p=f;o=d;selsect=H(g);v=i[selsect][1];J=i[selsect][2];h=0;Q();K(g,false)}function G(g){parent.frames[2].location.href='theend.htm';}function L(){with(parent.frames[1].document){open('text/html','replace');writeln('<html>');writeln('<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">');writeln('<body background="'+imgsubdir+'bg.gif">');writeln('<font size=+1 color="brown"><center>');writeln('<b>Otßzek: ',q,' Sprßvn∞: ',r,' Chyb: ',w,'<br>');if(q>0)score=String(Math.floor(100*r/q))+'%';else score='';writeln('┌sp∞Ünost: ',score,'<br>');writeln('</body></html>');close()}}function N(A){A.writeln('<select name="SelectSect" onChange="parent.frames[0].M(this.form)">');for(idx=1;idx<=seccount;idx++){A.writeln('<option value="',idx,'">',i[idx][0])}A.writeln('</select>')}function H(g){list=g.SelectSect;return list.options[list.selectedIndex].value}function M(g){selsect=H(g);if((selsect<1)||(selsect>seccount))selsect=1;g.c1.value=i[selsect][1];g.c2.value=i[selsect][2]}