<html> <head> <title>The Count Game</title> </head> <center> <body bgcolor="#FFFFFF">  <table cellspacing="0" cellpadding="1" bgcolor="#73994C" width="400"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#86B259" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#99CC66" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#ACE573" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#BFFF80" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#BFFF80" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#ACE573" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#99CC66" width="100%"><tr><td> <table cellspacing="0" cellpadding="1" bgcolor="#86B259" width="100%"><tr><td>  <table cellspacing="0" cellpadding="1" bgcolor="#73994C" width="100%"><tr><td> <table bgcolor="#99CC66" width="100%" height="100"><tr><td> <table border="2" bordercolor="#BFFF80" width="100%" cellspacing="0"><tr><td align="middle"> <font face="verdana,arial,helvetica" color="#BFFF80" size="6pt"><b>The Count Game</b></font> <script language="JavaScript">    var guess = 0; var playerMoney = 30;  var counter=0; var speed_count=1000; var maxVal=150; var playFlag=true; function count_init() {   document.write('<form name="count_form"><input type="button" value="Play" name="count_container" style="border:#808080 solid 2px; height:22px; background:#EFEFEF; width:100px; cursor:pointer" onClick="choose_ps();">&nbsp;<input type="text" name="count_op" style="border:#808080 solid 2px; height:22px; width:100px">&nbsp;<input type="button" value="Reset" name="count_restart" style="border:#808080 solid 2px; height:22px; background:#EFEFEF; width:100px; cursor:pointer" onClick="location.reload();"></form>'); }   function placebet() {      document.choose_ps.value=guess;      if        (parseInt(guess) + playerMoney);    }       function count_play() {  counter++;  document.count_form.count_container.value=counter;  if(counter<maxVal)  {   setTimeout("count_play()",speed_count);  }  if(((counter%10)==0)||(counter==1))  {   speed_count/=10;  } }  function choose_ps() {  if(playFlag)  {   reset_count();   playFlag=false;   count_play();  }  else  {   document.count_form.count_op.value=counter;   document.count_form.count_container.value=document.count_form.count_op.value;   speed_count*=100000000000000000000;   playFlag=true;   if((document.count_form.count_op.value<=100)&&(document.count_form.count_op.value>=98))            {    alert('You Won!');                  playerMoney=(playerMoney + parseInt(guess));   }   else   {    alert('Oops! You lost!');    {         playerMoney=(playerMoney - parseInt(guess));                  };   }  } }  function reset_count() {  counter=0;  speed_count=1000;  document.count_form.count_container.value=counter;  document.count_form.count_op.value=''; }  count_init();  { $("#total").text("You have $"+playerMoney+" to play with"); }     </script> </td></tr></table> <br> <font face="verdana,arial,helvetica" size="-1"> To play the game, click on the button to the left. The counter will start. Click on the button again to stop the counter. To win, you have to stop the counter between "98-100" (including extremes). The number you clicked on will be displayed on the right. Simple! <br>     <center> <h4 id="total">You have $30 to play with</h4>   <p>enter a bet of $5 or $10</p>   <input type="text" placeholder="enter a bet" id="guess"> </center>   <br>   </br>   <table bgcolor="#73994C" width="100%"><tr><td><font face="verdana,arial,helvetica" size="-2" color="#BFFF80">&#169; 2014 Tonexian</font></td></tr></table>       </td></tr></table>  </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </td></tr></table> </center> </body> </html>