function BackgroundClass(clase,num_imagenes) { var numero = Math.abs(Math.round(Math.random()*num_imagenes-1)); document.body.className=""+clase+""+numero; return null; }