
/*
Random image slideshow- By Tyler Clarke (tyler@ihatecoffee.com)
For this script and more, visit http://www.javascriptkit.com
*/

var delayIV=6000 //set delayIV in miliseconds
var curindexIV=0

var randomimagesIV=new Array()

	randomimagesIV[0]="Plasmacor_Images/Plasmacor-Circulation-Heating-T1.jpg"
	randomimagesIV[1]="Plasmacor_Images/Plasmacor-Circulation-Heating-T2.jpg"
	
var preload=new Array()

for (n=0;n<randomimagesIV.length;n++)
{
	preload[n]=new Image()
	preload[n].src=randomimagesIV[n]
}

document.write('<img name="defaultimageIV" src="'+randomimagesIV[Math.floor(Math.random()*(randomimagesIV.length))]+'">')

function rotateimageIV()
{

if (curindexIV==(tempindex=Math.floor(Math.random()*(randomimagesIV.length)))){
curindexIV=curindexIV==0? 1 : curindexIV-1
}
else
curindexIV=tempindex

	document.images.defaultimageIV.src=randomimagesIV[curindexIV]
}

setInterval("rotateimageIV()",delayIV)


