/*
	Copyright David Trewern Design         :: www.dtdesign.com ::
	Unauthorised modification / use is a criminal offence, and
	will be prosecuted to the fullest extent permitted by law.
	All Rights Reserved
*/

var state = 'hidden';
var current = '';

function showhide(layer_ref) {
	if (current != '') {
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			eval( "document.all." + current + ".style.visibility = 'hidden'");
		}
		if (document.layers) { //IS NETSCAPE 4 or below
			document.layers[current].visibility = 'hidden';
		}
		if (document.getElementById && !document.all) {
			layer_x = document.getElementById(current);
			layer_x.style.visibility = 'hidden';
		}
		state = 'hidden';
	}

	if (layer_ref == current) {
		current = '';
	} else {
		if (state == 'visible') {
			state = 'hidden';
		}else {
			state = 'visible';
		}
		if (document.all) { //IS IE 4 or 5 (or 6 beta)
			eval( "document.all." + layer_ref + ".style.visibility = state");
		}
		if (document.layers) { //IS NETSCAPE 4 or below
			document.layers[layer_ref].visibility = state;
		}
		if (document.getElementById && !document.all) {
			layer_x = document.getElementById(layer_ref);
			layer_x.style.visibility = state;
		}
		
		current = layer_ref;
	}
}
