var exceedTabs = {
	tabSetArray: 	new Array(),
	classOn: 		"tabs_on",
	classOff: 		"tabs_off",
 
	addTabs: function (tabsContainer, panelsContainer) {
		tabs = $(tabsContainer).getElementsByTagName("a");
		this.tabContainer = $(tabsContainer);
		this.panelContainer = $(panelsContainer);
		for (x in tabs) {
			if (typeof(tabs[x].hash) != "undefined") {
				tabs[x].onclick =  function() {return exceedTabs.switchTab(this)} ;
				this.tabSetArray.push(tabs[x].hash.substring(1));
				if (tabs[x].className == this.classOn) { this.defaulttab = tabs[x] }
			} else {}
		}
		
		for (x in tabs) {
			if (typeof(tabs[x].hash) != "undefined") {
				if (tabs[x].hash.substring(1) == window.location.hash.substring(1)) {
					this.defaulttab = tabs[x]
				} else {}
			}
		}
		this.switchTab($(this.defaulttab));
	},
	switchTab: function (element) {
		for (x in this.tabSetArray) {
			dataElement = document.getElementById(this.tabSetArray[x]);
			if (dataElement) {
				if (dataElement.style.display != "none") {
					dataElement.style.display = "none";
				} else {}
			} else {}		
		}
		tabs = this.tabContainer.getElementsByTagName("a")
		for (x in tabs) {
			if (tabs[x].className != this.classOff) {
					tabs[x].className = this.classOff;
				} else {}
		}
 
		$(element.hash.substring(1)).style.display = "";
		element.className = this.classOn;
		return false;
	}
};