Managed web hosting - 134Part IIJavaScript TutorialCreating image rolloversA favorite technique to

134Part IIJavaScript TutorialCreating image rolloversA favorite technique to add some pseudo-excitement to a page is to swap button images asthe user rolls the cursor atop them. The degree of change to the image is largely a matter oftaste. The effect can be subtle a slight highlight or glow around the edge of the originalimage or drastic a radical change of color. Whatever your approach, the scripting is thesame. When several of these graphical buttons occur in a group, I tend to organize the memoryimage objects as arrays and create naming and numbering schemes that facilitate workingwith the arrays. Listing 12-2 shows such an arrangement for four buttons that control a juke- box. The code in the listing is confined to the image-swapping portion of the application. Thisis the most complex and lengthiest listing of the tutorial, so it requires a bit of explanation asit goes along. Listing 12-2:Image Rollovers