function Scroll(){
	/* Defino Variables Comunes */
	this.strObjectName;
	this.strNombre;
	this.strReferencia;
	this.objLayer;
	this.objLayerScroll;
	this.intAltoLayerScroll;
	this.intAltoLayer;
	this.intAnchoLayer;
	this.intTopReferencia;
	this.intLeftReferencia;
	this.intAreaVisible;
	this.timeScroll;

	/* Defino Variables para el indicador de Scroll */
	this.intTopScroll = 0;
	this.intAltoScroll = 0;
	this.intMovimientoLayer = 0;
	this.intCantidadPixelesMovimiento = 0;
	this.intLayerIndicadorScroll = 0;
	this.objLayerIndicadorScroll;

	/* Inicializo el member function reference para showScroll() */
	_Scroll_prototype_called = true;

	/* Inicializo el member function reference para setScroll() */
	Scroll.prototype.setScroll = setScroll;

	/* Inicializo el member function reference para showScroll() */
	Scroll.prototype.showScroll = showScroll;

	/* Inicializo el member function reference para refreshHeight() */
	Scroll.prototype.refreshHeight = refreshHeight;

	/* Inicializo el member function reference para doLayerScroll() */
	Scroll.prototype.doLayerScroll = doLayerScroll;

	/* Inicializo el member function reference para goTo() */
	Scroll.prototype.goTo = goTo;

	/* Inicializo el member function reference para stopLayerScroll() */
	Scroll.prototype.stopLayerScroll = stopLayerScroll;

	function setScroll(strObjectName, strNombre, strReferencia, intTopReferencia, intLeftReferencia, intAreaVisible){
		this.strObjectName = strObjectName;
		this.strNombre = strNombre;
		this.strReferencia = strReferencia;
		this.intTopReferencia = intTopReferencia;
		this.intLeftReferencia = intLeftReferencia;
		this.intAreaVisible = intAreaVisible;
		this.showScroll();
	}

	/* metodo Show Scroll */
	function showScroll(){
		this.objLayerScroll = getLayerName(this.strNombre);
		this.objLayer = getObjectName(this.strNombre);
		this.intAltoLayerScroll = parseInt(getAbsY(getObjectName(this.strReferencia))) + this.intTopReferencia;
		this.intAltoLayer = (this.objLayer.offsetHeight) ? this.objLayer.offsetHeight : this.objLayer.clip.height;
		this.intAnchoLayer = (this.objLayer.offsetWidth) ? this.objLayer.offsetWidth : this.objLayer.clip.width;
	
		setLayerPosition(this.objLayerScroll, this.strReferencia, this.intTopReferencia, this.intLeftReferencia);
		setClippingArea(this.objLayerScroll, 0, 0, this.intAreaVisible, this.intAnchoLayer);
		MM_showHideLayers(this.strNombre, '', 'show', 1);
	
		/* Muestro u oculto el scroll */
		if (this.intAltoLayer > this.intAreaVisible){
			/* Variables para el indicador */
			this.intTopScroll = parseInt(getAbsY(getObjectName('imgBeginScroll_' + this.strNombre)));
			this.intAltoScroll = parseInt(getAbsY(getObjectName('imgEndScroll_' + this.strNombre))) - this.intTopScroll - this.intAreaVisible;
			this.intCantidadPixelesMovimiento = this.intAltoScroll / (this.intAreaVisible - 50);
			this.intLayerIndicadorScroll = parseInt(getAbsY(getObjectName('layerBarra_' + this.strNombre)));
			this.objLayerIndicadorScroll = getLayerName('layerBarra_' + this.strNombre);
		}else{
			MM_showHideLayers('layerBarra_' + this.strNombre, '', 'hide', 'layerScroll_' + this.strNombre, '', 'hide');
		}

	}
	
	function refreshHeight(){
		this.intAltoLayer = (this.objLayer.offsetHeight) ? this.objLayer.offsetHeight : this.objLayer.clip.height;
	}
	
	function doLayerScroll(intSpeed){
		if (document.all)
			this.refreshHeight();
		this.intLayerTop = parseInt(this.objLayerScroll.top);
		this.intLayerBottom = parseInt(this.objLayerScroll.top) + parseInt(this.intAltoLayer);
		if (this.intCantidadPixelesMovimiento != 0){
			if (((this.intLayerBottom - this.intAreaVisible > this.intAltoLayerScroll) && (intSpeed < 0)) ||
				((this.intLayerTop < this.intAltoLayerScroll) && (intSpeed > 0))){
				this.objLayerScroll.top = parseInt(this.objLayerScroll.top) + parseInt(intSpeed);
				setClippingArea(this.objLayerScroll, (this.intAltoLayerScroll - parseInt(this.objLayerScroll.top)), 0, (this.intAltoLayerScroll - parseInt(this.objLayerScroll.top)) + this.intAreaVisible, this.intAnchoLayer);
				this.timeScroll = setTimeout(this.strObjectName + '.doLayerScroll(' + intSpeed + ')', 50);
			}
			this.intMovimientoLayer = (this.intTopScroll - parseInt(this.objLayerScroll.top)) / this.intCantidadPixelesMovimiento;
			this.intMovimientoLayer = (this.intMovimientoLayer > 1) ? this.intMovimientoLayer : 0;
			this.objLayerIndicadorScroll.top = this.intLayerIndicadorScroll + parseInt(this.intMovimientoLayer); 
		}
	}

	function goTo(strString){
		this.intAltoImagen = parseInt(getAbsY(getObjectName(strString))) - 3;
		this.objLayerScroll.top = this.intAltoLayerScroll + parseInt(this.objLayerScroll.top) - this.intAltoImagen;
		setClippingArea(this.objLayerScroll, (this.intAltoLayerScroll - parseInt(this.objLayerScroll.top)), 0, (intAltoLayerScroll - parseInt(this.objLayerScroll.top)) + this.intAreaVisible, this.intAnchoLayer);
	}
	
	function stopLayerScroll(){
		clearTimeout(this.timeScroll);
	}
}