if (document.images) {
    about_uson = new Image();
    about_uson.src = "/images/menu_about_us_on.gif";

    about_usoff = new Image();
    about_usoff.src = "/images/menu_about_us_off.gif";

    our_productson = new Image();
    our_productson.src = "/images/menu_our_products_on.gif";

    our_productsoff = new Image();
    our_productsoff.src = "/images/menu_our_products_off.gif";

    how_to_orderon = new Image();
    how_to_orderon.src = "/images/menu_how_to_order_on.gif";

    how_to_orderoff = new Image();
    how_to_orderoff.src = "/images/menu_how_to_order_off.gif";

    contacton = new Image();
    contacton.src = "/images/menu_contact_on.gif";

    contactoff = new Image();
    contactoff.src = "/images/menu_contact_off.gif";

    boxed_truffleson = new Image();
    boxed_truffleson.src = "/images/menu_boxed_truffles_on.gif";

    boxed_trufflesoff = new Image();
    boxed_trufflesoff.src = "/images/menu_boxed_truffles_off.gif";

    corporate_giftson = new Image();
    corporate_giftson.src = "/images/menu_corporate_gifts_on.gif";

    corporate_giftsoff = new Image();
    corporate_giftsoff.src = "/images/menu_corporate_gifts_off.gif";

    wedding_favorson = new Image();
    wedding_favorson.src = "/images/menu_wedding_favors_on.gif";

    wedding_favorsoff = new Image();
    wedding_favorsoff.src = "/images/menu_wedding_favors_off.gif";
}

function ItemList() {
    this.items_ar = new Array();
    this.index = -1;
}

ItemList.prototype.addItem = function(new_item) { return this.items_ar.push(new_item); }
ItemList.prototype.countItems = function() {  return this.items_ar.length; }

ItemList.prototype.next = function() {
    this.index++;
    if(this.index > (this.items_ar.length-1)) {
        this.index = 0;
    }
    return this.items_ar[this.index];
}

ItemList.prototype.prev = function() { 
    this.index--;
    if(this.index < 0) {
        this.index = this.items_ar.length - 1;
    }
    return this.items_ar[this.index];
}

ItemList.prototype.current = function() {
    return this.items_ar[this.index];
}

function GalleryImage(img_src) {
    
    this.image = new Image()
    this.image.src = img_src;
    
    this.id = 0;
    this.description = '';
}

GalleryImage.prototype.getImage = function() { return this.image; }
GalleryImage.prototype.setImage = function(new_image) { this.image = new_image; }

GalleryImage.prototype.getImageSrc = function() { return this.image.src; }
GalleryImage.prototype.setImageSrc = function(img_src) { this.image.src = img_src; }

GalleryImage.prototype.getImageWidth = function() { return this.image.width; }
GalleryImage.prototype.setImageWidth = function(new_width) { this.image.width = new_width; }

GalleryImage.prototype.getImageHeight = function() { return this.image.height; }
GalleryImage.prototype.setImageHeight = function(new_height) { this.image.height = new_height; }

GalleryImage.prototype.getId = function() { return this.id; }
GalleryImage.prototype.setId = function(new_id) { this.id = new_id; }

GalleryImage.prototype.getDescription = function() { return this.description; }
GalleryImage.prototype.setDescription = function(value) { this.description = value; }

