
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/

var delayII=1500 //set delayII in miliseconds
var curindexII=0

var randomimagesII=new Array()

	randomimagesII[0]="Plasmacor_Images/Plasmacor-Wall-Element-RB1.jpg"
	randomimagesII[1]="Plasmacor_Images/Plasmacor-Wall-Element-RB2.jpg"
	randomimagesII[2]="Plasmacor_Images/Plasmacor-Wall-Element-RB3.jpg"
	randomimagesII[3]="Plasmacor_Images/Plasmacor-Wall-Element-RB4.jpg"
		
var preload=new Array()

for (n=0;n<randomimagesII.length;n++)
{
	preload[n]=new Image()
	preload[n].src=randomimagesII[n]
}

document.write('<img name="defaultimageII" src="'+randomimagesII[Math.floor(Math.random()*(randomimagesII.length))]+'">')

function rotateimageII()
{

if (curindexII==(tempindex=Math.floor(Math.random()*(randomimagesII.length)))){
curindexII=curindexII==0? 1 : curindexII-1
}
else
curindexII=tempindex

	document.images.defaultimageII.src=randomimagesII[curindexII]
}

setInterval("rotateimageII()",delayII)

