window.onload=function() {
	setopacity('navigation',0);
}

function hpintro() {
	//document.getElementById('header').style.visibility = "visible";
	//document.getElementById('navigation').style.visibility = "visible";
	document.getElementById('flashshell').style.visibility = "hidden";
	fade('navigation',0,100,.7);
}

function setopacity(thisdiv,percent,ignore) {
	thefadediv = document.getElementById(thisdiv);
	if (thefadediv) {
		thefadediv.style.opacity = (percent/101);
		thefadediv.style.MozOpacity = (percent/101);
		thefadediv.style.KhtmlOpacity = (percent/100);
		if (ignore != 'ignore_ie') thefadediv.style.filter = "alpha(opacity=" + percent + ")";
	}
}

function fade(thisdiv,start,end,dur,fps,ignore) {
	if (!fps) {
		fps = 15;
	}

	if (!ignore) {
		ignore = null;
	}

	if (!dur && fade_duration != null) {
		dur = fade_duration;
	}
	var fadesteps = (dur * fps);
	var fadestepdur = Math.round((dur * 1000) / fadesteps);

	fadeopac = start;
	if (start < end) {
		var opacstep = ((end - start) / fadesteps);
		for(i=0; i<=fadesteps; i++) {
			setTimeout("setopacity('" + thisdiv + "'," + fadeopac + ",'" + ignore + "')",(i * fadestepdur));
			fadeopac = (i==(fadesteps-1)) ? end : (fadeopac + opacstep);
		}
	}
	else if (start > end) {
		var opacstep = ((start - end) / fadesteps);
		for(i=0; i<=fadesteps; i++) {
			setTimeout("setopacity('" + thisdiv + "'," + fadeopac + ",'" + ignore + "')",(i * fadestepdur));
			fadeopac = (i==(fadesteps-1)) ? end : (fadeopac - opacstep);
		}
	}
}
