// Manages any number of Rollover objects.
function RolloverMenu( displayImage ) {

	this.displayImage = displayImage
	this.rollovers = new Array()
	
	this.addRollover = function addRollover( rollover ) {
		this.rollovers[ rollover.getName() ] = rollover
	}
	
	this.showRollover = function showRollover( name ) {
		document.images[ this.displayImage ].src = "" + this.rollovers[ name ].getImagePath()
	}
}

/*
	A Rollover represents an image that displays another, usually larger, image
	when the mouse floats over it.
	
	name - The name of the Rollover, this name is used by an image in
	the HTML body to specify which rollover image should be displayed
	when the mouse floats over it.

	imagePath - The path to the image that is to be displayed.
*/
function Rollover( name, imagePath ) {

	this.name = name
	this.image = new Image()
	this.imagePath = imagePath
	this.image.src = imagePath
	
	this.getName = function getName() {
		return this.name
	}
	
	this.getImagePath = function getImagePath() {
		return this.imagePath
	}
	
	this.getImageSource = function getImageSource() {
		return this.image.src
	}
}
