Prototype of a wizard (JavaScript)