// JavaScript Document

//this requires an array hideArray, which is an array of DivIDs to be hidden when the other is shown.
function showOneHideOthers(show,hideArray){ //we're going to hide all, then show one
	for(i=0;i<hideArray.length;i++){
		showhidelayer(hideArray[i],'none');
	}
	showhidelayer(show,'block');
}

//var state = 'block'; //define in document if needed.
function showhidelayer(layer_ref,new_state) { //this function will toggle a div's visibility on one param, or set it to block/none on two.
	var object = document.getElementById(layer_ref);
	state = object.getAttribute('display');
	if (new_state == '') {
		if(state == 'block'){
			state = 'none';
		}else{
			state = 'block';
		}
	}else{
		state = new_state;
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.display = state");
	}
	if (document.layers) { //IS NETSCAPE 4 or below
		document.layers[layer_ref].display = state;
	}
	if (document.getElementById &&!document.all) {
		hza = document.getElementById(layer_ref);
		hza.style.display = state;
	}
} 