// The toggleOverlay function is used for the menus
function toggleOverlay(which,action)
{
	switch (action)
	{
		case 'show':
			document.getElementById(which).style.display = 'block';			
			break;
		case 'hide':
			document.getElementById(which).style.display = 'none';
			break;
	}
}

// the ShowRace() function is used in the job application to show conditional questions
function ShowRace()
{
	if (getCheckedValue(document.getElementById("hispanic")) == "Yes")
	{
		document.getElementById("raceRow").style.display = 'none';	
	}
	else
	{
		document.getElementById("raceRow").style.display = '';			
	}
}


// Get the value of a radiobutton list
function getCheckedValue(radioObj) {
	if(!radioObj)
		return "";
	var radioLength = radioObj.length;
	if(radioLength == undefined)
		if(radioObj.checked)
			return radioObj.value;
		else
			return "";
	for(var i = 0; i < radioLength; i++) {
		if(radioObj[i].checked) {
			return radioObj[i].value;
		}
	}
	return "";
}
