// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3900;

// Duration of crossfade (seconds)
var crossFadeDuration = 10;

// Specify the image files, links and targets
var slide_array = new Array(3); // If we add another image we need to increment this!
slide_len = slide_array.length;
for (i = 0; i < slide_len; i++) { // Make the array multidimensional, JS doesn't support multidimensional arrays from the box!
 	slide_array[i] = new Array(2); // If we add more values we need to increment this!
}

// [0] = image path; [1] = link; [2] = target, '' means no target
slide_array[0][0] = 'images-electricalexperience/sharp_banner.jpg';
slide_array[0][1] = 'search.php?xSearch=sharp+led';
slide_array[0][2] = '';

slide_array[1][0] = 'images-electricalexperience/alphason_banner.jpg';
slide_array[1][1] = 'search.php?xSearch=alphason';
slide_array[1][2] = '';

slide_array[2][0] = 'images-electricalexperience/take10_banner.jpg';
slide_array[2][1] = 'page.php?xPage=v12financeinfo.html';
slide_array[2][2] = '';


var t;
var j = 0;
var preLoad = new Array();

for (i = 0; i < slide_len; i++) {
	preLoad[i] = new Image();
	preLoad[i].src = slide_array[i][0];
}

function runSlideShow(){
	if (document.all){
		document.images.SlideShow.style.filter = "blendTrans(duration=2)";
		document.images.SlideShow.style.filter = "blendTrans(duration=crossFadeDuration)";
		document.images.SlideShow.filters.blendTrans.Apply();
	}

	document.images.SlideShow.src = preLoad[j].src;
 	document.getElementById('SlideShowLink').href = slide_array[j][1];
	if (slide_array[j][2] != '') { // set target if needed
  	document.getElementById('SlideShowLink').target = slide_array[j][2];
  }
	else {
		document.getElementById('SlideShowLink').target = '_self';
	}

	if (document.all){
		document.images.SlideShow.filters.blendTrans.Play();
	}

	j = j + 1;

	if (j > (slide_len - 1)) j = 0;
	t = setTimeout('runSlideShow()', slideShowSpeed);
}