var score=50;var sec=0;var y=1;var myscore=6;var running=false;function updateLayout(){window.scrollTo(0,1)}function toggler(a){$(a).toggle("medium")}function loadpage(b,a){$("#adver").hide();document.mainform.score.value=50;document.mainform.type.value=b;$("#content").load(b,{j:a});setTimeout(function(){window.scrollTo(0,1)},0);$("#getready").show();setTimeout("readyani()",900)}function loadpagestd(b,a){$(".loading").show();document.mainform.type.value=b;$("#content").load(b,{j:a});setTimeout(function(){window.scrollTo(0,1)},0)}function readyani(){var b=50;var a=0;$("#mainform").show();$("#getready p:eq(0)").fadeIn("slow");setTimeout("hideme('#getready p:eq(0)','#getready p:eq(1)')",1500);setTimeout("hideme('#getready', '#back')",2000);document.mainform.mytime.value=a;document.mainform.score.value=b;running=true;setTimeout("myTimer()",2000)}function hideme(b,a){$(b).hide();$(a).fadeIn("fast")}function myTimer(){if(running){sec=sec+y;document.mainform.mytime.value=sec;setTimeout("myTimer()",1000)}}function stopTimer(){var a=false;myTimer()}function exitbutton(){score=50;sec=0;$("#getready p:eq(1)").hide();$("#back").fadeOut("medium");document.mainform.mytime.value=0;document.mainform.score.value=50;running=false;$("#mainform").hide();$("#content").load("home.php");$("#adver").show();setTimeout(function(){window.scrollTo(0,1)},0)}function check(a,d,e,c){thisel=document.getElementById(a);nextel=document.getElementById(d);eltype=document.mainform.type.value;if(a=="q10"){if(e==0){score=score-myscore;document.mainform.score.value=score}else{score=score+myscore;document.mainform.score.value=score}score=score-sec;document.mainform.score.value=score;running=false;$("#adver").show();$("#mainform").hide();$("#content").load("stats.php",{score:score,type:eltype})}else{if(e==0){$(".no").show("medium");$(".no").hide("slow");score=score-myscore;document.mainform.score.value=score;thisel.style.display="none";nextel.style.display=""}else{$(".yes").show("medium");$(".yes").hide("slow");score=score+myscore;document.mainform.score.value=score;thisel.style.display="none";nextel.style.display=""}if(c=="memory"){running=false;thisq1=a+"1";nextq1=d+"1";var b=document.getElementById(thisq1);var f=document.getElementById(nextq1);setTimeout(function(){$(f).fadeOut("fast");running=true;setTimeout("myTimer()",0)},3200)}}};