
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/

var delayIII=2000 //set delayIII in miliseconds
var curindexIII=0

var randomimagesIII=new Array()

	randomimagesIII[0]="R-Factor/r-factor-thumb1.jpg"
	randomimagesIII[1]="R-Factor/r-factor-thumb2.jpg"
	randomimagesIII[2]="R-Factor/r-factor-thumb3.jpg"
	
var preload=new Array()

for (n=0;n<randomimagesIII.length;n++)
{
	preload[n]=new Image()
	preload[n].src=randomimagesIII[n]
}

document.write('<img name="defaultimageIII" src="'+randomimagesIII[Math.floor(Math.random()*(randomimagesIII.length))]+'">')

function rotateimageIII()
{

if (curindexIII==(tempindex=Math.floor(Math.random()*(randomimagesIII.length)))){
curindexIII=curindexIII==0? 1 : curindexIII-1
}
else
curindexIII=tempindex

	document.images.defaultimageIII.src=randomimagesIII[curindexIII]
}

setInterval("rotateimageIII()",delayIII)

