Hola
UrRuX
Prueba este ejemplo:
Código PHP:
<html>
<head>
<script type="text/javascript">
function ini() {
imagenes = ['imagen1.jpg', 'imagen2.jpg', 'imagen3.jpg'];
num = Math.floor(Math.random() * imagenes.length);
document.getElementById('im').src = imagenes[num];
}
</script>
</head>
<body onload="ini()">
<img id="im" src="" />
</body>
</html>
Saludos,