﻿// JavaScript Document
 

function changClassName(rotationTabGroupID,rotationContentGroupID,n){
	var tabMenuBtns = document.getElementById(rotationTabGroupID).getElementsByTagName('span');
 
	for(var i=0; i< tabMenuBtns.length; i++){ 
		document.getElementById(rotationTabGroupID).getElementsByTagName('span')[i].className = "tabMenu nor_menu";  
		document.getElementById(rotationContentGroupID).getElementsByTagName('ul')[i].className = "treasure_lis nor_treasure"; 
	}
	document.getElementById(rotationTabGroupID).getElementsByTagName('span')[n].className = "tabMenu cur_menu";  
	document.getElementById(rotationContentGroupID).getElementsByTagName('ul')[n].className = "treasure_lis cur_treasure"; 
}

function taggleRotationTab(tabNum,rotationTabGroupID,rotationContentGroupID){
	if(!document.getElementById(rotationTabGroupID)) return false; 
	if(!document.getElementById(rotationContentGroupID)) return false;
	var rTabNum = tabNum;
	changClassName(rotationTabGroupID,rotationContentGroupID,tabNum); 
}
