quote:
Originally posted by joosh00
var i = Math.floor((Math.random()*(sArray.length-1)));
should be
code:
Math.floor(Math.random()*sArray.length);
otherwise the last item will never be used. Math.random() is always <1 so if you multiply it by 14 you'll get a number between 0 and 13.999etc, which makes a maximum of 13 because of the Math.floor() function.