var cur_tab;	// holds id of currently visible layer
function swapLayers(id) {
  if (cur_tab) hideLayer(cur_tab);
  showLayer(id);
  cur_tab = id;
}
function showLayer(id) {
  var tab = getElemRefs(id);
  if (tab && tab.css) tab.css.visibility = "visible";
}
function hideLayer(id) {
  var tab = getElemRefs(id);
  if (tab && tab.css) tab.css.visibility = "hidden";
}
function getElemRefs(id) {
	var el = (document.getElementById)? document.getElementById(id): (document.all)? document.all[id]: (document.layers)? document.layers[id]: null;
	if (el) el.css = (el.style)? el.style: el;
	return el;
}
