The code traps the key presses, reads the value from the DOM tree, and then hides/shows the appropriate elements of the page through CSS.
Any more information, ask Gabi, he wrote it! He'd love to see you! And since I've destroyed his original code he'll be happy to know something of his has survived my savage butchers knife :)