actually don't listen to what i just said do this.
the following will get rid of that blank x box when you first visit your image page.
if (!arrImages[nImage])
{
// dunno what they want, show nothing
}
else
{
// show the image the chose
sImagePath = arrImages[nImage];
// display image
window.imgswap.innerHTML = '<img src=\'' + sImagePath + '\' border=0>';
}
below is exactly the same thing, just cleaner code.
if (arrImages[nImage])
{
// show the image the chose
sImagePath = arrImages[nImage];
// display image
window.imgswap.innerHTML = '<img src=\'' + sImagePath + '\' border=0>';
}