HELP! with JS wrong code
i'm in great trouble (but i hope it will be small for so many of you).
next week there will be a wonderful meeting in Barcelona, and i've been asked to collaborate a little bit with a JS applet. BUT... my dear applet doesn't work as expected. it used to, but now it doesn't: i tried to improve it according to the event, but after adding some buttons and functions i spoilt it.
the file is a quite large simulation of dice draw, taken from a game called kiriki.
the first unwanted behaviours came because of the " " and the ' ', which i don't completely understand. then it got worse after trying to stop animation automatically (a feature that has been implemented in version 4, by the way). next fatal idea was to introduce a button to show/hide points... when i press randomly the stop and the hide buttons, the effect is stepping into those typical and annoying and unpredictable and unreasonable computer behaviours, such as not stoppping at the end point or losing all functionality of the buttons. not satisfied with all of this stuff, i even tried to introduce a textarea, which happens to work or dis-work at his own will (i asked for this once, and obtained a fine solution... temporally, it seems, as even this tiny success has gone down!).
i've decided to erase the "hide all" button, finally. but anyway...
would somebody be so kind to take a tour inside my html and illuminate my poor knowledge of what i've been trying to create? i really would appreciate that.
the best version i've been able to produce can be seen HERE. the script part is fully commented, and is all concentrated inbetween lines 40 up to 130, aprox.
thanks in advance!!