	document.getElementById('capa').style.visibility='visible';
	var capa = 
	{
	topMargin : 200, //posicion inicial
	ceiling : 1, //pixels del efecto de amortiguacion
	desplazaTime : 1, //tiempo en recorrer la distancia anterior
	capaDiv : document.all ? document.all.capa : 
	(document.layers ? document.capa : document.getElementById('capa'))
	}
	
	window.setInterval("capa.coordenadas( )", 90)
	
	capa.coordenadas = function( )
	{
		if(document.all)
		{
			this.actualY = this.capaDiv.style.pixelTop;
			this.scrollTop = document.body.scrollTop;
		}
		else if(document.layers)
		{
			this.actualY = this.capaDiv.top;
			this.scrollTop = window.pageYOffset;
		} 
		else if(document.getElementById)
		{
			this.actualY = parseInt(this.capaDiv.style.top);
			this.scrollTop = window.pageYOffset;
		}

		if(this.scrollTop<this.topMargin)
			var nuevoScrollTop = 0
		else
		{	
			var nuevoScrollTop = Math.max(this.scrollTop-this.topMargin, 0 );
			var nuevoScrollTop = Math.min(nuevoScrollTop, document.getElementById('centro_index').offsetHeight-770);
			this.topMargin = Math.min(this.scrollTop,this.topMargin);
		}

		if ( this.actualY != nuevoScrollTop) 
		{
			if ( nuevoScrollTop != this.targetY ) 
			{
				this.targetY = nuevoScrollTop;
				this.desplazaInit( );
			}
			this.desplaza( ); 
		}
	}
		
	capa.desplazaInit = function( )
	{
		var ahora = new Date( ) 
		this.A = this.targetY - this.actualY ; 
		this.B = Math.PI / ( 2 * this.desplazaTime ); 
		this.C = ahora.getTime( );
		this.D = this.actualY;
	}
		
	capa.desplaza = function( )
	{
		var ahora = new Date( );
		var nuevaY = this.A * Math.sin( this.B * ( ahora.getTime( ) - this.C ) ) + this.D;
		nuevaY = Math.round( nuevaY );
		
		if ( ( this.A > 0 && nuevaY > this.actualY ) || ( this.A < 0 && nuevaY < this.actualY ) ) 
		{
			//if (document.all)
			//	this.capaDiv.style.pixelTop = nuevaY;
			//else if(document.layers)
			//	this.capaDiv.top = nuevaY;
			//else if(document.getElementById)
			//	this.capaDiv.style.top = nuevaY;
		this.capaDiv.style.top=nuevaY+'px';
		}
	}
