UhWhat,
<script>
Array.prototype.shuffle = function(min,max) {
min = min || 0;
max = ++max || this.length;
var len = max - min;
max = len - this.length;
this.length = len;
for (var a = this.length-1; 0 <= a; a--) {
if(a < max) {break}
var b = Math.floor(Math.random() * a),
c = void 0 === this[b] ? (b + min) : this[b];
this[b] = void 0 === this[a] ? (a + min) : this[a];
this[a] = c
}
this.reverse();
this.length -= max;
return this
};
function myRandom(n) {
var arr = [],
i = 0;
return function() {
if (i == arr.length) {
i = 0;
arr = Array(n / 2).shuffle(0, 9);
arr = arr.concat(arr.slice()).shuffle()
}
var a = arr[i];
i++;
return a
}
};
var s = myRandom(8);
for (var i=0; i<80; i++) { document.write(s()+""); if(!((i+1) % 8) ) document.write("<br>")}
</script>