
function onLoad(max_num){
	var wdth = 0;//$(".tabbedNav").width();
	for(var i = 1; i < max_num; i++){
		wdth += $("#tab"+i).width();
		alert($("#tab"+i).width());
	}
	$(".tabbedMain").width(wdth);
	alert(wdth);
}

var cur_tab = 1;

function changeTab(tab_num, max_num){
	cur_tab = tab_num;
	resetTabs(max_num);
	document.getElementById("tab"+tab_num).style.background = "#eee";
	document.getElementById("tab"+tab_num).style.borderBottomColor = "#eee";
	document.getElementById("tab"+tab_num+"_main").style.display = "block";	
}

function resetTabs(max_num){
	for(var i = 1; i < max_num; i++){
		document.getElementById("tab"+i).style.background = "#ccc";
		document.getElementById("tab"+i).style.borderBottomColor = "#999";
		document.getElementById("tab"+i+"_main").style.display = "none";
	}
}

function change(i) {
	if( i != cur_tab) {
		document.getElementById("tab"+i).style.color = "#fff";
		document.getElementById("tab"+i).style.background = "#666";
		document.getElementById("tab"+i).style.borderBottomColor = "#666";
	}
}

function reset_change(max_num) {
	for(var i = 1; i < max_num; i++){
		if( i != cur_tab) {
			document.getElementById("tab"+i).style.color = "#000";
			document.getElementById("tab"+i).style.background = "#ccc";
			document.getElementById("tab"+i).style.borderBottomColor = "#999";
		}
	}
}

/*Tabs
function tab_one(){
	
}

function tab_two(){
	
}

function tab_three(){
	
}

function tab_four(){
	
}

function tab_five(){
	
}

function tab_six(){
	
}

function tab_seven(){
	
}*/