/*switchView.js*/
/*for use on product details pages*/
/*must also include showHide.js to use*/

function switchView(currentView) {
	//views is defined in the page showing product detail

	//hide writeup sections
	for (x in views) {
		hide(views[x].elementID);

		//deactive the tabs
		document.getElementById(views[x].tabID).className = "tab_dead";
	}

	//show the right writeup
	show(views[currentView].elementID);

	//activate the right tab
	document.getElementById(views[currentView].tabID).className = "tab_active";
	
	
}