// NAVIGATION

function btnOver(value)
{
	document.getElementById('button' + value).src = 'images/nav_0' + value + '-over.gif';
}

function btnOut(value)
{
	if(document.getElementById('button' + value).src != 'images/nav_0' + value + '-over.gif')
	{
		document.getElementById('button' + value).src = 'images/nav_0' + value + '-off.gif';
	}
}

// DHTML INTERCEPT OVERLAY

var timer;
var t;

function showAf() {
	document.getElementById('fa').style.display = '';
	t = 100;
	moveUp(100000);
	fade(0);	
}

function hideAf() {
	t = 0;
	fade(100);
}

function fade(amt) {
	if((t == 100 && amt <= t) || (t == 0 && amt >= t)) setFade(amt);
	if(amt == t && t==0) moveUp(-1);
    
	amt += (t > 0)? 10:-10;
	
    if(timer!=null) clearInterval(timer);
	timer = setTimeout("fade("+amt+")", 20);
}

function setFade(amt) {
	var obj;
	
	if (document.layers) obj = document.layers.fa;
	else if (document.all) obj = document.all.fa;
	else if (document.getElementById) obj = document.getElementById("fa");
	
	amt = (amt == 100)?99.999:amt;
  
	// IE
	obj.style.filter = "alpha(opacity:"+amt+")";
  
	// Safari<1.2, Konqueror
	obj.style.KHTMLOpacity = amt/100;
  
	// Mozilla and Firefox
	obj.style.MozOpacity = amt/100;
  
	// Safari 1.2, newer Firefox and Mozilla, CSS3
	obj.style.opacity = amt/100;
	
}

function moveUp(amt) {
	if (document.layers) document.layers.fa.zIndex = amt;
	else if (document.all) document.all.fa.style.zIndex = amt;
	else if (document.getElementById) document.getElementById("fa").style.zIndex = amt;
}