// LAYER FUNCTIONS

var layerIDs = new Array()		// fill this with the ID's of the layers to be tabbed in and oput

// NOTE: only works if layer is within frame calling this function
function getLayerWithID (layerID) {
	if (ie4) 
		return eval("document.all." + layerID)
	else
		return eval("document." + layerID)
}

// NOTE: only works if layer is within frame calling this function
function getLayerWithIdInFrame (layerID, frameName) {
	if (ie4) 
		return eval("top." + frameName + ".document.all." + layerID)
	else
		return eval("top." + frameName + ".document." + layerID)
}

// NOTE: only works if layer is within frame calling this function
function showLayerWithID (layerID) {
	var myLayer = getLayerWithID(layerID)
	
	if (ns4) myLayer.visibility = "visible"
	else if (ie4) myLayer.style.visibility = "visible"
	else if (ns6) myLayer.style.display = "block"
}

// NOTE: only works if layer is within frame calling this function
function hideLayerWithID (layerID) {
	var myLayer = getLayerWithID(layerID)
		
	if (ns4) myLayer.visibility = "hidden"
	else if (ie4) myLayer.style.visibility = "hidden"
	else if (ns6) myLayer.style.display = "none"
}

// NOTE: only works if layer is within frame calling this function
function tabLayerWithID (layerID) {
	for (i=0; i<layerIDs.length; i++) {
		if (layerID != layerIDs[i]) hideLayerWithID(layerIDs[i])
	}
	showLayerWithID(layerID)
}
