Thanks - though I wasn't able to quite come up with a solution yet. I
am putting my code here, maybe that will help. If anyone can make
suggestions on how to alter it, that would be much appreciated!
Here's the code for the popup slideshow I have now which currently is
running.
***********************************************
<html>
<head>
<script language="JavaScript">
<!--
var interval = 30000;
var random_display = 0;
var imageDir = "images/";
var imageNum = 0;
imageArray = new Array();
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_airplane.jpg");
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_airplane.jpg");
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_humidor.jpg");
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_humidor2.jpg");
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_lounge1.jpg");
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_lounge2.jpg");
imageArray[imageNum++] = new imageItem(imageDir + "im_pop_udr.jpg");
imageArray[imageNum++] = new imageItem(imageDir +
"im_pop_winecel.jpg");
var totalImages = imageArray.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function randNum(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
imageNum = randNum(0, totalImages-1);
}
else {
imageNum = (imageNum+1) % totalImages;
}
var new_image = get_ImageItemLocation(imageArray[imageNum]);
return(new_image);
}
function getPrevImage() {
imageNum = (imageNum-1) % totalImages;
var new_image = get_ImageItemLocation(imageArray[imageNum]);
return(new_image);
}
function prevImage(place) {
var new_image = getPrevImage();
document[place].src = new_image;
}
function switchImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "switchImage('"+place+"')";
timerID = setTimeout(recur_call, interval);
}
// -->
</script>
</head>
<body>
<table>
<tr>
<td><img src="images/im_pop_airplane.jpg" width="442" height="288"
alt="" border="0" img name="slideImg"></td>
</tr>
<tr>
<td class="closelink"><a href="#" onClick="prevImage('slideImg');
clearTimeout(timerID)" class="closelink"> <<previous</a> </td>
<td></td>
<td align="right" class="closelink"><a href="#"
onClick="switchImage('slideImg'); clearTimeout(timerID)"
class="closelink">next>> </a></td>
</tr>
<tr>
</table>
</body>
</html>
***********************************************************
The code above is the actual slideshow code which runs in a popup
window. I want to be able to call up the slideshow popup from other
pages in my website, but have it start at an image I specify.
For instance, on one page, I use this code to call up the slideshow
popup:
<a href="javascript
opUp('banquet_tour.html')"><img
src="images/bt_bd_pic2.jpg" width="234" height="153" alt=""
border="0"></a>
It always defaults to the first popup in the array. How can I ask it
to start with a different specific image in the array?
***********************************************