// defines DHTML for later use
var DHTML = (document.getElementById || document.all || document.layers);

// returns the object by name supplied
function getObj(name) {
	if (document.getElementById) {			// DOM level 1 browsers: IE 5+, NN 6+
		this.obj		= document.getElementById(name);
		this.style		= document.getElementById(name).style;
		this.className	= document.getElementById(name).className;
	}
	else if (document.all) {				// IE 4
		this.obj		= document.all[name];
		this.style		= document.all[name].style;
		this.className	= document.all[name].className;
	}
	else if (document.layers) {				// NN 4
		this.obj		= document.layers[name];
		this.style		= document.layers[name];
		this.className	= document.layers[name];
	}
}

// this function makes stuff show
function showStuff(stuffToShow,base) {
	if (!DHTML) {
		alert ('Sorry, your browser does not appear to support DHTML.');
		return;
	}
	var stuff = new getObj(stuffToShow);

	stuff.style.visibility = 'visible';
	if (stuff.className == "ansRight") {
		stuff = new getObj(base+"Text");
		stuff.style.visibility = 'visible';
	}
}

// this function makes stuff hide	
function hideStuff(stuffToHide,base) {
	if (!DHTML){
		alert ('Sorry, your browser does not appear to support DHTML.');
		return;
	}

	var stuff = new getObj(stuffToHide);

	stuff.style.visibility = 'hidden';
	if (stuff.className == "ansRight") {
		stuff = new getObj(base+"Text");
		stuff.style.visibility = 'hidden';
	}
}

function process(that) {
	for (index=0; index<=2; index++) {
		switch (index) {
			case 0:
				indexValue = 'a';
				break;
			case 1:
				indexValue = 'b';
				break;
			case 2:
				indexValue = 'c';
				break;
		}
		if (that.name + indexValue == that.name + that.value) {
			showStuff(that.name+indexValue,that.name);
		} else {
			hideStuff(that.name+indexValue,that.name);
		}
	}
}

