// (C) 2000 www.CodeLifter.com
// http://www.codelifter.com
// Free for all users, but leave in this  header
// NS4-6,IE4-6
// Fade effect only in IE; degrades gracefully
// Random starting point added by Jamie, The HTML Goddess

// =======================================
// set the following variables
// =======================================

// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3500

// Duration of crossfade (seconds)
var crossFadeDuration = 3

// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'images/hm_precision_machinery.jpg'
Pic[1] = 'images/hm_plaques_awards.jpg'
Pic[2] = 'images/hm_dials_scales.jpg'
Pic[3] = 'images/hm_promotions_souvenirs.jpg'
Pic[4] = 'images/hm_control_panels.jpg'
Pic[5] = 'images/hm_durable_barcodes.jpg'

// =======================================
// do not edit anything below this line
// =======================================
var p = Pic.length;
if(document.images){
	d = Math.floor ((Math.random() * p));
}
var t

var preLoad = new Array()
for (q = 0; q < p; q++){
	preLoad[q] = new Image()
	preLoad[q].src = Pic[q]
}

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[d].src
	if(document.all){
		document.images.SlideShow.filters.blendTrans.Play()
	}
	d = d + 1
	if (d > (p-1)) d=0
	t = setTimeout('runSlideShow()', slideShowSpeed)
}
