var currentLayer = 'page1';
function chkAnswer(obj, lyr){
	var radio_choice = false;
	for (ctr=0; ctr < obj.length; ctr++){
	    if (obj[ctr].checked)
			radio_choice = true; 
	}
	
	if (!radio_choice){
		alert("Please select an answer to proceed with the next question.");
		obj[0].focus();
		return false;
	}

	if (lyr=='end')
		return true;
	else
		showLayer(lyr);
}

function showLayer(lyr){
	hideLayer(currentLayer);
	document.getElementById(lyr).style.visibility = 'visible';
	currentLayer = lyr;
}

function hideLayer(lyr){
	document.getElementById(lyr).style.visibility = 'hidden';
}
