function rand(min, max) { return Math.round(min + Math.random() * (max - min)); } document.getElementById('box'+rand(1,54)).style.opacity = '0.1';