I borrowed this script (which had 3 pages) and added another 2 pages. The problem is that it only randomizes between the first 3 on the list. I don't quite undertand the ternary if/else either. If n is greater than 3, it's 0. Else if n is greater than 8, it's 1. Else 2? Did I get that right? It seems like a weird way to do it. How would I get it to randomize between 1 and 5?
<script type="text/javascript">
(function(n){
var pages = ['Happy.html', 'Sad.html', 'Pensive.html', 'Eager.html', 'Inquisitive.html'];
n = n < 3? 0 : n < 8? 1 : 2;
window.location.replace(pages[n]);
})(Math.floor(Math.random() * 10));
</script>