I cannot seem to figure out how to get the caption to change with the image (100px x 100px). I have started a new array called destext. Can anyone provide me the code necessary to fix this? Here is the html:
==========================
==========
==========
=======
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
#slideshowContainer{
width: 100px;
height: 100px;
}
#numberDiv a{
font: bold 14px Arial;
text-decoration: none;
}
#backforthbuttons{
margin-top: 6px;
}
</style>
<script type="text/javascript">
// Index It Image Slideshow script- By JavaScriptKit.com
// For this and over 400+ free scripts, visit JavaScript Kit-
http://www.javascriptkit.com/// This notice must stay intact for use
//Specify images for slideshow:
//["Image Path", "Optional Image link"]
var numberslide=new Array()
numberslide[0]=["images/5.
gif", ""]
numberslide[1]=["images/1.
gif", ""]
numberslide[2]=["images/2.
gif", ""]
numberslide[3]=["images/3.
gif", ""]
numberslide[4]=["images/4.
gif", ""]
var destext= new Array(5)
destext[0]="Caption 0";
destext[1]="Caption 1";
destext[2]="Caption 2";
destext[3]="Caption 3";
destext[4]="Caption 4";
var mylinktarget="" //specify optional link target
var mylinkcolor="navy" //specify default color of number links
var mylinkcolorSelected="red" //specify color of selected links
var imgborderwidth=0 //specify border of image slideshow
/////Stop customizing here////////////////
var preloadit=new Array()
for (i=0;i<numberslide.length;
i++){
preloadit[i]=new Image()
preloadit[i].src=numbersli
de[i][0]
}
var currentindex=""
function changeslides(which){
var imghtml=""
currentindex=(which=="init
ial")? 0 : parseInt(which)
var mode=(which=="initial")? "initial" : ""
var which=(mode=="initial")? numberslide[0] : numberslide[which]
if (which[1]!="")
imghtml='<a href="'+which[1]+'" target="'+mylinktarget+'">
'
imghtml+='<img src="'+which[0]+'" border="'+imgborderwidth+'
">'
if (which[1]!="")
imghtml+='</a>'
if (mode=="initial")
document.write('<div>'+img
html+'</di
v>')
else{
document.getElementById("i
magecontai
ner").inne
rHTML=imgh
tml
changecolors()
}
}
function createnumbers(){
document.write('<a href="javascript:changesli
des(0)" style="color:'+mylinkcolor
Selected+'
">0</a> ')
for (i=1; i< numberslide.length; i++)
document.write('<a href="javascript:changesli
des(\''+i+
'\')">'+i+
'</a> ')
document.write("<P><FORM name='form1'><TEXTAREA name='text1' wrap='virtual' rows='5' cols='20'>"+destext+"</TEX
TAREA></FO
RM>")
}
function changecolors(){
var numberobj=document.getElem
entById("n
umberDiv")
numberlinks=numberobj.getE
lementsByT
agName("A"
)
for (i=0; i<=currentindex; i++)
numberlinks[i].style.color
=mylinkcol
orSelected
for (i=currentindex+1; i<numberslide.length; i++)
numberlinks[i].style.color
=mylinkcol
or
}
function goforward(){
if (currentindex<numberslide.
length-1)
changeslides(currentindex+
1)
}
function goback(){
if (currentindex!=0)
changeslides(currentindex-
1)
}
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div id="slideshowContainer">
<div id="imagecontainer">
<script type="text/javascript">
changeslides("initial") //This call displays the first image
</script>
</div>
<div id="numberDiv">
<script type="text/javascript">
createnumbers() //This call writes out the numbers
</script>
</div>
<div id="backforthbuttons"> </div>
</div>
</body>
</html>