JavaScript: Image rollover

This article was first written in May 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/258).

Description

Allow to implement images rollovers by simply defining the images of a specific CSS class. Then you only have to call the function "rollover_register()" and pass it the optional parameters:
  • the CSS class you want to trigger. Default: "img.rollover".
  • the pattern you want to add to the original image (e.g.: image.png and image.over.png). Default: ".over".
  • the handler function for onMouseOver.