if (! document.layers) {
newMenu(1, "examples", 175,180);
addMenuTitle("Examples from the Book");
addSubmenu('fri3', "Friday evening...");
addSubmenu('sat1', "Saturday morning...");
addSubmenu('sat2', "Saturday afternoon...");
addSubmenu('sat3', "Saturday evening...");
addSubmenu('sun1', "Sunday morning...");
addSubmenu('sun2', "Sunday afternoon...");
endMenu();

newMenu(2, "fri3", 240,200);
addMenuTitle("Friday Evening");
addSubmenu('chap1', "Chapter 1...");
addSubmenu('chap2', "Chapter 2...");
endMenu();

newMenu(2, "sat1", 240,210);
addMenuTitle("Saturday Morning");
addSubmenu('chap5', "Chapter 5...");
addSubmenu('chap6', "Chapter 6...");
addSubmenu('chap7', "Chapter 7...");
addSubmenu('chap8', "Chapter 8...");
addSubmenu('chap9', "Chapter 9...");
addSubmenu('chap10', "Chapter 10...");
endMenu();

newMenu(2, "sat2", 240,220);
addMenuTitle("Saturday Afternoon");
addSubmenu('chap11', "Chapter 11...");
addSubmenu('chap12', "Chapter 12...");
addSubmenu('chap13', "Chapter 13...");
addSubmenu('chap14', "Chapter 14...");
addSubmenu('chap15', "Chapter 15...");
addSubmenu('chap16', "Chapter 16...");
endMenu();

newMenu(2, "sat3", 240,230);
addMenuTitle("Saturday Evening");
addSubmenu('chap17', "Chapter 17...");
addSubmenu('chap18', "Chapter 18...");
addSubmenu('chap19', "Chapter 19...");
addSubmenu('chap20', "Chapter 20...");
endMenu();

newMenu(2, "sun1", 240,240);
addMenuTitle("Sunday Morning");
addSubmenu('chap21', "Chapter 21...");
addSubmenu('chap22', "Chapter 22...");
addSubmenu('chap23', "Chapter 23...");
addSubmenu('chap24', "Chapter 24...");
addSubmenu('chap25', "Chapter 25...");
addSubmenu('chap26', "Chapter 26...");
endMenu();

newMenu(2, "sun2", 240,250);
addMenuTitle("Sunday Afternoon");
addSubmenu('chap27', "Chapter 27...");
addSubmenu('chap28', "Chapter 28...");
addSubmenu('chap29', "Chapter 29...");
endMenu();

// // // --- individual chapters ------- // // //

newMenu(3, "chap1", 285,210);
addMenuTitle("1: DHTML and how it relates to HTML");
addMenuItem("Examples/fig-1-2.html", "Figure 1-1: Content, but with just HTML, it is unattractive and pretty useless.");
endMenu();

newMenu(3, "chap2", 285,210);
addMenuTitle("2: 30 Minute Crash Course on HTML 4.01");
addMenuItem("Examples/fig-2-1.html", "Figure 2-1: Simple Lists in HTML");
addMenuItem("Examples/fig-2-2.html", "Figure 2-2: Anchor tags and image tags both function as anchors"); 
addMenuItem("Examples/fig-2-2a.html", "Figure 2-2a: an improved version");
addMenuItem("Examples/fig-2-3.html", "Figure 2-3: Basic table formatting.");
endMenu();

newMenu(3, "chap3", 285,210);
addMenuTitle("#: 30 Minute Crash Course on JavaScript");
addMenuItem("", "<I>no examples</I>");
endMenu();

newMenu(3, "chap4", 285,210);
addMenuTitle("4: The Compatibility Bugaboo");
addMenuItem("", "<I>no examples in this chapter</I>");
endMenu();

// -- Saturday morning: 

newMenu(3, "chap5", 285,225);
addMenuTitle("5: The CSS Language");
addMenuItem("Examples/fig-5-1.html", "Figure 5-1: Simple in-line style modifications to a paragraph of text");
addMenuItem("Examples/fig-5-2.html", "Figure 5-2: Inline CSS example offers easy color changes");
addMenuItem("Examples/fig-5-3.html", "Figure 5-3: Remarkable results for CSS and plain old HTML!");
endMenu();

newMenu(3, "chap6", 285,225);
addMenuTitle("6: Basic CSS Usage");
addMenuItem("Examples/fig-6-1.html", "Figure 6-1: Descendant Selectors enable you to apply styles in context.");
endMenu();

newMenu(3, "chap7", 285,225);
addMenuTitle("7: Nifty Font Tricks");
addMenuItem("Examples/fig-7-1.html", "Figure 7-1: A list of named typefaces in CSS");
addMenuItem("Examples/fig-7-2.html", "Figure 7-2: Typeface sizes are inherited if not specified");
addMenuItem("Examples/fig-7-3.html", "Figure 7-3: Font size, stepping up and up by using the handy SPAN tag");
addMenuItem("Examples/fig-7-4.html", "Figure 7-4: Various weights and a comparison of italic with oblique type");
endMenu();

newMenu(3, "chap8", 285,225);
addMenuTitle("8: Additional CSS Text Control");
addMenuItem("Examples/fig-8-1.html", "Figure 8-1: You get fine kerning control by using the CSS letter-spacing attribute.");
addMenuItem("Examples/fig-8-2.html", "Figure 8-2: Setting word and line spacing by using CSS attributes");
addMenuItem("Examples/fig-8-3.html", "Figure 8-3: Various text-alignment options");
addMenuItem("Examples/fig-8-5.html", "Figure 8-4: Text decorations add visual pizzazz!");
addMenuItem("Examples/fig-8-6.html", "Figure 8-5: Text transformations help build considerably improved headers.");
endMenu();

newMenu(3, "chap9", 285,225);
addMenuTitle("9: CSS Lists");
addMenuItem("Examples/fig-9-1.html", "Figure 9-1: Default bullets that a Web browser produces, based on nesting-level.");
addMenuItem("Examples/fig-9-2.html", "Figure 9-2: Redefine &lt;UL&gt; once and all the bullet lists change.");
addMenuItem("Examples/fig-9-3.html", "Figure 9-3: A bullet list displaying my own custom bullet.");
addMenuItem("Examples/fig-9-4.html", "Figure 9-4: The list-style-position attribute enables you to fine-tune where bullets appear in a list.");
addMenuItem("Examples/fig-9-5.html", "Figure 9-5: A demonstration of the text-indent attribute.");
endMenu();

newMenu(3, "chap10", 285,225);
addMenuTitle("10: Backgrounds and Colors");
addMenuItem("Examples/fig-10-1.html", "Figure 10-1: Color adds pizzazz to the presentation of information.");
addMenuItem("Examples/fig-10-2.html", "Figure 10-2: This time, you get colored bullets, and black text.");
addMenuItem("Examples/fig-10-3.html", "Figure 10-3: Now you see some strange colored boxes, showing how the container nesting works.");
addMenuItem("Examples/fig-10-4.html", "Figure 10-4: Paragraphs gain the background color, but in a limited way.");
addMenuItem("Examples/fig-10-5.html", "Figure 10-5: Background images can turn a dull page into something amazing!");
addMenuItem("Examples/fig-10-6.html", "Figure 10-6: A floating background graphic element (the lens flare) appears within a paragraph container.");
endMenu();

// -- Saturday afternoon

newMenu(3, "chap11", 285,240);
addMenuTitle("11: Margins and Borders");
addMenuItem("Examples/fig-11-1.html", "Figure 11-2: Margin spacing dramatically changes the appearance of text.");
addMenuItem("Examples/fig-11-2.html", "Figure 11-3: Negative margin spacing produces some, uh, <I>interesting</I> results.");
addMenuItem("Examples/fig-11-3.html", "Figure 11-4: A basic BODY border makes the page considreably more interesting visually.");
addMenuItem("Examples/fig-11-4.html", "Figure 11-5/6: Borders within borders in your browser.");
addMenuItem("Examples/fig-11-6.html", "Figure 11-6: Padding dramatically changes the feel of container borders.");
endMenu();

newMenu(3, "chap12", 285,240);
addMenuTitle("12: Positioning Content with CSS");
addMenuItem("Examples/fig-12-1.html", "Figure 12-1: Width can profoundly affect the apperance of material on a Web page.");
addMenuItem("Examples/fig-12-2.html", "Figure 12-2: Do not specify a height that is too little to contain the text.");
addMenuItem("Examples/fig-12-3.html", "Figure 12-3: Float and container tweaks produce a delightful result.");
addMenuItem("Examples/fig-12-4.html", "Figure 12-4: Absolute positioning often layers containers atop each other.");
addMenuItem("Examples/fig-12-5.html", "Figure 12-5: Specifying a background color hides the overlapping text problem.");
addMenuItem("Examples/fig-12-6.html", "Figure 12-6: Relative positioning makes the container part of the regular document flow.");
addMenuItem("Examples/fig-12-7.html", "Figure 12-7: Relative positioning is great for setting up inline elements.");
addMenuItem("Examples/fig-12-8.html", "Figure 12-8: Fixed header (does your browser support this attribute?)");
endMenu();

newMenu(3, "chap13", 285,240);
addMenuTitle("13: Visibility, the CSS Solution");
addMenuItem("Examples/fig-13-1.html", "Figure 13-1: You still must allocate space even for hidden containers.");
addMenuItem("Examples/fig-13-2.html", "Figure 13-2: JavaScript materializes the otherwise invisible paragraph.");
addMenuItem("Examples/fig-13-3.html", "Figure 13-3: JavaScript-enabled hypertext references enable you to control the visibility of a text passage.");
addMenuItem("Examples/fig-13-4.html", "Figure 13-4/5: The default layout with the DIV block hidden from view.");
addMenuItem("Examples/fig-13-6.html", "Figure 13-6/7: Default page, no hint of pop-up.");
endMenu();

newMenu(3, "chap14", 285,240);
addMenuTitle("14: Layering Content: 3D Web Pages");
addMenuItem("Examples/fig-14-3.html", "Figure 14-3: Three colorful boxes, neatly stacked atop each other.");
addMenuItem("Examples/fig-14-4.html", "Figure 14-4: The same three colorful boxes, with their stacking order reversed.");
addMenuItem("Examples/fig-14-5.html", "Figure 14-5: Clickable layers enable you to bring the red box to the top with just a mouse click.");
addMenuItem("Examples/fig-14-6.html", "Figure 14-6: I clicked on blue, but it is too far behind now to pop forward.");
endMenu();

newMenu(3, "chap15", 285,240);
addMenuTitle("15: Putting it all together: drop-down menus");
addMenuItem("Examples/fig-15-1.html", "Figure 15-1/2: A simple menu bar in DHTML");
addMenuItem("Examples/fig-15-2a.html", "Figure 15-2a: cross-browser version of 15-1/2");
addMenuItem("Examples/fig-15-3.html", " Figure 15-3: Now the menu pops up in the right place, even in Netscape 6.");
addMenuItem("Examples/fig-15-3a.html", "Figure 15-3a: A further improvement on our pop-up menu.");
endMenu();

newMenu(3, "chap16", 285,240);
addMenuTitle("16: Cool CSS Tricks");
addMenuItem("Examples/fig-16-1.html", "Figure 16-1: Our Holmes bug floats in the bottom-right corner.");
addMenuItem("Examples/fig-16-2.html", "Figure 16-2: The bug floats now, even in Netscape Navigator 4.");
addMenuItem("Examples/fig-16-3.html", "Figure 16-3: Fancy drop caps look really nice on a Web page.");
addMenuItem("Examples/fig-16-4.html", "Figure 16-4/5: Pseudo-class elements are rendered differently in different browsers.");
addMenuItem("Examples/fig-16-6.html", "Figure 16-6: An attractive form, with the focus on the first text area.");
endMenu();

// -- Saturday night

newMenu(3, "chap17", 285,255);
addMenuTitle("17: The Document Object Model");
addMenuItem("Examples/fig-17-1.html", "Figure 17-1: CSS-o-matic enables you to tweak lots of style attributes in real-time.");
endMenu();

newMenu(3, "chap18", 285,255);
addMenuTitle("18: Writing and Debugging JavaScript ");
addMenuItem("Examples/fig-18-1.html", "Figure 18-1: The Navigator 4 JavaScript Console");
addMenuItem("Examples/fig-18-2.html", "Figure 18-2: Errors appear in the JavaScript Console, but are they the right errors?");
endMenu();

newMenu(3, "chap19", 285,255);
addMenuTitle("19: Testing Browser Compatibility");
addMenuItem("Examples/fig-19-1.html", "Figure 19-1: The navigator object property values in Netscape 6.");
addMenuItem("Examples/fig-19-2.html", "Figure 19-2/3: All navigator object attributes in your browser.");
addMenuItem("Examples/fig-19-4.html", "Figure 19-4: Plug-ins included and installed with Internet Explorer 5.5.");
addMenuItem("Examples/fig-19-5.html", "Figure 19-5: JavaScript and OS testing code");
endMenu();

newMenu(3, "chap20", 285,295);
addMenuTitle("20: Creating a cross-platform JavaScript Library");
addMenuItem("Examples/fig-20-1.html", "Figure 20-1: The portable JavaScript library test suite.");
endMenu();

// -- Sunday morning

newMenu(3, "chap21", 285,260);
addMenuTitle("21: Graphical Rollovers");
addMenuItem("Examples/fig-21-1.html", "Figure 21-1: Walrus on the ice.");
addMenuItem("Examples/fig-21-2.html", "Figure 21-2: onMouseOver adds the caption.");
endMenu();

newMenu(3, "chap22", 285,260);
addMenuTitle("22: DHTML Scrolling Text");
addMenuItem("Examples/fig-22-1.html", "Figure 22-1: The text box glides smoothly across the screen.");
addMenuItem("Examples/fig-22-2.html", "Figure 22-2: Specify an incompatible end-point and slideObj complains.");
addMenuItem("Examples/fig-22-3.html", "Figure 22-3: Clicking the scroll-down link moves the text down just a bit.");
endMenu();

newMenu(3, "chap23", 285,260);
addMenuTitle("23: Clocks and Calendars");
addMenuItem("Examples/fig-23-1.html", "Figure 23-1: Adding date and time values to your Web page.");
addMenuItem("Examples/fig-23-2.html", "Figure 23-2: JavaScript automatically fills in a field on this form after you enter information and click the button");
addMenuItem("Examples/fig-23-2.html", "Figure 23-2a: improved version of 23-2 code.");
addMenuItem("Examples/fig-23-3.html", "Figure 23-3: Your inline clock keeps track of the time!");
addMenuItem("Examples/fig-23-4.html", "Figure 23-4: The current month, as shown in a nice calendar view.");
endMenu();

newMenu(3, "chap24", 285,260);
addMenuTitle("24: Forms and testing values");
addMenuItem("Examples/fig-24-1.html", "Figure 24-1: Blurring the text field produces an alert confirming the input value.");
addMenuItem("Examples/fig-24-2.html", "Figure 24-2: JavaScript activates the words adjacent to the check boxes so that you can click the word in addition to the box itself.");
addMenuItem("Examples/fig-24-3.html", "Figure 24-3: I selected a small pizza and then requested extra sauce, but . . .");
addMenuItem("Examples/fig-24-4.html", "Figure 24-4: Temperature and mortgage payment calculators combining on a Web site, what a pair!");
addMenuItem("Examples/fig-24-5.html", "Figure 24-5: Menus change values based on form selections");
endMenu();

newMenu(3, "chap25", 285,260);
addMenuTitle("25: Navigation with Menus");
addMenuItem("Examples/fig-25-1.html", "Figure 25-1: Unexciting page, way-cool pop-up menu displayed and element highlighted.");
addMenuItem("Examples/fig-25-2.html", "Figure 25-2: Sliding menu, just sliding into view.");
addMenuItem("Examples/fig-25-3.html", "Figure 25-3: Cascading menus: two levels displayed.");
addMenuItem("Examples/fig-25-4.html", "Figure 25-4: Improved menus with hide-me timers.");
endMenu();

newMenu(3, "chap26", 285,260);
addMenuTitle("26: Working with Windows");
addMenuItem("Examples/fig-26-1.html", "Figure 26-1: Resizing and repositioning the browser by using appearance methods and the self object.");
addMenuItem("Examples/fig-26-2.html", "Figure 26-2: Cannot quite get the image size right. How does your browser do?");
addMenuItem("Examples/fig-26-2.html", "Figure 26-3: A better picture presentation");
addMenuItem("Examples/fig-26-4.html", "Figure 26-4: A simple pop-up advertisement appears as the page loads.");
addMenuItem("Examples/fig-26-4a.html", "Figure 26-4a: auto-cycling pop-up window.");
addMenuItem("Examples/fig-26-5.html", "Figure 26-5: A child window that can affect the parent.");
endMenu();

// -- Sunday afternoon

newMenu(3, "chap27", 285,275);
addMenuTitle("27: Web site memory with cookies");
addMenuItem("Examples/fig-27-2.html", "Figure 27-2: Notice the counter at the bottom of the page.");
addMenuItem("Examples/fig-27-3.html", "Figure 27-3: A slick to-do management system, all in JavaScript.");
endMenu();

newMenu(3, "chap28", 285,275);
addMenuTitle("28: Poetry and Pictures");
addMenuItem("Examples/fig-28-1.html", "Figure 28-1: A picture puzzle in Internet Explorer.");
addMenuItem("Examples/fig-28-2.html", "Figure 28-2: The Netscape 6 version of the picture puzzle.");
addMenuItem("Examples/fig-28-3.html", "Figure 28-3: A Hawaiian slide show with controls.");
endMenu();

newMenu(3, "chap29", 285,275);
addMenuTitle("29: Putting it all Together");
addMenuItem("Examples/fig-29-1.html", "Figure 29-1: Magic sticky notes on the page - notice the cursor location");
addMenuItem("Examples/fig-29-2.html", "Figure 29-2: A pop-up navigational window for any page.");
addMenuItem("Examples/fig-29-3.html", "Figure 29-3: The hidden message gizmo puzzle.");
endMenu();

newMenu(3, "chap30", 285,275);
addMenuTitle("30: Stepping Stones to the Next Level");
addMenuItem("", "<I>no figures in this chapter</I>");
endMenu();

}
