/*

    Copyright 2002, eric@base10.org
    
    This file is part of OOMouseovers.

    You should have received a copy of the license terms along with 
    OOMouseovers; if not, read the latest license at 
    http://base10.org/software/mouseovers.php

*/

function MOE_ImageSwapper(im, imageurl) {
	this.debug = false;
	this.target = im;
	var newimage = new Image();
	newimage.src = imageurl;
	this.newimage = newimage;
	return this;
}
MOE_ImageSwapper.prototype.fire = function() {
	if(this.debug) alert("Swapping image " + this.target + " to " + this.newimage.src);
	document.images[this.target].src = this.newimage.src;
	if(this.debug) alert("Done!");
}

