﻿function changeVisibility(activate, total) {
// change layers 1 to total: show layer activate and hide all others
	var pic, textOn, textOff;
	for (i=1; i <= total; i++) {
	
		pic = findDOM("pic" + i, 1);
		textOn = findDOM("text" + i + "on", 1);
		textOff = findDOM("text" + i + "off", 1);
		
		if (i == activate) {
			// show this i
			pic.visibility = "visible";
			textOn.visibility = "visible";
			textOff.visibility = "hidden";
		} else {
			// hide this i
			pic.visibility = "hidden";
			textOn.visibility = "hidden";
			textOff.visibility = "visible";
		}
	}
}
