/* JSRollover
** Copyright (c) 1999 Christopher D. Doemel
**
** Permission to use and modify this script is granted, so long as
** the above copyright is maintained, any modifications are
** documented, and credit is given for use of the script.
**
** Version 1.0.0, February 1999
**
** 1.0.0   Initial release (01 Feb 1999)
**
** This script requires JavaScript 1.1 in order to use and modify
** the Image object.  This script _will_ cause errors with browsers
** that do not support JS1.1.
*/

/* function highlightImage()
**    You should use the object reference to call this method
**    e.g., myRollover.highlightImage(theImage).  The single
**    argument is the Image object that should be changed.
*/
function Rollover_highlightImage(theImage) {
    theImage.src = this.highlightImg.src;
}

/* function highlightImage()
**    You should use the object reference to call this method
**    e.g., myRollover.normalImage(theImage).  The single
**    argument is the Image object that should be changed.
*/
function Rollover_normalImage(theImage) {
     theImage.src = this.normalImg.src;
}

/* Rollover(normalImgURL, highliteImgURL, pixWidth, pixHeight)
**    rollover() is a constructor used to create a new rollover.
**    The first two arguments are URLs to the normal and highlighted
**    images that will be displayed by the rollover.  The second two
**    arguments are the width and height (in pixels) of the images.
*/
function Rollover(normalImgURL, highlightImgURL, pixWidth, pixHeight) {
    // Create a new image object for the normal image.
    this.normalImg = new Image(pixWidth, pixHeight);
    this.normalImg.src = normalImgURL;

    // Create a new image object for the highlighted image.
    this.highlightImg = new Image(pixWidth, pixHeight);
    this.highlightImg.src = highlightImgURL;
    
    // Set up function prototypes
    this.highlightImage = Rollover_highlightImage;
    this.normalImage    = Rollover_normalImage;
}
