There are faster ways of shuffling array elements, but this is nice and short:
Code:
Array.prototype.shuffle=function(){
return this.sort(function(){return [-1,1][Math.floor(Math.random()*2)]})
}