Hi everyone,

I've searched high and low and finally found a slideshow script that suits my needs. It displays in a list the number of each picture so the user has the option of clicking on that picture directly rather than solely having to rely on the 'back' or 'next' buttons. the only problem is the first picture is labeled '0' instead of '1'. I'm not familiar with javascript so would really really appreciate any help on this. here's the script. thank you all!


<style type="text/css">

width: 300px;
height: auto;

#numberDiv a{
font: bold 14px Arial;
text-decoration: none;

margin-top: 6px;

<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/photo1.jpg", "http://www.google.com"]

numberslide[1]=["images/photo2.jpg", ""]
numberslide[2]=["images/photo3.jpg", ""]
numberslide[3]=["images/photo1.jpg", ""]
numberslide[4]=["images/photo2.jpg", ""]

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()

var currentindex=""

function changeslides(which){
var imghtml=""
currentindex=(which=="initial")? 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]!="")

if (mode=="initial")

function createnumbers(){
document.write('<a href="javascript:changeslides(0)" style="color:'+mylinkcolorSelected+'">0</a> ')
for (i=1; i< numberslide.length; i++)
document.write('<a href="javascript:changeslides(\''+i+'\')">'+i+'</a> ')

function changecolors(){
var numberobj=document.getElementById("numberDiv")
for (i=0; i<=currentindex; i++)
for (i=currentindex+1; i<numberslide.length; i++)

function goforward(){
if (currentindex<numberslide.length-1)

function goback(){
if (currentindex!=0)


<div id="slideshowContainer"><div id="imagecontainer"><script type="text/javascript">
changeslides("initial") //This call displays the first image
id="numberDiv"><script type="text/javascript">
createnumbers() //This call writes out the numbers
</div><div id="backforthbuttons"><a
href="javascript:goforward()" style="float: right">
<dd>Next</a> <a href="javascript:goback()">Previous</a> </dd>