/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

// CANTIDAD DE IMAGENES
var cant_img = 3
var cons = cant_img
//DURACIÓN DE CADA IMAGEN EN MILISEGUNDOS (1 segundo = 1000, 20 segundos = 20000)
//var t_img = 1000

//Función que devuelve una imagen aleatoria.
function cambiar()
{
    //img = Math.ceil(Math.random()*cant_img);
    //var imagenV=new Image();
    imagenAleatoria=new Image;
    imagenAleatoria.src="../imagenes/portada/" + cant_img + ".png";
    document.images['imagen'].src=imagenAleatoria.src;
    cant_img=cant_img+1;
    if (cant_img>cons)
		{
			cant_img=1
		}

}
