function FadeIntro()
{
	this.init( arguments );
};
FadeIntro.prototype.init = function( aTrigger )
{
	window[ ( this._self = "FadeIntroObject" ) ] = this;
	this._opacity = 0;
	this._timer   = null;
	this._trigger = this._createOrigin( aTrigger );
	this.setTrigger();
};
FadeIntro.prototype._createOrigin = function( aTrigger )
{
	var oReturn = new Object();
	for ( var i = 0; i < aTrigger.length; ++i )
		if ( typeof aTrigger[ i ] == "string" )
		{
			oReturn[ aTrigger[ i ] ] = {
				source:document.getElementById( aTrigger[ i ] ),
				origin:document.getElementById( "background_" + aTrigger[ i ] )
			}
			oReturn[ aTrigger[ i ] ].source._control = this;
		}
	return oReturn;
};
FadeIntro.prototype.setTrigger = function()
{
	var nCount = 0;
	for( var p in this._trigger )
	{
		if ( nCount > 0 )
		{
			this._trigger[ p ].source.onmouseover = this.__mouseover;
			this._trigger[ p ].source.onmouseout  = this.__mouseout;
		}
		else
		{
			this._default = p;
		}
		++nCount;
	}
};
FadeIntro.prototype.__mouseover = function()
{
	this._control.focus( this.id );
};
FadeIntro.prototype.__mouseout = function()
{
	this._control.blur();
};
FadeIntro.prototype.focus = function( nID )
{
	clearTimeout( this._timer );
	if ( this._currentid != nID && this._trigger[ nID ] )
	{
		this._currentid  = nID;
		this._current    = this._trigger[ nID ].origin.parentNode.appendChild( this._trigger[ nID ].origin.cloneNode( true ) );
		this._current.id = "";
		this._opacity    = 0;
		this._fadestep();
	};
};
FadeIntro.prototype.blur = function()
{
	clearTimeout( this._timer );
	this._timer = setTimeout( this._self + "._blur();", 100 );
};
FadeIntro.prototype._blur = function()
{
	this.focus( this._default );
};
FadeIntro.prototype._fadestep = function()
{
	clearTimeout( this._timer );
	this._opacity += 5;
	if ( this._opacity <= 100 )
	{
		this._current.style.opacity = this._opacity * .01;
		this._current.style.filter  = "alpha(opacity=" + this._opacity + ")";
		this._timer = setTimeout( this._self + "._fadestep();", 40 );
	}
	else
	{
		this._current.style.opacity = 1;
		this._current.style.filter  = "alpha(opacity=100)";

		var oParent = this._current.parentNode;
		var oRemove = oParent.firstChild;
		while ( oRemove )
		{
			var oNext = oRemove.nextSibling != this._current ? oRemove.nextSibling : false;
			if ( oRemove.id == "" )
				oParent.removeChild( oRemove );
			oRemove = oNext;
		}
	}
	this._current.style.visibility = "visible";
};
