// function show
// Show a layer specified by id (String)
function show(id) {
	if (navLoaded != true) return;
	if (ns4) document.layers[id].visibility = "show";
	else if (ie) document.all[id].style.visibility = "visible";
}

// function hide
// Hide a layer specified by id (String)
function hide(id) {
	if (navLoaded != true) return;
	if (ns4) document.layers[id].visibility = "hide";
	else if (ie) document.all[id].style.visibility = "hidden";
}

// function clipValues
// Returns the clip value designated by 'which'

function clipValues(obj,which) {
	if (ns4) {
		if (which=="t") return obj.clip.top
		if (which=="r") return obj.clip.right
		if (which=="b") return obj.clip.bottom
		if (which=="l") return obj.clip.left
	}
	else if (ie) {
		if (mac) var clipv = obj.clip.split("rect(")[1].split(")")[0].split(" ")
		else var clipv = obj.clip.split("rect(")[1].split(")")[0].split("px")
		if (which=="t") return Number(clipv[0])
		if (which=="r") return Number(clipv[1])
		if (which=="b") return Number(clipv[2])
		if (which=="l") return Number(clipv[3])
	}
}

// function toggleLayer
// Toggles a layer on or off
function toggleLayer(id) {
	if (id == null) return;
	if (ns4) {
		if (document.layers[id].visibility == "show") {
			hide(id);
		}
		else {
			show(id);
		}
	}
	else if (ie) {
		if (document.all[id].style.visibility == "visible") {
			hide(id);
		}
		else {
			show(id);
		}
	}
}
