Hi,

I run a site that includes weekly galleries :

http://www.strathycruise.com/cruise

People can click on the thumbnail to popup a window with the larger image.

I also have a little postcard script I created running that can send out images via email if people wish to do so and the code is dynamically created inside the popup when clicked from the main gallery page :

eg: http://www.strathycruise.com/postcar.../cruise-02.jpg

This all works fine but Ive now created a little slideshow script in Javascript and cant figure out how to place it in the little popup window and still be able to link to the postcard sender.

Using Next and Prev links I change the .src of the image so it appears onscreen without reloading the entire page but how so I also mirror the different image filename in the "Send a postcard" link.

Here is the simple slideshow I've created :

[VBS]
<html>
<head>
<SCRIPT LANGUAGE='JavaScript'>

currentslide=1;
maxslides=99;

function prevSlide() {

if(document.images) {
currentslide--;
if(currentslide<1) currentslide=maxslides;
if(currentslide==1) document.images['slide'].src='cruise-01.jpg';
if(currentslide==2) document.images['slide'].src='cruise-02.jpg';
if(currentslide==3) document.images['slide'].src='cruise-03.jpg';
if(currentslide==4) document.images['slide'].src='cruise-04.jpg';
if(currentslide==5) document.images['slide'].src='cruise-05.jpg';
if(currentslide==6) document.images['slide'].src='cruise-06.jpg';
if(currentslide==7) document.images['slide'].src='cruise-07.jpg';
if(currentslide==8) document.images['slide'].src='cruise-08.jpg';
if(currentslide==9) document.images['slide'].src='cruise-09.jpg';
if(currentslide>9) document.images['slide'].src='cruise-' + currentslide + '.jpg';
}
}


function nextSlide() {

if(document.images) {
currentslide++;
if(currentslide>maxslides) currentslide=1;
if(currentslide==1) document.images['slide'].src='cruise-01.jpg';
if(currentslide==2) document.images['slide'].src='cruise-02.jpg';
if(currentslide==3) document.images['slide'].src='cruise-03.jpg';
if(currentslide==4) document.images['slide'].src='cruise-04.jpg';
if(currentslide==5) document.images['slide'].src='cruise-05.jpg';
if(currentslide==6) document.images['slide'].src='cruise-06.jpg';
if(currentslide==7) document.images['slide'].src='cruise-07.jpg';
if(currentslide==8) document.images['slide'].src='cruise-08.jpg';
if(currentslide==9) document.images['slide'].src='cruise-09.jpg';
if(currentslide>9) document.images['slide'].src='cruise-' + currentslide + '.jpg';
}
}

</SCRIPT>
</head>

<body topmargin='0' leftmargin='0' vlink='#0000FF'>

<img name='slide' width=640 height=480 border=0 hspace=0 vspace=0 src='cruise-01.jpg'>
<a href='javascriptrevSlide()'>Prev</a>
<a href='javascript:nextSlide()'>Next</a>
</body>
</html>[/VBS]

Im not making myself clear but what I would like is when another image is selected via the next/prev links on the popup the link to the postcard script also changes to reflect the new image displayed :

eg: http://www.strathycruise.com/postcar.../cruise-02.jpg

becomes

http://www.strathycruise.com/postcar.../cruise-03.jpg

and so on...

Thanks