   
        img = new Array();             
        img.push('images/imagen1.jpg');
        img.push('images/imagen2.jpg');
        img.push('images/imagen3.jpg'); 
       
              
        function cambiaFondo(){
            cont = document.getElementById("fondo");
            cont.style.backgroundImage = 'url(' + img[aleatorio(img.length - 1)] + ')';
        }
        
        function aleatorio(num){
            aleat = Math.random() * num;
            aleat = Math.round(aleat);
            return aleat;
        }
        
        window.onload = function(){
            cambiaFondo();
            setInterval('cambiaFondo()', 9000);
        };
         
 
