// JavaScript Document


// 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 mylinktarget="" //specify optional link target
var mylinkcolor="#FFFFFF" //specify default color of number links
var mylinkcolorSelected="#CB1753" //specify color of selected links

var imgborderwidth=0 //specify border of image slideshow

/////Stop customizing here////////////////

var preloadit=new Array()
var currentindex="";
var numberslide = new Array();

for (i=0;i<numberslide.length;i++){
preloadit[i]=new Image()
preloadit[i].src=numberslide[i][0]
}



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]!="")
imghtml+='</a>'

if (mode=="initial")
document.write('<div>'+imghtml+'</div>')
else{
document.getElementById("imageShowContainer").innerHTML=imghtml
changecolors()
}
}

function createnumbers(){
document.write('<a href="javascript:changeslides(0)" style="color:'+mylinkcolorSelected+'">1</a>&nbsp;&nbsp; ')
for (i=1; i< numberslide.length; i++)
document.write('<a href="javascript:changeslides(\''+i+'\')">'+(i+1)+'</a>&nbsp;&nbsp;')
}

function changecolors(){
var numberobj=document.getElementById("numberImageShow")
numberlinks=numberobj.getElementsByTagName("A")
for (i=0; i<=currentindex; i++)
numberlinks[i].style.color=mylinkcolorSelected
for (i=currentindex+1; i<numberslide.length; i++)
numberlinks[i].style.color=mylinkcolor
}

function goforward(){
if (currentindex<numberslide.length-1)
changeslides(currentindex+1)
}

function goback(){
if (currentindex!=0)
changeslides(currentindex-1)
}


