+++
Wait...

Rather than just telling you where the syntax error is, 
I want to take you thru the process I used to find it,
so that you can do the same yourself in the future.

First, bring up the page with the Netscape navigator browser. 
(I have version 4.76.  I copied your source to a local file.)
When the browser says "Javascript error!  Type 'Javascript:' 
into location for details," then that is exactly what you do.
You will see two errors (as shown below, but this stupid Yahoo
screen discards my newlines and wraps everything into a mess :-(

The first error causes the second one (takara is not defined), so ignore it and fix them in order. The first error message says 'missing ) after condition. if (bet=="null" {'. OK, go to line 17 (this is easy for me, since I always use the vi editor, even on Windows NT, but you can easily count to line 17 or search for 'bet="null"' ). -------- -->

You probably see the error right away. If not, look at the if statement above it, which was OK, and compare them to see what is wrong. The problem is a missing parenthesis after the condition. (The vi editor aalso makes it easy to find imbalanced brackets, with its "%" command.) The statement should have been: if (bet=="null") { ------------------

I fixed my local copy using my vi editor, and now there is an error at line 15 because bet is not defined. You don't need the statement at line 8: bet; It creates a local variable named bet for every entry into the function. Just use the global!

Next problem is that you are calling the routine recursively, and will lock up the browser under certain conditions. Just exit from the routine and use some other event to re-enter it. If you must have it call itself, the use domething like: setTimeout( "tanaka()", 1 ); --------

I've got to go now, but that should get you started. If you have further problems, you may email me at "bam@hamptons.com". -------------

Also, you should add tags at the beginning. (Some browsers will choke without them.) ========================= JavaScript Error: file:/C|/@wrox/scripts/takara.html, line 17: missing ) after condition. if (bet=="null" { ........................^ JavaScript Error: file:/C|/@wrox/scripts/takara.html, line 34: takara is not defined. =========================