

/**
 * Class for Mini Gallery
 * Gallery is made up of thumbnails and one large image. This image
 * is replaced as the user mouses over each thumbnail with the large
 * version of the thumbnails. A preloader is shown as the image loads
 *
 * @param div_name Id of <div> containing large image
 * @param base_path Relative path to large images for this gallery
 *
 * @constructor
 */
 
 function BR_LayerRollovers(base_path, file_type) {
	this.base_path = base_path;
	this.file_type = file_type;
	this.layers = new Array('benson_siyawareva',
							'beks_ndlovu',
							'nic_polenakis',
							'alan_mcsmith',
							'alan_elliott',
							'michael_lorentz',
							'john_tina',
							'nick_murray',
							'mark_mcadam');
	//alert(document.getElementById('img_' + this.layers[0]));
 };
 
 
 /**
 * This function initialise the gallery and loads the first image
 *
 * @param path Full path to large image to show
 */

 BR_LayerRollovers.prototype.on = function(obj, name) {
	this.all_off();
	//this.showData('guide_' + name);
	obj.src = this.base_path + name + '_o' + this.file_type;
 };

 /**
 * This function initialise the gallery and loads the first image
 *
 * @param path Full path to large image to show
 */

 BR_LayerRollovers.prototype.off = function(obj, name) {
	obj.src = this.base_path + name + this.file_type;
 };


 /**
 * This function initialise the gallery and loads the first image
 *
 * @param path Full path to large image to show
 */

 BR_LayerRollovers.prototype.showData = function(name) {
	this.hideAllLayers();
	document.getElementById(name).style.display = 'block';
 };
 
 /**
 * This function initialise the gallery and loads the first image
 *
 * @param path Full path to large image to show
 */

 BR_LayerRollovers.prototype.hideAllLayers = function() {
	for (var i = 0; i < this.layers.length; i++ ) {
		document.getElementById('guide_' + this.layers[i]).style.display = 'none';
	}
 };
 
 /**
 * This function initialise the gallery and loads the first image
 *
 * @param path Full path to large image to show
 */

 BR_LayerRollovers.prototype.all_off = function() {
	for (var i = 0; i < this.layers.length; i++ ) {
		this.off(document.getElementById('img_' + this.layers[i]), this.layers[i]);
	}
 };
 
 
 
 
 
 
