function rand(n) { return (Math.floor(Math.random()*n+1)); } document.write("
");