Here's a full explanation of how the code works. There's one blank space and the rest of the picture elements are in the wrong place. The player must make use of the blank space to shuffle the nearby pieces until everything's correctly positioned. Here's a page showing the puzzle in action. It's not a new kind of puzzle.
Similar scripts exist.
The difference lies in the way it's generated. Usually, when we want to make an image puzzle, we cut our image into small images, equal in size, so we end up with 16 little gif files created from one big file. But this new technique uses JavaScript to create the smaller images on the fly. As you know, JavaScript is a very limited language that can't manipulate an image file. All we do is give the impression that we are slicing it.