	// (C) 2000 www.CodeLifter.com
	// http://www.codelifter.com
	// Set slideShowSpeed (milliseconds)
	var slideShowSpeed = 9000
	// Duration of crossfade (seconds)
	var crossFadeDuration = 2
	var Pic = new Array() // don't touch this
	var t
	var j = 0

	var preLoad = new Array()

	Pic[0] = 'images/circles.gif'
	Pic[1] = 'images/circles.gif'
	Pic[2] = 'images/circles.gif'
	var p = Pic.length
	for (i = 0; i < p; i++){
   		preLoad[i] = new Image()
   		preLoad[i].src = Pic[i]
	}
	
function doHighlightNav(){
	
	var lastSlash // the position of the last slash in the path
	var fileName  // the name of the file
	var hashPos // the position of the hash symbol in the case of anchors
	var fullPath
	fullPath = document.URL;
//	fullPath = fullPath.replace(/\\/g,"/");     for local testing
	lastSlash = fullPath.lastIndexOf("/");
	fileName = fullPath.substring(lastSlash+1,fullPath.length);
	hashPos = fileName.lastIndexOf("#");
	if (hashPos!=-1) {
		noAnchor = fileName.substring(0,hashPos);
	}
	else {
		noAnchor = fileName;
	}
	
	switch (noAnchor){
		case "":
			navhome.className='over';
			document.getElementById('SlideShow').src="images/wrightfield-1.jpg";
			Pic[0] = 'images/wrightfield-1.jpg'
			Pic[1] = 'images/wrightfield-2.jpg'
			Pic[2] = 'images/wrightfield-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "index.html":
			navhome.className='over';
			document.getElementById('SlideShow').src="images/wrightfield-1.jpg";
			Pic[0] = 'images/wrightfield-1.jpg'
			Pic[1] = 'images/wrightfield-2.jpg'
			Pic[2] = 'images/wrightfield-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "about-wrightfield.html":
			about.className='over';
			break;
		case "market-sectors.html":
			market.className='over';
			document.getElementById('SlideShow').src="images/market-sectors-1.jpg";
			Pic[0] = 'images/market-sectors-1.jpg'
			Pic[1] = 'images/market-sectors-2.jpg'
			Pic[2] = 'images/market-sectors-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "products.html":
			products.className='over';
			document.getElementById('SlideShow').src="images/products-1.jpg";
			Pic[0] = 'images/products-1.jpg'
			Pic[1] = 'images/products-2.jpg'
			Pic[2] = 'images/products-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "spares.html":
			spares.className='over';
			document.getElementById('SlideShow').src="images/spares-0.jpg";
			Pic[0] = 'images/spares-0.jpg'
			Pic[1] = 'images/spares-2.jpg'
			Pic[2] = 'images/spares-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "partners.html":
			partners.className='over';
			break;
		case "contact-us.php":
			contact.className='over';
			break;
		case "contact-us.html":
			contact.className='over';
			break;
		case "food-industry.html":
			food.className='over';
			break;
		case "materials-handling.html":
			materials.className='over';
			break;
		case "architectural.html":
			architectural.className='over';
			document.getElementById('SlideShow').src="images/architectural-1.jpg";
			Pic[0] = 'images/architectural-1.jpg'
			Pic[1] = 'images/architectural-2.jpg'
			Pic[2] = 'images/architectural-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "agricultural.html":
			agricultural.className='over';
			break;
		case "bespoke-engineering.html":
			bespoke.className='over';
			document.getElementById('SlideShow').src="images/wrightfield-1.jpg";
			Pic[0] = 'images/wrightfield-1.jpg'
			Pic[1] = 'images/wrightfield-2.jpg'
			Pic[2] = 'images/wrightfield-3.jpg'
			var p = Pic.length
			for (i = 0; i < p; i++){
   				preLoad[i] = new Image()
   				preLoad[i].src = Pic[i]
			}
			break;
		case "conveyors_elevators.html":
			conveyors.className='over';
			break;
		case "spiral-conveyors.html":
			spiral.className='over';
			break;
		case "bin-tipper_column-hoist.html":
			tipper.className='over';
			break;
		case "dicer_slicer.html":
			dicer.className='over';
			break;
		case "platforms_gantries.html":
			platforms.className='over';
			break;
		
	}
}

function runSlideShow(){
//   if (document.all){
//      document.images.SlideShow.style.filter="progid:DXImageTransform.Microsoft.GradientWipe(GradientSize=1.0, wipeStyle=0,motion='forward')";
//      document.images.SlideShow.filters[0].Apply();     
//   }
   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
   if (document.all){
      document.images.SlideShow.filters[0].Play(duration=crossFadeDuration);
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}