GalleryImage = function(id, alt, image_filename, thumbnail_filename, zoom_filename)
{
	this.id = id;
	this.alt = alt;
	this.imageFilename = image_filename;
	this.thumbnailFilename = thumbnail_filename;
	this.zoomFilename = zoom_filename;
	
	this.preload();
}

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

GalleryImage.prototype.getAlt = function() { return this.alt; }
GalleryImage.prototype.setAlt = function(value) { this.alt = value; }

GalleryImage.prototype.getImageFilename = function() { return this.imageFilename; }
GalleryImage.prototype.setImageFilename = function(value) 
{ 
	this.imageFilename = value; 
	this.preloadImage();
}

GalleryImage.prototype.getThumbnailFilename = function() { return this.thumbnailFilename; }
GalleryImage.prototype.setThumbnailFilename = function(value) 
{ 
	this.thumbnailFilename = value; 
	this.preloadImage();
}

GalleryImage.prototype.getZoomFilename = function() { return this.zoomFilename; }
GalleryImage.prototype.setZoomFilename = function(value) 
{ 
	this.zoomFilename = value; 
	this.preloadImage();
}

GalleryImage.prototype.preload = function() 
{
	this.preloadImage();
	this.preloadThumbnail();
	this.preloadZoom();
}

GalleryImage.prototype.preloadImage = function() 
{
	this.preloadedImage = new Image();
	this.preloadedImage.src = this.imageFilename;
}

GalleryImage.prototype.preloadThumbnail = function() 
{
    this.preloadedThumbnail = new Image();
	this.preloadedThumbnail.src = this.thumbnailFilename;
}

GalleryImage.prototype.preloadZoom = function() 
{
	this.preloadedZoom = new Image();
	this.preloadedZoom.src = this.zoomFilename;
}
