// Set the default "show" mode to that specified by W3C DOM
// compliant browsers

var showMode = 'table-cell';

// However, IE5 at least does not render table cells correctly
// using the style 'table-cell', but does when the style 'block'
// is used, so handle this

if (document.all) showMode='block';

// This is the function that actually does the manipulation

function toggleVis(btn){
	
	//alert("btn="+btn);
	
	// First isolate the checkbox by name using the
	// name of the form and the name of the checkbox
	
	btn   = document.forms['Downloads'].elements[btn];
	
	//alert(btn.name);
	
	// Next find all the table cells by using the DOM function
	// getElementsByName passing in the constructed name of
	// the cells, derived from the checkbox name

	cells = document.getElementsByName('t'+btn.name);
	//alert(cells);
	// Once the cells and checkbox object has been retrieved
	// the show hide choice is simply whether the checkbox is
	// checked or clear

	mode = btn.checked ? showMode : 'none';

	// Apply the style to the CSS display property for the cells

	for(j = 0; j < cells.length; j++) 
		{
		
		//alert(cells[j]);
		cells[j].style.display = mode;
		
		}
}