function Rollover(overSrc, name) {
    this.over_frame = new Image();
    this.off_frame = new Image();

    this.name = name;

    // preload rollover frame
    this.over_frame.src = overSrc;
}

Rollover.prototype.over = function (img) {
    if (!img && this.name) img = this.name;
    this.off_frame.src = document.images[img].src;
    document.images[img].src = this.over_frame.src;
}

Rollover.prototype.out = function (img) {
    if (!img && this.name) img = this.name;
    document.images[img].src = this.off_frame.src;
}
