// Tabbed Boxes
// Last item needs to be the id of the tabs div for that box
var content = new Array("content", "features", "articles", "videos", "forums", "welcome");
var resources = new Array("resources", "gardencenters", "supplies", "publicgardens");

function switchBox (box, section) {
	// swap content section
	for (i = 1; i < box.length; i++) {
		var tmpObj = document.getElementById(box[i] + "Box");
		tmpObj.className = "hidden";
		if (box[i] == section) {
			tmpObj.className = "visible";
		}
	}
	// update tabs
	var newTab = document.getElementById(section + "Tab");
	var tabObj = document.getElementById(box[0] + "Tabs");
	var arrTabs = tabObj.getElementsByTagName("li");
	for (i = 0; i < arrTabs.length; i++) {
		arrTabs[i].className = "";
	}
	newTab.className = "on";	
	// update bottomLinks
	/*
	var newBottomLink = document.getElementById(box[0] + "BottomLinks");
	var linkObj = newBottomLink.getElementsByTagName("div");
	for (i = 0; i < linkObj.length; i++) {
		linkObj[i].className = "hidden";
		if (linkObj[i].id == section + "BottomLink") {
			linkObj[i].className = "visible";
		}
	}
	*/
}
