// scripts realizados a partir del código de Sergi Meseguer - www.zigotica.com

 /*===================================================
  Tiempo de estancia de imagenes
  ===================================================*/
  var tiempo = 3000;
  /*=================================================*/                


var elementos= new Array();
var cont = 0;



    	
    	
var CARRUSEL = {
    
    init : function() {
	elementos = document.getElementById('columna').getElementsByTagName('img');
	elementos[0].style.display = 'block';
	
	setInterval("lanzarCarrusel(cont)", tiempo);	
	}		
}

function lanzarCarrusel(valor){
	var tamanio = elementos.length;
	
	
	cont++;
	
	if( cont == tamanio ){
		elementos[tamanio - 1].style.display = 'none';
		elementos[0].style.display = 'inline';
		cont = 0;		
	}
	else{
		elementos[cont - 1].style.display = 'none';
		elementos[cont].style.display = 'inline';
	}			
}


// añadido de eventos realizado como en http://simon.incutio.com/archive/2004/05/26/addLoadEvent

function addLoadEvent(fn) {
	var old = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = fn;
	} else {
		window.onload = function() {
			old();
			fn();
		}
	}
}

addLoadEvent(function() {
	CARRUSEL.init();
});






