JavaScript deck shuffling routine