15 Puzzle in JavaScript