var tabs = new Array();

///
/// 1.1 Edit below to customize tabs.
///
/// (enter the tab name for each tab in the array)
/// You can have up to 8 tabs total.

tabs[0] = 'Home';
tabs[1] = 'Education';
tabs[2] = 'Teaching';
tabs[3] = 'Research';
tabs[4] = 'Service';
tabs[5] = 'Publication';
tabs[6] = 'Hobbies';



/// Specify the name of the tab that should be visible first.
var start_tab = 'Home';





// Do not edit below this line.
//////////////////////////////////////////////////////////////////
window.onload = function () {
	createTabs();
	changeTab(start_tab);
};

function createTabs () {
	var _container = document.getElementById("tab_container");
	var output = "";
	for (var i=0; i<tabs.length; i++) {
		if (i >= 8) break;
		output += '<a id="t'+(i+1)+'" href="javascript:changeTab(\''+tabs[i]+'\');">'+tabs[i]+'</a>';
	}
	output += '<br clear="left" />';
	if (_container) _container.innerHTML = output;
}

function changeTab (t) {
	for (var i=0; i<tabs.length; i++) {
		if (tabs[i] != t) {
			document.getElementById("tab"+(i+1)).style.display = "none";
			document.getElementById("t"+(i+1)).className = "";
		}
		else {
			document.getElementById("tab"+(i+1)).style.display = "block";
			document.getElementById("t"+(i+1)).className = "active_tab";
		}
	}
}