I have a function that randomizes an array of images and returns an array with the random images after they are displayed. 

```
<script type = "text/javascript">
var images = new Array('0.jpg', '1.jpg' , '2.jpg'), result=[] ;
Array.prototype.random = function () {
    var that = this.slice();
    var length=images.length;
    var rand;
    for(i=0; i<=4;i++)
    {
        rand=Math.floor(Math.random()*(length));
        result.push(images[rand]);
    }
    return result;
} 

```

`//document.write(images.random());` when I do this I get the array with the images but I want to display them using something like `document.write('<img src="images/'+images.random()+'" width = \"\" height = \"\"/>');`\but thats not working..any ideas