Ok so I copied your code and replaced this:
theimage = new Array();
// The dimensions of ALL the images should be the same or some of them may look stretched or reduced in Netscape 4.
// Format: theimage[...]=[image URL, link URL, name/description]
theimage[0]=["bpa-images/Home Slideshow/image01.jpg", "", ""];
theimage[1]=["bpa-images/Home Slideshow/image02.jpg", "", ""];
theimage[2]=["bpa-images/Home Slideshow/image03.jpg", "", ""];
theimage[3]=["bpa-images/Home Slideshow/image04.jpg", "", ""];
theimage[4]=["bpa-images/Home Slideshow/image05.jpg", "", ""];
theimage[5]=["bpa-images/Home Slideshow/image06.jpg", "", ""];
theimage[6]=["bpa-images/Home Slideshow/image07.jpg", "", ""];
theimage[7]=["bpa-images/Home Slideshow/image08.jpg", "", ""];
theimage[8]=["bpa-images/Home Slideshow/image09.jpg", "", ""];
theimage[9]=["bpa-images/Home Slideshow/image10.jpg", "", ""];
theimage[10]=["bpa-images/Home Slideshow/image11.jpg", "", ""];
theimage[11]=["bpa-images/Home Slideshow/image12.jpg", "", ""];
theimage[12]=["bpa-images/Home Slideshow/image13.jpg", "", ""];
theimage[13]=["bpa-images/Home Slideshow/image14.jpg", "", ""];
theimage[14]=["bpa-images/Home Slideshow/image15.jpg", "", ""];
theimage[15]=["bpa-images/Home Slideshow/image16.jpg", "", ""];
theimage[16]=["bpa-images/Home Slideshow/image17.jpg", "", ""];
theimage[17]=["bpa-images/Home Slideshow/image18.jpg", "", ""];
theimage[18]=["bpa-images/Home Slideshow/image19.jpg", "", ""];
theimage[19]=["bpa-images/Home Slideshow/image20.jpg", "", ""];
theimage[20]=["bpa-images/Home Slideshow/image21.jpg", "", ""];
theimage[21]=["bpa-images/Home Slideshow/image22.jpg", "", ""];
theimage[22]=["bpa-images/Home Slideshow/image23.jpg", "", ""];
theimage[23]=["bpa-images/Home Slideshow/image24.jpg", "", ""];
theimage[24]=["bpa-images/Home Slideshow/image25.jpg", "", ""];
theimage[25]=["bpa-images/Home Slideshow/image26.jpg", "", ""];
theimage[26]=["bpa-images/Home Slideshow/image27.jpg", "", ""];
theimage[27]=["bpa-images/Home Slideshow/image28.jpg", "", ""];
theimage[28]=["bpa-images/Home Slideshow/image29.jpg", "", ""];
theimage[29]=["bpa-images/Home Slideshow/image30.jpg", "", ""];
theimage[30]=["bpa-images/Home Slideshow/image31.jpg", "", ""];
So my new code looks like this:
<script type="text/javascript">
var maxImages = 99;
var myImages = new Array();
//
var imgPath = "bpa-images/Home Slideshow/";
var imgPrefix = "image";
var imgSuffix = ".jpg";
//
function preloadComplete()
{
this.complete = true;
}
function preloadError()
{
this.complete = false;
}
function preloadImages()
{
for (var x=1; i<=maxImages; ++x)
{
myImages[x] = new Image();
myImages[x].onerror = preloadError;
myImages[x].onload = preloadComplete;
myImages[x].src = imgPath + imgPrefix + x + imgSuffix;
}
return true;
}
window.onload = preloadImages;
///// Plugin variables
playspeed=2000;// The playspeed determines the delay for the "Play" button in ms
dotrans=1; // if value = 1 then there are transitions played in IE
transtype='blendTrans';// 'blendTrans' or 'revealtrans'
transattributes='23';// duration=seconds,transition=#<24
//#####
//key that holds where in the array currently are
i=0;
//###########################################
//if random
function SetRandom() {
tempimage = new Array();
for(p=0; p<theimage.length; p++){
for(p1=0; p1>-1; p1) {
tempNum = Math.floor(Math.random()*theimage.length)
if(!tempimage[tempNum]){
tempimage[tempNum]=theimage[p];
break;
}
}
}
for(p=0;p<theimage.length;p++)theimage[p]=tempimage[p];
}
//if random order
SetRandom()
//###########################################
window.onload=function(){
//preload images into browser
preloadSlide();
//set transitions
GetTrans();
//set the first slide
SetSlide(0);
//autoplay
PlaySlide();
}
//###########################################
function SetSlide(num) {
//too big
i=num%theimage.length;
//too small
if(i<0)i=theimage.length-1;
//switch the image
if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Apply()')
document.images.imgslide.src=theimage[i][0];
if(document.all&&!window.opera&&dotrans==1)eval('document.images.imgslide.filters.'+transtype+'.Play()')
}
//###########################################
function PlaySlide() {
if (!window.playing) {
PlayingSlide(i+1);
if(document.slideshow.play){
document.slideshow.play.value=" Stop ";
}
}
else {
playing=clearTimeout(playing);
if(document.slideshow.play){
document.slideshow.play.value=" Play ";
}
}
// if you have to change the image for the "playing" slide
if(document.images.imgPlay){
setTimeout('document.images.imgPlay.src="'+imgStop+'"',1);
imgStop=document.images.imgPlay.src
}
}
//###########################################
function PlayingSlide(num) {
playing=setTimeout('PlayingSlide(i+1);SetSlide(i+1);', playspeed);
}
//###########################################
//desc: picks the transition to apply to the images
function GetTrans() {
//si=document.slideshow.trans.selectedIndex;
if((document.slideshow.trans && document.slideshow.trans.selectedIndex == 0) || (!document.slideshow.trans && dotrans==0)){
dotrans=0;
}
else if ((document.slideshow.trans && document.slideshow.trans.selectedIndex == 1) || (!document.slideshow.trans && transtype == 'blendTrans')){
dotrans=1;
transtype='blendTrans';
document.imgslide.style.filter = "blendTrans(duration=1,transition=1)";
}else{
dotrans=1;
transtype='revealtrans';
if(document.slideshow.trans) transattributes=document.slideshow.trans[document.slideshow.trans.selectedIndex].value;
document.imgslide.style.filter = "revealTrans(duration=1,transition=" +transattributes+ ")";
}
}
//###########################################
function preloadSlide() {
for(k=0;k<theimage.length;k++) {
theimage[k][0]=new Image().src=theimage[k][0];
}
}
</script>
<!-- slide show HTML -->
<form name="slideshow">
<table width="288" height="432" border="1" cellpadding="1" cellspacing="0" bordercolor="#560D1C">
<tr>
<td align="center">
<a href="#" onmouseover="this.href=theimage[i][1];return false">
<script type="text/javascript">
document.write('<img name="imgslide" id="imgslide" src="'+theimage[0][0]+'" border="0">')
</script>
</a>
</td>
</tr>
</table>
</form>
But when I go to preview it, it bugs down Safari and it gives me an error saying that the script is slow and making Safari unresponsive.
Did I do something wrong? Can someone help me clean up this script?
Thanks,
Lorne