/*
 * Title: 	Coreware Tab Switcher Script
 * Author: 	Austen Constable, Coreware Ltd
 * URL:		http://www.coreware.co.uk
 * Version:	1.0
 */

function tabSwitcher(){
	this.current_tab;
	this.tab_content_name;
	this.tab_name;

	//this.loadTab = loadTab;
}

function tabSwitcher(start_tab, tab_content_name, tab_name){
	this.current_tab = start_tab || 0;
	this.tab_content_name = tab_content_name || 'tabContent';
	this.tab_name = tab_name || 'tab';
}

new tabSwitcher();
tabSwitcher.prototype.load = loadTab;

function loadTab(tab_number){
	document.getElementById(this.tab_content_name + this.current_tab).style.display = "none"; 
	document.getElementById(this.tab_name + this.current_tab).className = ""; 
		
	document.getElementById(this.tab_name + tab_number).className = "current";
	document.getElementById(this.tab_content_name + tab_number).style.display = "block";
				
	this.current_tab = tab_number;
}
