var _TFundidos = new Array ();

TFundido.prototype._oFundir    = null;
TFundido.prototype.Incremento  = 10;
TFundido.prototype._iInstancia = -1;
TFundido.prototype.Intervalo   = 100;
TFundido.prototype._iNivel     = 0;


TFundido.prototype.Fundir = function ()
{
	if (this._oFundir)
		_TFundidos [this._iInstancia][1] = setInterval ('_TFundidos [' + this._iInstancia + '][0]._Fundir ()', this.Intervalo);
}


TFundido.prototype._Fundir = function ()
{
	var Aux = 0;
	
	if (this._iNivel < 100)
	{	this._iNivel += this.Incremento;
		this._iNivel > 100 ? 100 : this._iNivel;
		Aux = this._iNivel / 100;
		Aux = Aux > 0.99 ? 0.99 : Aux;
		this._oFundir.style.opacity      = Aux;
		this._oFundir.style.MozOpacity   = Aux;
		this._oFundir.style.KHTMLOpacity = Aux;
		this._oFundir.style.filter       = 'alpha(opacity=' + this._iNivel+ ')';
	} else clearInterval (_TFundidos [this._iInstancia][1]);
}


TFundido.prototype._SiguienteInstancia = function ()
{
	var l = _TFundidos.length;
	var i = 0;

	this._iInstancia = -1;
	for (i = 0; i < l && this._iInstancia <  0; i++)
		if (_TFundidos [i] == null) this._iInstancia = i;
	if (this._iInstancia < 0) this._iInstancia = l;
	_TFundidos [this._iInstancia]    = new Array ();
	_TFundidos [this._iInstancia][0] = this;
}


function TFundido (oFundir)
{
	this._SiguienteInstancia ();
	this._oFundir = oFundir;
}


////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////


