function scroller_texto() {

	var self = this ;

	this.numPixelScrolados = 1 ;

	this.velocidadScrolado = 100 ;

	this.margenSuperior = -10 ;

	this.capaContenedor = null ;

	this.capaContenido = null ;

	this.setCapaContenedor = function(idCapa){

			this.capaContenedor = document.getElementById(idCapa) ;

		};

	this.setCapaContenido = function(idCapa){

			this.capaContenido = document.getElementById(idCapa) ;

		};

	this.setNumPixelScrolados = function(nPixels){

			this.numPixelScrolados = nPixels ;

		};

	this.setVelocidadScrolado = function(velMs){

			this.velocidadScrolado = velMs ;

		};

	this.iniciar = function() {
			try
			{

				this.capaContenido.style.top = this.margenSuperior + parseInt(this.capaContenedor.offsetHeight) +'px';

				window.setTimeout(function(){self.scrolando();},this.velocidadScrolado);
			}
			catch(e){}
		} ;

	this.scrolando = function(){

		if (parseInt(this.capaContenido.style.top) + parseInt(this.capaContenido.offsetHeight)>0){

			this.capaContenido.style.top = (parseInt(this.capaContenido.style.top) - this.numPixelScrolados) + 'px';

			window.setTimeout(function(){self.scrolando();},this.velocidadScrolado);

		}else this.iniciar() ;

	}

}//var scroller_texto ;

function iniciar_pagina(){

	// scrolar las noticias

	var noticia = new scroller_texto() ;

	noticia.setCapaContenedor("padre_noticias") ;

	noticia.setCapaContenido("scroll_noticias") ;

	noticia.iniciar() ;

	// scrolar los eventos

	var evento = new scroller_texto() ;

	evento.setCapaContenedor("padre_eventos") ;

	evento.setCapaContenido("scroll_eventos") ;

//			evento.setVelocidadScrolado(400) ;

//			evento.setNumPixelScrolados(5) ;

	evento.iniciar() ;



}
