#fcleft">




Self-explanatory. This is a really long script and is divided into three different sections, which are pointed out by the ending and starting and ending of the hidding blocks. This script isn't really for a page, but is more of a game you put on its own page. (Sorry about the long lines non-JS users. It can't be avoided in this script.)
The source...


<script language="JavaScript">
<!--
// please keep these lines on when you copy the source
// made by: Nicolas - http://www.javascript-page.com

var currentdate = 0
var rannumber = " "
var core = 0

function StringArray (n) {
  this.length = n;
    for (var i = 1; i <= n; i++) {
      this[i] = ' '
    }
  return this
}

ran = new StringArray(10)
ran[0] = '2'
ran[1] = '5'
ran[2] = '9'
ran[3] = '3'
ran[4] = '6'
ran[5] = '10'
ran[6] = '7'
ran[7] = '8'
ran[8] = '1'
ran[9] = '4'

function getnumber() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  adcore = Math.floor(core/6)
  core = adcore
  rannumber = ran[core]
  return (rannumber)
}

guessnumber = prompt("Guess a number between one and ten.","")

if (guessnumber < 1) {
alert("that is not a number between \n \n 1 \n and \n 10 \n \n please "
+"reload and try agian.")
}

if (guessnumber > 10) {
alert("that is not a number between \n \n 1 \n and \n 10 \n \n please "
+"reload and try agian.")
}

else {
if (guessnumber != getnumber()) {
document.write("You guessed the number: <b>"+guessnumber+"</b><br>"
+"the computer chose the number: <b>"+rannumber+"</b><br>try again.")
}
if (guessnumber == getnumber()) {
document.write("The number you chose, <b>"+guessnumber+"</b> "
+"is exactly what the computer chose.7lt;br>  CONGRATS!  You WON!")
}
}

//-->
</script>


Main Page