var ancho = document.body.clientWidth;
if (ancho >= 850) {


var capa = 
{ 
topMargin : 90 , //posicion inicial 
ceiling : 20 , //pixels del efecto de amortiguacion 
desplazaTime : 300 , //tiempo en recorrer la distancia anterior 
capaDiv : document.all ? document.all.capa : 
(document.layers ? document.capa : document.getElementById('capa')) 
}

if( (screen.width<=800)&&(screen.height<=600) )
{
	document.all.capa.style.display="none";
}


window.setInterval("capa.coordenadas( )", 10) 

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; 
	} 

	var nuevoScrollTop = Math.max( this.scrollTop + this.topMargin, this.ceiling ); 

	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; 
	} 
} 
}
// JavaScript Document
