var DHTML = (document.getElementById || document.all || document.layers);
function getLayerObj(name) {
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function swap(flag,lid)
{
	if (!DHTML) return;
	var x = new getLayerObj(lid);
	x.style.visibility = (flag) ? 'visible' : 'hidden'
}
function changeLayerBgImg(flag,lid) {
	if (!DHTML) return;
	var x = new getLayerObj(lid);
    if (flag=="on") {
        x.style.background='url(gfx/nav_bg_on.gif)';
    }
    else {
        x.style.background='url(gfx/nav_bg.gif)';
    }
}
function changeFontColor(lid,color) {
	if (!DHTML) return;
	var x = new getLayerObj(lid);
	x.style.color = color;
}
