var rand=Math.floor(Math.random()*1000000); document.write('
'); var width=document.getElementById('div'+rand).clientWidth; var count=parseInt(width/280); document.write('');