// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 4000;
// Duration of crossfade (seconds)
var crossFadeDuration = 5;
// Specify the image files
var Pic = new Array();

// to add more images, just continue
// the pattern, adding to the array below

Pic[0] = 'photos/slideshow1.jpg'
Pic[1] = 'photos/slideshow2.jpg'
Pic[2] = 'photos/slideshow3.jpg'
Pic[3] = 'photos/slideshow4.jpg'
Pic[4] = 'photos/slideshow5.jpg'
Pic[5] = 'photos/slideshow6.jpg'
Pic[6] = 'photos/slideshow7.jpg'
Pic[7] = 'photos/slideshow8.jpg'
Pic[8] = 'photos/slideshow9.jpg'
Pic[9] = 'photos/slideshow10.jpg'
Pic[10] = 'photos/slideshow11.jpg'
Pic[11] = 'photos/slideshow12.jpg'
Pic[12] = 'photos/slideshow13.jpg'
Pic[13] = 'photos/slideshow14.jpg'
Pic[14] = 'photos/slideshow15.jpg'
Pic[15] = 'photos/slideshow16.jpg'
Pic[16] = 'photos/slideshow17.jpg'
Pic[17] = 'photos/slideshow18.jpg'
Pic[18] = 'photos/slideshow19.jpg'


// do not edit anything below this line
var t;
var j = 0;
var p = Pic.length;
var preLoad = new Array();

for (i = 0; i < p; i++) {
preLoad[i] = new Image();
preLoad[i].src = Pic[i];
}

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;

if (document.all) {
document.images.SlideShow.filters.blendTrans.Play();

}
j = j + 1;
if (j > (p - 1)) j = 0;
t = setTimeout('runSlideShow()', slideShowSpeed);
}


function display(equip) {

  // Hide all layers first
  
  var equipIDs=new Array('Grove', 'LinkBelt', 'National', 'Tadano', 'Terex');
  
  for (var i=0;i<equipIDs.length;i++){  
    if (document.getElementById) { // DOM3 = IE5, NS6
      document.getElementById(equipIDs[i]).style.display = 'none';
      document.getElementById(equipIDs[i] + "_div").className = "equip-name";
    } else {
      if (document.layers) { // Netscape 4
        document.equipIDs[i].display = 'none';
      } else { // IE 4
        document.all.equipIDs[i].style.display = 'none';
      }
    }
  }
  
  // Display selected mouseover 
  
  if (document.getElementById) { // DOM3 = IE5, NS6
    document.getElementById(equip).style.display = 'block';
    document.getElementById(equip + "_div").className = "equip-name-over";
  } else {
    if (document.layers) { // Netscape 4
      document.equip.display = 'block';
    } else { // IE 4
      document.all.equip.style.display = 'block';
    }
  }  

}

function displayProject(project) {

  // Hide all layers first
  
  var projectIDs=new Array('project1', 'project2', 'project3', 'project4', 'project5', 'project6', 'project7', 'project8', 'project9', 'project10', 'project11', 'project12', 'project13', 'project14', 'project15');
  
  for (var i=0;i<projectIDs.length;i++){  
    if (document.getElementById) { // DOM3 = IE5, NS6
      document.getElementById(projectIDs[i]).style.display = 'none';
    } else {
      if (document.layers) { // Netscape 4
        document.projectIDs[i].display = 'none';
      } else { // IE 4
        document.all.projectIDs[i].style.display = 'none';
      }
    }
  }
  
  // Display selected project 
  
  if (document.getElementById) { // DOM3 = IE5, NS6
    document.getElementById(project).style.display = 'block';
  } else {
    if (document.layers) { // Netscape 4
      document.project.display = 'block';
    } else { // IE 4
      document.all.project.style.display = 'block';
    }
  }  

}