
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/
var delay=3000 //set delay in miliseconds
var curindex=0
var randomimages=new Array()
randomimages[0]="img/homePict/home01.jpg"
randomimages[1]="img/homePict/home02.jpg"
randomimages[2]="img/homePict/home03.jpg"
randomimages[3]="img/homePict/home04.jpg"
randomimages[4]="img/homePict/home05.jpg"
randomimages[5]="img/homePict/home06.jpg"
randomimages[6]="img/homePict/home07.jpg"
randomimages[7]="img/homePict/home08.jpg"
randomimages[8]="img/homePict/home09.jpg"
randomimages[9]="img/homePict/home10.jpg"
var preload=new Array()
for (n=0;n<randomimages.length;n++)
{
	preload[n]=new Image()
	preload[n].src=randomimages[n]
}
document.write('<img name="defaultimage" src="'+randomimages[Math.floor(Math.random()*(randomimages.length))]+'">')
function rotateimage()
{
if (curindex==(tempindex=Math.floor(Math.random()*(randomimages.length)))){
curindex=curindex==0? 1 : curindex-1
}
else
curindex=tempindex
	document.images.defaultimage.src=randomimages[curindex]
}
setInterval("rotateimage()",delay)
