

/**
 * 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_LinkTabs(total, pre_link, pre_content, pre_status) {
 	this.total_tabs = total;
	this.link_prefix = pre_link;
	this.content_prefix = pre_content;
	this.status_prefix = pre_status;
	//this.hideAll();
 };
 
 
 /**
 * This function initialise the gallery and loads the first image
 *
 * @param path Full path to large image to show
 */

 BR_LinkTabs.prototype.hideAll = function() {
	for ( var i = 1 ; i < (this.total_tabs + 1) ; i++ ) {
		if ( document.getElementById(this.content_prefix + i) ) {
			document.getElementById(this.content_prefix + i).style.display = 'none';
			document.getElementById(this.status_prefix + i).innerHTML = '+';
		}
	}
 };

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

 BR_LinkTabs.prototype.showHideTab = function(link_id) {
	//this.hideAll();
	if ( document.getElementById(this.content_prefix + link_id) ) {
		if ( document.getElementById(this.content_prefix + link_id).style.display == 'block' ) {
			document.getElementById(this.content_prefix + link_id).style.display = 'none';
			document.getElementById(this.status_prefix + link_id).innerHTML = '+';
		} else {
			document.getElementById(this.content_prefix + link_id).style.display = 'block';
			document.getElementById(this.status_prefix + link_id).innerHTML = '-';
		}
	}
 };
 
 
 
 
 
 
 
 
 
