function showhide(layer_ref) 
{
	// current state	
	state = null;

	if (document.all) 
	{	
		if (document.all[layer_ref].style.visibility == 'visible')
		{
			state = 'visible';
		}
	}
	
	if (document.layers) 
	{	
		if (document.layers[layer_ref].visibility == 'visible')
		{
			state = 'visible';
		}
	}
	
	if (document.getElementById && !document.all) 
	{	
		maxwell_smart = document.getElementById(layer_ref);
		if (maxwell_smart.style.visibility == 'visible')
		{
			state = 'visible';
		}
	}
	
	if (state == 'visible') 
	{
		state = 'hidden';
		disp = 'none';
	}
	else 
	{
		state = 'visible';
		disp = 'block';
	}

	if (document.all) 
	{ 
		//IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
		eval( "document.all." + layer_ref + ".style.display = disp");
	}
	if (document.layers) 
	{ 
		//IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
		document.layers[layer_ref].display = disp;
	}
	if (document.getElementById && !document.all) 
	{
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
		maxwell_smart.style.display = disp;
	}
}


function show(layer_ref) 
{
	state = 'visible';
	disp = 'block';

	if (document.all) 
	{ 
		//IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
		eval( "document.all." + layer_ref + ".style.display = disp");
	}
	if (document.layers) 
	{ 
		//IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
		document.layers[layer_ref].display = disp;
	}
	if (document.getElementById && !document.all) 
	{
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
		maxwell_smart.style.display = disp;
	}
}

function hide(layer_ref) 
{
	state = 'hidden';
	disp = 'none';

	if (document.all) 
	{ 
		//IS IE 4 or 5 (or 6 beta)
		eval( "document.all." + layer_ref + ".style.visibility = state");
		eval( "document.all." + layer_ref + ".style.display = disp");
	}
	if (document.layers) 
	{ 
		//IS NETSCAPE 4 or below
		document.layers[layer_ref].visibility = state;
		document.layers[layer_ref].display = disp;
	}
	if (document.getElementById && !document.all) 
	{
		maxwell_smart = document.getElementById(layer_ref);
		maxwell_smart.style.visibility = state;
		maxwell_smart.style.display = disp;
	}
}
