Hi there,

I'm trying to display a random image that is selected from an array. What's causing the problem is the route to the image that I'm trying to print to the page. I'm sure I'm doing something wrong with escaping characters ... or something!!

Anyway, here's the code
<script language="javascript">
document.write("<img src='images\/" + castlepic[lucky] + "\.gif'" + "width='75' height='70' alt=''></td>";
castlepic is an array I've declared earlier on in my page and lucky is randomly generated number.

What I'm trying to get is a line that will print out like this:
<img src=images/dog.gif width='75' height='70' alt=''></td>
Can anyone help me at all?