<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Chinese Quiz Version 1.0 Beta</title> <base target="menu"> <Script language ="Javascript"> var counter=0; var max_questions=65; //Please remember to change Max Questions var money=0; var accurate=1; var consecutive_correctness=0; function select_data(counter){ if (counter==1){data = "You`Me`He`She``O".split("`")}; if (counter==2){data = "Fine`Bad`Hello`Sad`}Y".split("`")}; if (counter==3){data = "O'Clock`Minute`Day`Week`p".split("`")}; if (counter==4){data = "Dining Hall`Bed room`Kitchen`Living room`ߘX".split("`")}; if (counter==5){data = "Lack of`Enough`Full`Empty`]".split("`")}; if (counter==6){data = "Minute`Hour`Second`Quarter`R".split("`")}; if (counter==7){data = "Quarter`Hour`Second`Minute`;R".split("`")}; if (counter==8){data = "to attend class`to get of work`to sleep`to study` N".split("`")}; if (counter==9){data = "class is over`to attend class`to get up`to sit down` N".split("`")}; if (counter==10){data = "later`now`today`before`NT".split("`")}; if (counter==11){data = "business`not busy`happy`sad`N?Q".split("`")}; if (counter==12){data = "to return,to go back`to go forward`to stay`to sing`V".split("`")}; if (counter==13){data = "to follow`to speak`to walk`road`ߍ".split("`")}; if (counter==14){data = "together`road`to walk`alone`Nw".split("`")}; if (counter==15){data = "film, movie`television set`opera`restuarant`5uq_".split("`")}; if (counter==16){data = "cafe`tea`soup`orange juice`TaU".split("`")}; if (counter==17){data = "half`whole`quarter`a dollar`JS".split("`")}; if (counter==18){data = "a`dunno`beats me`ha ha ha`JU".split("`")}; if (counter==19){data = "to walk`to eat`together`to work`p".split("`")}; if (counter==20){data = "to wait`to go`to listen`to order`I{".split("`")}; if (counter==21){data = "road`to walk`to see`to speak`".split("`")}; if (counter==22){data = "to go to work`class dismissed`to get up`to reply` Ns".split("`")}; if (counter==23){data = "to get off work`to start`to go to work`last year` Ns".split("`")}; if (counter==24){data = "cinema`house`school`television`5uq_b".split("`")}; if (counter==25){data = "watch`minute`hour`wrist`h".split("`")}; if (counter==26){data = "clock`minute`wrist`middle`".split("`")}; if (counter==27){data = "before`now`future`time`NMR".split("`")}; if (counter==28){data = "day`water`earth`plants`)Y".split("`")}; if (counter==29){data = "every, each`single`sky`eyes`k".split("`")}; if (counter==30){data = "to get up of bed`to sleep`to walk`together`w^".split("`")}; if (counter==31){data = "morning`afternoon`evening`midnight` NHS".split("`")}; if (counter==32){data = "to eat`to listen`to speak`soup`T".split("`")}; if (counter==33){data = "meal, rice, food`car`bed`room`m".split("`")}; if (counter==34){data = "many`not much`minute`small`Y".split("`")}; if (counter==35){data = "afternoon`evening`day`morning` NHS".split("`")}; if (counter==36){data = "to rest`to wake up`to sleep`to work`Oo`".split("`")}; if (counter==37){data = "sometimes`often`always`never` geP".split("`")}; if (counter==38){data = "question`book`to reply`to read`".split("`")}; if (counter==39){data = "to go to bed`to wake up`spare time`weekend`awɉ".split("`")}; if (counter==40){data = "Beijing`not ready`watch`japan`SN".split("`")}; if (counter==41){data = "to want`to borrow`to seek help`to give`".split("`")}; if (counter==42){data = "waiter`mailman`doctor`teacher` gRXT".split("`")}; if (counter==43){data = "cup`tea`soup`half`og".split("`")}; if (counter==44){data = "miss, young lady`elder`older sister`mother`\Y".split("`")}; if (counter==45){data = "to like`to despise`husband/wife`partnership`U"k".split("`")}; if (counter==46){data = "scented tea`coffee`apple juice`grapes`6".split("`")}; if (counter==47){data = "red`green`blue`black`~".split("`")}; if (counter==48){data = "or`and`together`yes`؏/f".split("`")}; if (counter==49){data = "orange juice`water`grape juice`tea`ThP[4l".split("`")}; if (counter==50){data = "bottle`beer`juice`milk`t".split("`")}; if (counter==51){data = "beer`bottle`milk`juice`dUR".split("`")}; if (counter==52){data = "to listen`to ask`to cry`to see`,T".split("`")}; if (counter==53){data = "folk song`modern music`lyrics`words`lLk".split("`")}; if (counter==54){data = "classical`modern`music`dictionary`SxQ".split("`")}; if (counter==55){data = "music`evening`classical`lyrics`PN".split("`")}; if (counter==56){data = "modern`classical`old`clock`sN".split("`")}; if (counter==57){data = "to sing`music`classical`song`1U".split("`")}; if (counter==58){data = "song`music`modern`classical`Lk?Q".split("`")}; if (counter==59){data = "to let, to ask`don't`to get up`to sit`".split("`")}; if (counter==60){data = "don't`to let`together`alone`+R".split("`")}; if (counter==61){data = "measure word branch`clock`half`measure word cup`g".split("`")}; if (counter==62){data = "apple`grape`orange`beer`g".split("`")}; if (counter==63){data = "grape`orange`apple`beer`a".split("`")}; if (counter==64){data = "sugar, sweets`bitter`soup`cold`|".split("`")}; if (counter==65){data = "green tea`plants`green color`blue`~6".split("`")}; //First=correct answer, Last=the questions //choice1.value = data[0]; //alert(data[0]); } //note don't use the word 'new' //note don't use the Cap 'Function' //note must be in Cap 'Math' //note must be in Cap 'Array' //note variables stated outside functions are global accessible //note variables within functions are only locally accessible function random_order(){ num = Math.floor(Math.random() * 4); question_order = new Array(4); question_order[0] = num; if (num==0){question_order[1]= 1; question_order[2]= 2; question_order[3]= 3; correct_answer="a";} if (num==1){question_order[1]= 2; question_order[2]= 3; question_order[3]= 0; correct_answer="d";} if (num==2){question_order[1]= 3; question_order[2]= 0; question_order[3]= 1; correct_answer="c";} if (num==3){question_order[1]= 0; question_order[2]= 1; question_order[3]= 2; correct_answer="b";} } function the_questions(){ question_order[0] = data[(question_order[0])]; question_order[1] = data[(question_order[1])]; question_order[2] = data[(question_order[2])]; question_order[3] = data[(question_order[3])]; choice0.value = question_order[0]; choice1.value = question_order[1]; choice2.value = question_order[2]; choice3.value = question_order[3]; choice.value = data[4]; current_money.value = money; accuracy.value = (accurate/counter)*100; parent.bottom.document.open(); //this line is necessary for it to work parent.bottom.document.write("<font size='18'>"); parent.bottom.document.write(data[4]); } function compare_results(answer){ var t=0; if (consecutive_correctness > 100){consecutive_correctness=100}; if (answer == correct_answer){results.value="Correct"; consecutive_correctness=consecutive_correctness+1; money=(money+10+(10*consecutive_correctness)); accurate=accurate+1;t=1}; else {results.value="Wrong"; consecutive_correctness=0; t=1; } if (t==1){main_control()}; } function main_control(){ counter=counter+1; alert(counter); if (counter <= max_questions){select_data(counter)}; if (counter <= max_questions){random_order()}; if (counter <= max_questions){the_questions()}; if (counter > max_questions){choice.value ="No More Q's"}; } </script> <script language="JavaScript" src="http://gummianime.vr9.com/cgi-bin/score.txt"> main_control(); </script> </head> <body text="#FF00FF"> <table border="1" width="100%" bordercolor="#CC99FF"> <tr> <td width="78%" bordercolor="#6699FF" bgcolor="#FFFFFF" background="../YAMAHA/my_pink_clouds.jpg"> <input type="text" name="choice" size="25"><br> <input type="text" name="choice0" size="25"> <input type="radio" name="submit" value="a" onclick="compare_results(this.value)"> <input type="text" name="choice1" size="25"> <input type="radio" name="submit" value="b" onclick="compare_results(this.value)"><br> <input type="text" name="choice2" size="25"> <input type="radio" name="submit" value="c" onclick="compare_results(this.value)"> <input type="text" name="choice3" size="25"> <input type="radio" name="submit" value="d" onclick="compare_results(this.value)"> <p>RESULTS: <input type="text" name="results" size="25"> <input type="button" name="submit2" value="Start" onclick="main_control()"> <input type="button" name="submit3" value="Save" onclick="saving_stats()" style="color: #CC99FF; background-color: #CCCCFF"> </p> <p>&nbsp;</td> <td width="22%" bordercolor="#6699FF">&nbsp;</td> </tr> <tr> <td width="78%" bordercolor="#6699FF">Accuracy:<input type="text" name="accuracy" size="3">%</td> <td width="22%" bordercolor="#6699FF"> <p align="center">$<input type="text" name="current_money" size="10"></p> </td> </tr> </table> <script language="JavaScript"> function saving_stats(){ document.write('<form action="http://gummianime.vr9.com/cgi-bin/post.cgi" method="POST">'); document.write('<input type="text" name="money" value='+money+'>'); document.write('<input type="submit" value="Save">'); document.write('</form>'); } </script> </body> </html>
Site hosted by Angelfire.com: Build your free website today!