var validated = 0;

function showAndHide(theId) {
	var el = document.getElementById(theId);
	if (el.style.display=="none") {
		el.style.display="block";
	} else { 
		el.style.display="none";
	}
}
function showAll(num) {
for (i=0; i<=num; i++) {
	theId = "h"+i;
	var el = document.getElementById(theId);
		el.style.display="block";
	}
}
function hideAll(num) {
for (i=0; i<=num; i++) {
	theId = "h"+i;
	var el = document.getElementById(theId);
		el.style.display="none";
	}
}
function s(theId) {
if (validated==0) {
var el = document.getElementById(theId);
		el.style.display="block";
	}
}
function h(theId) {
	var el = document.getElementById(theId);
		el.style.display="none";
}

function validate(num) {
	validated = 1;
	hideAll(num);
}