/*
showBox: Shows and hides divs that hold the seat member listing, and 
         colors the links in the table appropriately to show the current
         listing.

Called by: links in multi-colored table at top (via onClick)
Parameters: which (string), passes id of the div we want to show

Andrew Bain, albain@vcu.edu
*/
var currentBox="rn-1"; // holds value of the div currently showing
function showBox(which) {
	document.getElementById(currentBox).style.visibility="hidden"; // Turn off the old link and . . . 
	document.getElementById(which).style.visibility="visible";     // Turn on the new one
	var whichTypeCurrent=currentBox.split("-");   // Because the first part of the code (the kind of member) is all we
	switch(whichTypeCurrent[0]) {                 // really need to do this stuff.
		case "rn": document.getElementById(currentBox+"b").style.backgroundColor="#990000"; // nurses get red
		break;
		case "lp": document.getElementById(currentBox+"b").style.backgroundColor="#000099"; // practical nurses get blue 
		break;
		case "cz": document.getElementById(currentBox+"b").style.backgroundColor="#009900"; // non nurses get green.
		break;
		}	
	// and swap on the new one
	var whichTypeWhich=which.split("-"); // Because the first part (the kind of member) is all that's really relevant for 
	switch(whichTypeWhich[0]) {          // this particular exercise
		case "rn": document.getElementById(which+"b").style.backgroundColor="#c10435"; // nurses get a different red . . . 
		break;
		case "lp": document.getElementById(which+"b").style.backgroundColor="#0067C6"; // practical nurses get a different blue
		break;
		case "cz": document.getElementById(which+"b").style.backgroundColor="#62BD19"; // and non-nurses get a different green
		break;
		}	
	document.getElementById(which+"b").blur(); // get rid of that weird little border
	currentBox=which; // so we know what to hide next go-round
	}
