/************************************************************************
Script made by Martial Boissonneault © 2001 http://getElementById.com/
*************************************************************************/
var ie5=(document.getElementById && document.all);

nPlus = 25	//the % of fading for each step
speed = 25	//the speed in millisecs
nOpac = 100 	//% opacity

// Dual image fading
function fadeIt(){
	if(document.getElementById)
	{
		document.getElementById('fade1').style.visibility="visible";
		fader = document.getElementById('fade2');
		opacity = nOpac+nPlus;
		nOpac = opacity;
		setTimeout('fadeIt()',speed);
		if(opacity>100 || opacity<0){ //the || <0 creates an infinite loop
		//if(opacity>100){ //single loop
			nPlus=-nPlus;
		}
		if(ie5)
		{
			fader.style.filter="alpha(opacity=0)";
			fader.filters.alpha.opacity = opacity;
		}
		else
		{
			fader.style.MozOpacity = 0;
			fader.style.opacity = 0;			
			fader.style.MozOpacity = opacity/100;
			fader.style.opacity = opacity/100;
		}
	}
}

