<style type="text/css">
#poster{width:100px;height:100px;}
</style>
</head>
<body>
<div id="poster"></div>
<script>
var mas=['1.jpg','2.jpg','3.jpg']
window.onload=function(){
document.getElementById('poster').style.backgroundImage="url("+mas[
parseInt(Math.random()*2)]+")"
}