var randnum = Math.random();
var num = 8;
var rand = Math.round(randnum * (num-1)) + 1;

function establecerFondoAleatorio()
{
     document.getElementById("encabezado").style.backgroundImage = "url(imagenes/fondo_encabezado"+ rand + ".png)";
     document.getElementById("pie").style.backgroundImage = "url(imagenes/fondo_pie"+ rand + ".png)"
}
