the number guessing game
<p>Ok I have almost everything done beside write a timeout that asks users if they want to stop the game if they do not press the Guess button within 10 seconds. If the user selects OK, close the Web browser window.I can not figure it out this is what i have so far.</p>

<pre><code>&lt;!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;TITLE&gt;Guess the number&lt;/TITLE&gt;
&lt;SCRIPT LANGUAGE="JavaScript"&gt;
&lt;!-- HIDE FROM INCOMPATIBLE BROWSERS
hiddenNumber = Math.round((Math.random() * 100))%100 + 1;
function checkGuess(obj) {
    var status;
    var guess=obj.value;
    if (guess &gt; hiddenNumber) {
        status=(guess+" is Too high!\nTry again");
    }
    else if (guess &lt; hiddenNumber) {
        status=(guess+" is Too low!\nTry again");
    }
    else if (guess == hiddenNumber){
        status=("Congratulations! You guessed the number!\n"+guess);
    }
    alert(status);
    obj.value='';
}
function continueGame(){
    var quit = confirm("Do you want to stop playing?");
    if (quit == true)
        window.close();
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS --&gt;
&lt;/SCRIPT&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;H1&gt;Guessing Game&lt;/H1&gt;
Guess a number between 1 - 100:
&lt;FORM NAME="guessForm"&gt;
&lt;INPUT TYPE="text" NAME="guessField"&gt;
&lt;INPUT TYPE="button" VALUE=" Guess "
onClick="checkGuess(document.guessForm.guessField);"&gt;
&lt;/FORM&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;
</code></pre>
