What are you doing with this line:
Math.floor(Math.random() * 13);

Your posts on the forum show repeated use of the floor method, What trouble are you having with dividing integers?