home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 September / Chip_2002-09_cd1.bin / tema / neural / webtest / Slovniky / Globe / top.js < prev    next >
Text File  |  2001-06-21  |  23KB  |  1 lines

  1. var w1=3;var r4='';var N1='';var X1='';var p2='What does <font size=+1>';var s3='Which expression is described by:<br><b>';var q2='</font> mean?';var y3='</b><p>';var _1='';var U1='';var P1='<b><font color="navy">';var Q1='</font></b>';var B4='in blue bold letters';var q1=new Array(new Array("Resume previous test",0,0),new Array("I - Nouns A-M",1,16),new Array("II - Nouns N-Z",17,32),new Array("III - Adjectives",33,40),new Array("All words",1,40));var X=new Array("concretion","dissolution","dinural cycle","effervescence","eluviation","erosion","evaporation","face","free carbonates","horizon","humus","hydrometer","illuviation","lithosphere","litter","metadata","nomenclature","organic matter","particle size distribution","ped","pedogenesis","pedosphere","soil consistence","soil horizons","soil profile","soil structure","soil texture","subsoil","supernatant","topsoil","transect","transpiration","alluvial","columnar","floury","friable","gravimetric","in situ","prismatic","uniform");var A=new Array("A nodule composed of concentrated chemicals in a soil (e.g. iron oxides, manganese oxides, calcium carbonates).","Soils, among other compounds, start dissolving into smaller units when placed in contact with water.","A daily cycle, a basic repetition period of 24 hours. All processes that are dominated by the sun are dinural. Tides, in contrast, repeat cycles twice daily.","The bubbling action that occurs as a gas comes out of a liquid for example when the carbon dioxide gas caused by the reaction of carbonate coatings on soil with an acid bubbles through acidic liquid.","The removal of materials in one horizon which are then "illuviated" or deposited into a lower horizon.","The removal and movement of soil materials by water, wind, ice, or gravity as well as by human activities such as agriculture or construction.","Water on Earth's surface or in the soil absorbs heat from the sun to the point that it vaporizes or evaporates and becomes part of the atmosphere.","The way an exposed section of soil or soil profile appears.","Carbonate materials that form coatings on soil that react with an acid to form carbon dioxide gas.","An individual layer within the soil which has its own unique characteristics (such as color, structure, texture, or other properties) that make it different from the other layers in the soil profile.","The part of the soil profile that is composed of decomposed organic matter from dead and decaying plants and animals.","An instrument based on the principles of buoyancy used to measure the specific gravity of a liquid in relation to the specific gravity os pure water at a specified temperature.","The deposit of materials carried by water from one horizon into another within the soil (such as clay or nutrients in solution).","The outer layer of soul and rock on a planet; it is called after the Greek word "lithos" meaning "stone."","The covering over the soil in a forest made up of leaves, needles, twigs, branches, stems, and fruits from the surrounding trees.","Data about data. Soil moisture data requires metadata describing the vegetation cover and possible sources of water in order to be interpreted properly.","A particular naming convention agreed to by many individuals or scientists.","Any plant or animal material added to the soil.","The amount (percent) of each of sand, silt, and clay in a soil sample.","An individual unit of natural soil structure or aggregation (such as granular, blocky, columnar, prismatic, or platey).","The formation of soil profiles depending on the five soil-forming factors (climate, parent material, topography, organisms, and time) to create the Pedosphere.","The thin outer layer of the Earth which is made up of soil. It acts as an integrator between the atmosphere, biosphere, lithosphere, and hydrosphere of the Earth.","How easy or hard it is for a soil ped to break apart when it is squeezed.","An identifiable soil unit due to color, structure, or texture.","The "face" of a soil when it has been cut vertically that shows the individual horizons and soil properties with depth.","The shape of soil units (peds) that occur naturally in a soil horizon. Some possible soil structures are granular, blocky, prismatic, columnar, or platy. Soils can also be structureless if they do not form into peds. In this case, they may be a consolidated mass (massive) or stay as individual particles (single-grained).","The way soil "feels" when it is squeezed between the fingers or in the hand. The texture depends on the amount of sand, silt, and clay in the sample (particle size distribution), as well as other factors (how wet it is, how much organic matter is in the sample, the kind of clay, etc.)","The common term for the layers beneath the topsoil.","Liquid above the settled soil that is cleaner than the soil","The common term for the top layer of soil.","In any field (outdoor) study, a transect consists of a line of study, often divided into intervals where observations or samples are collected.","Water in plants escapes or transpires into the atmosphere as the leaf stomates open to exchange carbon for oxygen.","Transported by water from one place to another.","A type of soil structure where the soil peds (or chunks) are in the shape of a column with a rounded top. This is found in arid regions.","Having the feel of wheat flour -- smooth and powdery.","A type of soil consistence in which the soil ped "pops" when squeezed between the thumb and fore finger with a small amount of pressure.","Relating to measurement by weight or variations in a gravitational field.","Latin for the original position.","A type of soil structure in which the soil ped is in the shape of a prism.","This term is used in its traditional sense that some characteristic displays similar properties, two related words are homogeneous (distributed evenly) and normal (distributed about a central mean value and described by a statistical equation).");var e1=new Array("");var I=new Array("");var Y2=new Array("");var Z1=false;var t4=true;var T2=q1.length;var T=Math.min(Math.max(X.length,e1.length),Math.max(A.length,I.length));var L=new Array();var P=0;var b=new Array(0,0,0,0,0,0,0,0,0,0);var T1=false;var e=new Array(T+1);var s=new Array(T+1);var v=new Array(T+1);var z=new String("");var V=new String("");var r=new Array(w1);var t=new Array(w1);var v2=new Array();var F2=new Array();var m1=0;var z1=0;var O1=0;var J2=new String('abcdefghijklmnopqrstuvwxyz');var i1=1000000,V2=-i1;var o1=new String('/_*@.');function L4(S3,R3){return S3-R3}function y(j){return((j!=null)&&(typeof(j)!='string')&&(j.length!=null))}function D2(j){for(var a=0;a<j.length;a++)if(!isNaN(j[a]))j[a]=Number(j[a])}function h1(O2){if(O2<0)O2=0;return Math.round(Math.random()*O2)}function E3(C1){if(typeof(C1)!='string')return C1;var e2=0,Y1=C1.length;while((e2<Y1)&&(C1.charAt(e2)==' '))e2++;while((e2<Y1)&&(C1.charAt(Y1-1)==' '))Y1--;return C1.substring(e2,Y1)}function c4(j,d,f){if(d<0)d=0;if(f>=j.length)f=j.length-1;if(f<=d)return;var a,k,m,Y3=f-d;for(a=d;a<=f;a++){m=d+h1(Y3);if(a!=m){k=j[a];j[a]=j[m];j[m]=k}}}function I4(j){if(!j.length)return 0;var c=j[0];for(var a=1;a<j.length;a++)if(c<j[a])c=j[a];return c}function H3(j){var c=0;for(var a=0;a<j.length;a++)if(j[a]>0)c++;return c}function K3(j,v3,M){var c=new String('');var x1=(M>=o1.length)?':':o1.charAt(M);for(var a=v3;a<j.length;a++){if(a)c+=x1;c+=(y(j[a]))?K3(j[a],0,M+1):j[a]}if(j.length-v3<2)c+=x1;return c}function J3(j,M,x3){var K,x1=(M>=o1.length)?':':o1.charAt(M);var c=j.split(x1);if(M<o1.length){x1=(M+1>=o1.length)?':':o1.charAt(M+1);for(var a=0;a<c.length;a++){K=c[a];if(K.indexOf(x1)>=0){if(K.charAt(K.length-1)==x1)K=K.substring(0,K.length-1);c[a]=(K.length)?J3(K,M+1,x3):new Array()}else if((x3)&&!isNaN(K))c[a]=Number(K)}}return c}function m4(){for(var a=0;a<=T;a++)e[a]=a-1;}function k4(){z1=0;O1=0;m1=0;for(var a=0;a<=T;a++){s[a]=0;v[a]=0;}}function b4(){N("Passes",K3(L,P,0),2);N("QSP",e.join("/"),2);N("QS1",v.join("/"),2);N("QS0",s.join("/"),2);N("LastRes",z1+'/'+O1+'/'+m1,2)}function i4(){var w,D1,c=true;w=B1("Passes");if(w){L=J3(w,0,true)}else{c=false}w=B1("QSP");if(w){e=w.split("/");D2(e)}else{c=false}w=B1("QS1");if(w){v=w.split("/");D2(v)}else{c=false}w=B1("QS0");if(w){s=w.split("/");D2(s)}else{c=false}w=B1("LastRes");if(w){D1=w.split("/");D2(D1)}else{c=false}if(D1.length>=3){z1=D1[0];O1=D1[1];m1=D1[2];P=0;if(P<L.length){b=L[P]}else{P=0;b=new Array(0,0,0,0,0,0,0,0,0,0);c=false}}else{c=false}return c}function F4(){N("Passes","",0);N("QSP","",0);N("QS1","",0);N("QS0","",0);N("LastRes","",0)}function p4(){return(B1("Passes")!=null)}function l3(d4){var m3=L.length;L[m3]=new Array(d4,new Array(),new Array(),new Array(),new Array(),new Array());for(var a=1;a<arguments.length;a++)L[m3][5+a]=arguments[a]}function X3(q3,t3){var k=e[q3];e[q3]=e[t3];e[t3]=k}function L3(d,f){var m,h4=f-d;for(var a=d;a<=f;a++){m=h1(h4)+d;if(m!=a)X3(a,m)}}function v4(d,f,h3,Y,W1){var c=new Array();if(Y>f){if(W1)Y=d;else return c}var b2=0,a=Y;if(f<d)return c;while(b2<h3){c[b2++]=a++;if(a>f){if(W1)a=d;else break}if(a==Y)break}return c}function G4(d,f,x4,W3,Q3,U3,k3,P2,e3,d3,a3,b3){if(d<0)d=0;if(f>=s.length)f=s.length-1;if(k3==null)k3=V2;if(d3==null)d3=i1;if(P2==null)P2=V2;if(a3==null)a3=i1;if(e3==null)e3=V2;if(b3==null)b3=i1;for(var a=d;a<=f;a++){if((s[e[a]]>=k3)&&(s[e[a]]<=d3)&&(v[e[a]]>=P2)&&(v[e[a]]<=a3)&&(s[e[a]]+v[e[a]]>=e3)&&(s[e[a]]+v[e[a]]<=b3)){s[e[a]]=x4*s[e[a]]+W3;v[e[a]]=Q3*v[e[a]]+U3}}}function o4(d,f,h3,Y,W1,Z2,X2,_2){var c=new Array();if(Y>f){if(W1)Y=d;else return c}var b2=0,a=Y;if(f<d)return c;if(!Z2)Z2=i1;if(!X2)X2=i1;if(!_2)_2=i1;while(b2<h3){if((s[e[a]]<Z2)&&(v[e[a]]<X2)&&(s[e[a]]+v[e[a]]<_2)&&(s[e[a]]>=0)&&(v[e[a]]>=0))c[b2++]=a;a++;if(a>f){if(W1)a=d;else break}if(a==Y)break}return c}function p3(){var k;if(Z1)return;T1=!T1;k=N1;N1=X1;X1=k;k=A;A=X;X=k;k=I;I=e1;e1=k;k=s3;s3=p2;p2=k;k=y3;y3=q2;q2=k;k=U1;U1=_1;_1=k}function n4(u){var F1,u2,G3,N2,E1,c=new Array();for(var a=0;a<u.elements.length;a++){F1=u.elements[a];u2=F1.name;if(u2.substring(0,8)=='ansinput'){G3=u2.charAt(8);N2=Number(u2.substring(9));if(!isNaN(N2)){E1=null;switch(G3){case'c':E1=F1.selectedIndex;break;case'r':if(F1.checked)E1=F1.value-1;break;case't':E1=F1.value;break;}if(E1!=null)c[N2]=E1}}}return c}function z2(l,a2,B,b1,B2){var c;if(B2)c=(B)?e1[l]:X[l];else c=(B)?e1[e[l]]:X[e[l]];if(y(c))c=c[a2];if(((!B)&&!(b1&1))||((B)&&!(b1&2)))c="";return(c==null)?"":c}function x2(l,C2,B,b1,B2){var i;if(B2)i=(B)?I[l]:A[l];else i=(B)?I[e[l]]:A[e[l]];if(Z1){if(i==null)return"";else i=(B2)?i[Y2[e[l]]]:i[Y2[l]]}else{if(y(i)){i=i[C2]}}if(((!B)&&!(b1&4))||((B)&&!(b1&8)))i="";return(i==null)?"":i}function A2(N3,C2,B,b1){var i=(B)?I[e[N3]]:A[e[N3]];if(Z1){if(i==null)return"";else i=i[C2]}else{if(y(i))i=i[C2]}if(((!B)&&!(b1&4))||((B)&&!(b1&8)))i="";return(i==null)?"":i}function E2(n1,d1){if(y(n1)){if(y(d1)){for(var o=0;o<n1.length;o++)for(var j1=0;j1<d1.length;j1++)if(n1[o]==d1[j1])return true}else{for(var o=0;o<n1.length;o++)if(n1[o]==d1)return true}}else{if(y(d1)){for(var j1=0;j1<d1.length;j1++)if(n1==d1[j1])return true}else{if(n1==d1)return true}}return false}function K4(s2,r2){return((E2(A[s2],A[r2])&&E2(I[s2],I[r2]))||(E2(X[s2],X[r2])&&E2(e1[s2],e1[r2])))}function o3(F,Z){var g3,Q2,U2,a,K1,k2;for(a=0;a<F.length;a++){k2=0;for(K1=0;K1<a;K1++)if(F[K1]==F[a]){k2=K1;break}if(k2){Z[a]=Z[k2]}else{g3=e1[e[F[a]]],Q2=X[e[F[a]]];U2=Math.max((y(g3))?g3.length:0,(y(Q2))?Q2.length:0);if((Z[a]==null)||(Z[a]>=U2))Z[a]=h1(U2-1)}}Z.length=F.length}function E4(l,l1,y1){var G1,u1,M1,a,n2,m,k,A1;var h,p=new Array();if(Z1){G1=e[l];u1=Math.max((A[G1]==null)?0:A[G1].length,(I[G1]==null)?0:I[G1].length);for(a=0;a<u1;a++)p[a]=[l,a,l,a];h=Y2[G1]}else{u1=w1;p[0]=new Array(l,0,l,0);for(a=1;a<u1;a++){M1=true;while(M1){m=h1(y1-l1)+l1;M1=false;for(n2=0;(n2<a)&&!M1;n2++)if(K4(e[p[n2][0]],e[m]))M1=true}p[a]=new Array(m,0,m,0)}for(a=0;a<u1;a++){A1=A[e[p[a]]];if(y(A1))p[a][1]=h1(A1.length-1);A1=I[e[p[a]]];if(y(A1))p[a][3]=h1(A1.length-1)}h=0}if(!(Z1&&t4)){for(a=0;a<u1;a++){m=h1(u1-1);if(m!=a){k=p[a];p[a]=p[m];p[m]=k;if(h==a)h=m;else if(h==m)h=a}}if(h>=w1){m=h1(w1-1);k=p[h];p[h]=p[m];p[m]=k;h=m}}if(p.length>w1)p.length=w1;return[h,p]}function w3(F,l1,y1){var g2,c3=F.length;for(var a=0;a<c3;a++){g2=E4(F[a],l1,y1);F2[a]=g2[0];v2[a]=g2[1]}F2.length=c3;v2.length=c3}function M2(k1,d,f,s1){var f1=1;for(var a=d;a<f;a++){f1--;if(!f1||k1[a]){k1[a]=1;f1=s1}else k1[a]=0}}function D3(k1,d,f){var a,H2,j2,g1,K2,W2,s1=0,f1=0;for(a=d;a<f;a++){if(k1[a]){if(f1>s1)s1=f1;f1=0}f1++}if(!s1)return;j2=d;for(a=d;a<=f;a++){if((a>=f)||k1[a]){g1=a-j2;if(g1&&(g1<s1)){K2=s1;for(H2=j2;H2<a;H2++){W2=Math.round(K2/g1--);K2-=W2;k1[H2]+=2*W2}}j2=a}}}function q4(w2){var l,n,C,o2;for(var g=0;g<b[1].length;g++){l=b[1][g];n=b[3][g];C=((n-1)%4)+1;switch(b[0]){case 1:o2=b[18][g];if(n>0){switch(C){case 1:case 2:b[18][g]=1;b[3][g]=n-C+4;break;case 3:case 4:if(w2[g]&&(b[17]||!o2))m1++;if(w2[g]>0){if(b[17]||!o2){v[e[l]]++;z1++}b[18][g]=0;b[3][g]=0}else if(w2[g]<0){if(b[17]||!o2){s[e[l]]++;O1++}b[18][g]=(b[16])?0:-1;b[3][g]=(b[16])?0:n-C+1}break;}}break;case 2:if((n>0)&&(C>2)){if(w2[g]>0)b[3][g]=0}break;default:;}}}function u4(I1){var a,E,p1,q,_,m;var H,c,g2,a1=false,V1=I1;do{H=false;switch(b[0]){case 0:H=true;c=false;break;case 1:E=-1;if(V1){if(!y(b[18]))b[18]=new Array();if(T1==!b[10])p3()}if(!b[1].length){if(b[11])L3(b[6],b[7]);E=b[6]}else{if(!H3(b[3])&&!V1){E=b[1][b[1].length-1]+1;b[1].length=0}}if(E>=0){b[1]=o4(b[6],b[7],b[12],E,b[22]-1,b[19],b[20],b[21]);p1=b[1].length;if((b[22]>1)&&p1&&(b[1][p1-1]<E))b[22]--;for(a=0;a<p1;a++){b[3][a]=b[13];b[4][a]=b[14];b[18][a]=0}b[3].length=p1;b[4].length=p1;b[18].length=p1;b[2].length=0;a1=true}_=b[1].length;if(a1){b[5].length=0;M2(b[5],0,_,b[15]);D3(b[5],0,_)}if(a1)o3(b[1],b[2]);if(a1||I1)w3(b[1],b[8],b[9]);H=(!_);c=!H;break;case 2:E=-1;if(V1){if(T1==!b[10])p3()}if(!b[1].length){if(b[11])L3(b[6],b[7]);E=b[6]}else{if(!H3(b[3])&&!V1){E=I4(b[1])+1;b[1].length=0}}if(E>=0){b[1]=v4(b[6],b[7],b[17],E,b[21]-1);q=b[1].length;if((b[21]>1)&&q&&(b[1][q-1]<E))b[21]--;for(a=0;a<q;a++){b[3][a]=b[18];b[4][a]=b[19]}b[3].length=q;b[4].length=q;b[2].length=0;if(q){for(a=0;a<q;a++)b[1][q+a]=b[1][a];c4(b[1],q,2*q-1);b[1].length=q+Math.min(b[12],q);for(a=q;a<q+b[12];a++){b[3][a]=b[13];b[4][a]=b[14];}}a1=true}_=b[1].length;if(a1){b[5].length=0;M2(b[5],0,q,b[20]);M2(b[5],q,_,b[15]);D3(b[5],0,_)}if(a1)o3(b[1],b[2]);if(a1||I1)w3(b[1],b[8],b[9]);H=(!_);c=!H;break;case 3:G4(b[6],b[7],b[10],b[11],b[12],b[13],b[14],b[15],b[16],b[17],b[18],b[19]);H=true;c=false;break;default:H=true;c=false;}if(H){if(++P<L.length){b=L[P];V1=true}else{H=false}}}while(!c&&H)return c}function G2(H4,M4){var O3=E3(H4.toString()),Z3=E3(M4.toString());return(O3.toLowerCase()==Z3.toLowerCase())}function y4(t2,l4,h,R1){var R=new Array();for(var a=0;a<t2.length;a++){if((R1[a]==null)||(h[a]==null))R[a]=0;else switch(t2[a]){case-1:case 0:case 1:case 2:case 5:case 6:case 9:case 10:case 13:case 14:R[a]=0;break;case 3:case 4:case 7:case 8:case 11:case 12:R[a]=(Number(R1[a])==h[a])?1:-1;break;case 15:case 16:if(R1[a]=='')R[a]=0;else{R[a]=-1;i=A[e[l4[a][h[a]][0]]];if(y(i)){for(var Q=0;Q<i.length;Q++)if(G2(R1[a],i[Q]))R[a]=1}else{if(G2(R1[a],i))R[a]=1}}break;default:R[a]=0;}}return R}function a4(F,Z,t2,f4,F3,D4,J4){var l,n,C,a2,U,O,h,D,x,G,a,g1,H1;var r1,j3,y2,S=new Array(0,0,0,0),t1=new Array(0,0,0,0),h2=2;with(parent.frames[2].document){open('text/html','replace');writeln('<html>');writeln('<head>');writeln('<title> </title>');writeln('<style> A { text-decoration: none } DIV.anslist { margin-left: 2.2em; text-indent: -1.2em } </style>');writeln('</head>');writeln('<body bgcolor="white">');writeln('<script language="JavaScript">function ProcessAns(qidx, ansidx) { parent.frames[0].i3(document.InputForm, false, qidx, ansidx) }<','/script>');writeln('<form name="InputForm" method="post" onSubmit="javascript:return false">');writeln('<table border="0" cellpadding="5" cellspacing="0">');for(var g=0;g<F.length;g++){n=t2[g];if(!n)continue;l=F[g];a2=Z[g];U=f4[g];O=D4[g];h=J4[g];h2|=F3[g]&1;g1=F3[g]>>>1;G=O.length;if(n>0){C=((n-1)%4)+1;D=((C==3)||(C==4));if(D)S[(n-C)>>>2]++;x=((C==1)||(C==3));if(x)t1[(n-C)>>>2]++}if(h2==1)writeln('</tr>');if(h2){writeln('<tr>');h2=0}write('<td align="center"');if(g1>1)write(' colspan="',g1,'"');writeln('>');V=z2(l,a2,false,U,false);z=z2(l,a2,true,U,false);if(n==-1){if(h<0){t[0]=x2(l,0,false,U,false);r[0]=x2(l,0,true,U,false)}else{t[0]=A2(O[h][0],O[h][1],false,U);r[0]=A2(O[h][2],O[h][3],true,U)}writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%">');write('<tr><td align="left" width="20%">','<b>',V,'</b>');if(z.length)write('<br><img src="',X1,z,'"',_1,'>');writeln('</td>');write('<td align="left">',t[0]);if(r[0].length)write('<br><img src="',N1,r[0],'"',U1,'>');writeln('</td></tr>');writeln('</table>');continue}writeln('<table border="0" cellpadding="0" cellspacing="0"><tr><td align="left">');if(z.length)writeln('<img src="',X1,z,'"',_1,' align="left">');if(p2.length)writeln(p2);if(V.length)writeln(V);if(q2.length)writeln(q2);for(a=0;a<G;a++){t[a]=A2(O[a][0],O[a][1],false,U);r[a]=A2(O[a][2],O[a][3],true,U)}Aimgs=0;Atexts=0;for(a=0;a<G;a++){if(r[a].length)Aimgs++;if(t[a].length)Atexts++}if((n<=8)&&Aimgs){writeln('<table border="0" cellpadding="5" cellspacing="0"><tr>');for(a=0;a<G;a++){writeln('<td align="center" valign="middle">');if(r[a].length){write('<img src="',N1,r[a],'"',U1);if(D)write(' onClick="javascript:ProcessAns(',g+1,', ',a+1,')"');writeln('>')}if(Atexts)writeln('<br>');if(t[a].length){if(x&&(a==h))write(P1);writeln(t[a]);if(x&&(a==h))write(Q1)}writeln('</td>')}writeln('</tr><tr>');if(n<=4){for(a=0;a<G;a++){write('<td align="center">');if(x&&(a==h))write(P1);if(D)write('<a href="javascript:ProcessAns(',g+1,', ',a+1,')">');write(J2.charAt(a)+')');if(D)write('</a>');if(x&&(a==h))write(Q1);writeln('</td>')}writeln('</tr></table>');if(D){writeln('<select name="ansinputc'+g+'">');for(a=0;a<G;a++)write('<option value="',1+a,'">',J2.charAt(a)+') ');writeln('</select>')}}else{for(a=0;a<G;a++){write('<td align="center">');write('<input type="radio" name="ansinputr',g,'" value="',1+a,'"');if(x&&(a==h))write(' checked');if(!D)write(' readonly');writeln('></td>')}writeln('</tr></table>')}}if(!Aimgs){if(n<=4){for(a=0;a<G;a++){writeln('<div class="anslist">');if(x&&(a==h))write(P1);if(D)write('<a href="javascript:ProcessAns(',g+1,', ',a+1,')">');write(J2.charAt(a)+'. ');if(D)write('</a>');write(' ',t[a]);if(x&&(a==h))write(Q1);writeln('</div>')}writeln('<p>');if(D){writeln('<select name="ansinputc'+g+'">');for(a=0;a<G;a++)write('<option value="',1+a,'">',J2.charAt(a)+') ');writeln('</select>')}}else if(n<=8){for(a=0;a<G;a++){write('<br><input type="radio" name="ansinputr',g,'" value="',1+a,'"');if(x&&(a==h))write(' checked');if(!D)write(' readonly');write('>');if(x&&(a==h))write(P1);write(t[a]);if(x&&(a==h))write(Q1);writeln()}}else if(n<=12){writeln('<select name="ansinputc',g,'">');for(a=0;a<G;a++){write('<option value="',1+a,'"');if(x&&(a==h))write(' selected');writeln('>',t[a])}writeln('</select>')}else if(n<=16){if(x){write('? <br><font size=+2 color="navy">',t[h],'</font>')}else{write('<input type="text" name="ansinputt',g,'"');if(!D)write(' readonly >')}}}writeln('</td></tr></table>');writeln('</td>')}writeln('</tr>');writeln('</table><br>');y2=t1[0]+t1[1]+t1[2]+t1[3];if(y2){if(y2==1)write('Correct answer is printed');else write('Correct answers are printed');if((t1[0])||(t1[1]&&Atexts))writeln(' '+P1+B4+'.'+Q1+' ');else writeln('.'+' ');}j3=S[0]+S[1]+S[2]+S[3];if(j3){if(S[0]+S[1]+S[2]){if(S[3])r1='Select/enter';else r1='Select'}else r1='Enter';if(j3==1)r1+=' the correct answer';else r1+=' the correct answers';r1+=' please ';if(y2)writeln('<br>');writeln(r1,' and press the button ')}else writeln(' ');writeln('<input type="button" value=" Next " onClick="parent.frames[0].i3(this.form, false, 0, 0)">');writeln('<input type="button" value=" Finish " onClick="parent.frames[0].TheEnd(this.form, true, false)">');writeln('<p><b>Status:</b><table cellpadding="1" bgcolor="white">');writeln('<tr><td>Answer</td>');for(o=b[6];o<=b[7];o++)writeln('<td bgcolor="linen" align="center">',1+e[o],'</td>');writeln('</tr>');writeln('<tr><td>Correct</td>');for(o=b[6];o<=b[7];o++){H1=v[e[o]];if(H1<0)H1='-';writeln('<td bgcolor="linen" align="center">',H1,'</td>')}writeln('</tr>');writeln('<tr><td>Missed</td>');for(o=b[6];o<=b[7];o++){H1=s[e[o]];writeln('<td bgcolor="linen" align="center">',H1,'</td>')}writeln('</tr>');writeln('</table>');writeln('</form></body></html>');close()}}function i3(u,I1,g,C3){var l2;if(!I1){if(g&&C3){l2=new Array();l2[g-1]=C3-1}else l2=n4(u);q4(y4(b[3],v2,F2,l2))}C4();if(u4(I1)){a4(b[1],b[2],b[3],b[4],b[5],v2,F2)}else{TheEnd(u,false,true)}}function z3(u,d,f,V3,A4,w4){var A3=Number(V3),I3=Number(A4),r3=Number(w4);d=Number(d);if(isNaN(d)||(d<1))d=1;f=Number(f);if(isNaN(f)||(f>T))f=T;if(f<d)f=d;m4();k4();var J=n3(u);if(J){var l1=q1[J][1],y1=q1[J][2];var N4=0;var i2,v1=[d],S2=1;L=[];for(var a=0;a<T2;a++){i2=q1[a][1];if((d<=i2)&&(i2<=f)){v1[S2++]=i2}}v1[S2++]=f+1;v1.sort(L4);for(var a=0;a<S2-1;a++){if(v1[a]<v1[a+1]){d=v1[a];f=v1[a+1];l3(1,d,f-1,l1,y1,r3,I3,1,4,15,1,A3,0,[],0,1,0,0);l3(1,d,f-1,l1,y1,r3^1,I3,1,4,15,1,A3,0,[],0,2,0,0);}}P=0;b=L[P];}else{i4()}i3(u,true,0,0)}function TheEnd(u,_3,z4){if(z4)F4();if(_3)b4();parent.frames[2].location.href='theend.htm';}function C4(){with(parent.frames[1].document){open('text/html','replace');writeln('<html>');writeln('<body background="'+r4+'bg.gif">');writeln('<font size=+1 color="brown"><center>');writeln('<b>Questions:  ',m1,'  Correct: ',z1,' Incorrect: ',O1,'<br>');if(m1>0)score=String(Math.floor(100*z1/m1))+'%';else score='';writeln('Score: ',score,'<br>');writeln('</center></font></body></html>');close()}}function g4(d2,f3,d,f){var i,a,Q;for(a=d-1;a<f;a++){i=(f3)?X[a]:A[a];if(y(i)){for(Q=0;Q<i.length;Q++)if(G2(d2,i[Q]))return new Array(a,Q)}else{if(G2(d2,i))return new Array(a,0)}}return new Array(-1,0)}function e4(d2,f3,m2,d,f){if(d<0)d=1;if(f<0)f=T;if(T1)m2=!m2;var W=g4(d2,f3,d,f);var s4=(W[0]>=0);var j4=window.open("",'SearchResWindow','resizable=yes,width=400,height=150');var J1,L1,S1,f2,k;with(j4.document){open('text/html','');writeln('<html><head><title> </title></head><body>');if(s4){V=z2(W[0],W[1],false,15,true);z=z2(W[0],W[1],true,15,true);t[0]=x2(W[0],W[1],false,15,true);r[0]=x2(W[0],W[1],true,15,true);J1='<h2>';L1='</h2>';S1='';f2=''}else{V=d2;z='';t[0]='Not found';r[0]='';J1='<h2><i>';L1='</i></h2>';S1='';f2='';m2=false}if(z.length)z='<img src="'+X1+z+'"'+_1+'>';if(r[0].length)r[0]='<img src="'+N1+r[0]+'"'+U1+'>';if(m2){k=V;V=t[0];t[0]=k;k=z;z=r[0];r[0]=k;k=J1;J1=S1;S1=k;k=L1;L1=f2;f2=k}writeln('<br>');writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%">');writeln('<tr><td>');writeln(J1,V,L1);writeln('</td><td width="10%"> </td><td>');writeln(S1,t[0],f2);writeln('</td></tr><tr><td>');if(z.length)writeln(z);writeln('</td><td> </td><td>');if(r[0].length)writeln(r[0]);writeln('</td></tr></table>');writeln('</body></html>');close()}}function P3(L2){L2.writeln('<select name="SelectSect" onChange="parent.frames[0].u3(this.form)">');for(var a=(p4())?0:1;a<T2;a++){L2.writeln('<option value="',a,'">',q1[a][0])}L2.writeln('</select>')}function n3(u){var M3=u.SelectSect;return Number(M3.options[M3.selectedIndex].value)}function u3(u){var J=n3(u);if((J<0)||(J>T2))J=1;u.c1.value=(J)?q1[J][1]:' ';u.c2.value=(J)?q1[J][2]:' '}