////////////////////////////////////////////////////////////////////////////////
	// Produced by Marcio Galli for Netscape Communications.
	// Uses DOM 1 and CSS to change style properties like color and font spacing.
	//
	// References:
	//
	// http://www.mozilla.org/docs/dom/technote/tn-dom-table/index.html
	// http://dmoz.org/Computers/Programming/Languages/JavaScript/W3C_DOM/
	// http://www.geckonnection.com
	//
	//
	///////////////////////////////////////////////////////////////////////////////////////
	// This animation effect is divided into two parts:
	// Fade in and fade out.

	///////////////////////////////////////////////////////////////////////////////////////
	// Variables used as parameters for the animation.
	//

	el=0;			// Index of the element.
	anicounter=0;  		// Frame counter.
	colorvalue=255;		// Aux color value.
	endcounter=5;			// number of animated elements + 1

	///////////////////////////////////////////////////////////////////////////////////////
	// First step of animation - First loop
	// Fades in the text while increasing the font spacing and at the same time decreasing the
	// text color from white (255,255,255) to black (0,0,0). Since the background color
	// is white, the effect will be like moving from transparent to black.
	//
	// This effect will be applied in the object whose id is "text"+el. NOTE that, in the
	// end of the fadeout function, el increases by one and fadein is called again. This
	// process is made until all texts are animated. See texts in the HTML section in the
	// end of this document.
	//
	function fadein() {
	        document.getElementById("text"+el).style.visibility="visible";
		// This is a 20-steps animation procedure.
		if(anicounter<20) {
				// Increases anicounter.
				anicounter++;

				// Gets the current letterSpacing value. NOTE that this value was
				// initialized as 1 pixel (see HTML section).
				currentSpace=parseFloat(document.getElementById("text"+el).style.letterSpacing);

				// Increases the currentSpace by .2
				currentSpace+=.2;

				// Update the letterSpacing style property with the increased value.
				document.getElementById("text"+el).style.letterSpacing=currentSpace+"px";

				// Decreases the colorvalue after the 10th element.
				if(anicounter>10) colorvalue-=25;

				// Sets the color value for the "text"+el element.
				document.getElementById("text"+el).style.color="rgb("+colorvalue+","+colorvalue+","+colorvalue+")";

				// Call fadein again.
				setTimeout("fadein()",20);
		} else {
				// After the 20 steps, reset values and call fadeout procedure.
				anicounter=0;
				ge_valopacity=0;
				if(el<(endcounter-1)) fadeout();
		}
	}

	//************************************************************************
	// Second step of animation -	Second loop
	// Fades out the text while increasing the font spacing and at the same time increasing the
	// text color value from white (0,0,0) to white (255,255,255). Since the background color
	// is white, the effect will be like moving from black to transparent.
	//
	// Everything is the same except that colorvalue increases.
	//

	function fadeout() {
		// 20 steps of animation.
		if(anicounter<20) {
				// Increases anicounter.
				anicounter++;

				// Gets the current letterSpacing value. NOTE that this value was
				// initialized as 1 pixel (see HTML section).
				currentSpace=parseFloat(document.getElementById("text"+el).style.letterSpacing);

				// Increases the currentSpace by .2
				currentSpace+=.2;

				// Update the letterSpacing style property with the increased value.
				document.getElementById("text"+el).style.letterSpacing=currentSpace+"px";

				// Decreases the colorvalue after the 10th element.

				if(anicounter>10) colorvalue+=25;

				// Sets the color value for the "text"+el element.
				document.getElementById("text"+el).style.color="rgb("+colorvalue+","+colorvalue+","+colorvalue+")";

				setTimeout("fadeout()",20);
		} else {
			// Reset all animation parameters.
			anicounter=0;
			colorvalue=255;
                                        document.getElementById("text"+el).style.visibility="hidden";
			// Update the element index.
			el++;

			// Call fadein again until the last element.
			if(el<endcounter) fadein();
		}
	}
