	var Tabber = Class.create();
	Tabber.prototype = {
		tabs: [],
		activeTab: null,
		switchActive: 'active',
		switchInactive: 'inactive',
		switchHoverOn: 'hoverOn',
		toLink: false,
		
		initialize: function(){ 
			this.tabs = []; 
			this.activeTab = null;
		},
		addTab: function( tabSwitch, tabContent ){
			var toLink = !( $( tabContent ) );
			var tempSwitch = $( tabSwitch );
			if( !toLink )
				var tempContent = $( tabContent );
			else
				var tempContent = tabContent;
			
			var that = this;
			
			tempSwitch.onclick = function(){
				that.activateTab( this.id );
			}
			tempSwitch.onmouseover = function(){
				this.className = that.switchHoverOn;
			}
			tempSwitch.onmouseout = function(){
				this.className = ( that.activeTab == this.id ) ? that.switchActive : that.switchInactive;
			}
			tempSwitch.style.cursor = 'pointer';
			tempSwitch.className = this.switchInactiveClassName;
			
			if( !toLink )
				tempContent.style.display = 'none';
			
			var tab = new Array();
			tab['switch'] = tempSwitch;
			tab['content'] = tempContent;
			tab['toLink'] = toLink;
			this.tabs.push( tab );
		},
		activateTab: function( tabSwitch, goTo ){
		
			if (tabSwitch=='topside_switch') topsideShown=true;
			if (tabSwitch=='belowDecks_switch') bellowdecksShown=true;
			if (tabSwitch=='systems_switch') systemswitchShown=true;
			if( goTo == null ) goTo = true;
			this.activeTab = tabSwitch;
			for( var i in this.tabs )if( this.tabs[i]['switch'] ){
				this.tabs[i]['switch'].className = ( this.tabs[i]['switch'].id == tabSwitch ) ? this.switchActive : this.switchInactive;

				if( this.tabs[i]['toLink'] ){ if( this.tabs[i]['switch'].id == tabSwitch && goTo )
					window.location.href = this.tabs[i]['content'];
				}
				else{
					this.tabs[i]['content'].style.display = ( this.tabs[i]['switch'].id == tabSwitch ) ? 'block' : 'none';
				}
			}
		}
	}