Seria asi?
   Código PHP:
       <script>
     window.onload=function() {var elDiv = document.getElementById('imgContainer');var losFondos = new Array('imagen1.jpg','lafoto.jpg','rutaimagen.jpg','fotonro2.jpg');var indice = Math.floor(Math.random()*losFondos.length);alert(indice);elDiv.style.backgroundImage = 'url("img/'+ losFondos [indice] +'")';}
     </script>
     
        <DIV id=box-lateral> 
      <DIV id=top></DIV> 
      <DIV id="imgContainer"
      style="BACKGROUND-IMAGE: url(http://images.habbos.es/websystem/release_6/box-register/156.gif); BORDER-BOTTOM: #a0a0a0 1px solid; BORDER-LEFT: #a0a0a0 1px solid; PADDING-BOTTOM: 0px; PADDING-LEFT: 5px; WIDTH: 208px; PADDING-RIGHT: 0px; BACKGROUND-POSITION: right bottom; HEIGHT: 175px; BORDER-TOP: #a0a0a0 1px solid; BORDER-RIGHT: #a0a0a0 1px solid; PADDING-TOP: 5px"  > 
      <DIV id=enter><A class=button  
      href="index.php?s=register"><B><SPAN>Regístrate <IMG  
      src="http://images.habbos.es/websystem/release_6/flashy_arrow.gif"></SPAN></B><I></I></A>  
      </DIV></DIV> 
      <DIV id=bottom></DIV></DIV> 
   
  No canvia de imagen..