// JavaScript Document

// mainNAV
function TabRoll(id,total,idname){
	for (i=1;i<total+1;i++){
		document.getElementById(idname + 'Tab' + i).className = '';
		document.getElementById(idname + 'Sub' + i).style.display = 'none';
	}
	document.getElementById(idname + 'Tab' + id).className = 'curr';
	document.getElementById(idname + 'Sub' + id).style.display = 'block';
}

function TabRoll2(name1,name2,name3){
		document.getElementById(name1).className = '';
		document.getElementById(name3).className = '';
		
	document.getElementById(name2).className = 'curr';
}

function arrowRoll(orient,total,idname) {
	for (i=1;i<total+1;i++) {
		if(document.getElementById(idname + 'Tab' + i).className == 'curr') {
			if (orient == 'next') {
				var toId = i+1;
			} else if (orient == 'prev') {
				var toId = i-1;
			}
		}
	}
	if (toId > total) {
		toId = 1;
	}
	if (toId < 1) {
		toId = total;
	}
	TabRoll(toId,total,idname);
}


