Trying out the code in the book: "Javascript: The Definitive Guide"