﻿/* rotate images on home page */

  var rotate = new Array(4)  
  rotate[0] = "<img src=\"home-images/home-banner-leftimage.jpg\" width=\"663\" height=\"169\" alt=\"\" />";
  rotate[1] = "<img src=\"home-images/home-banner-leftimage.jpg\" width=\"663\" height=\"169\" alt=\"\" />";
  rotate[2] = "<img src=\"home-images/home-banner-leftimage.jpg\" width=\"663\" height=\"169\" alt=\"\" />"; 
  rotate[3] = "<img src=\"home-images/home-banner-leftimage.jpg\" width=\"663\" height=\"169\" alt=\"\" />"; 
  rotate[4] = "<img src=\"home-images/home-banner-leftimage.jpg\" width=\"663\" height=\"169\" alt=\"\" />";
  rotate[5] = "<img src=\"home-images/home-banner-leftimage.jpg\" width=\"663\" height=\"169\" alt=\"\" />";
  

  var ctr = Math.floor(Math.random()*6); //Generating a random number between 0 and 5

  function swapHome() {
    document.getElementById('banner-image').innerHTML = rotate[ctr];   

    ctr += 1;
    if (ctr >= 5)
      ctr = 0;   
    setTimeout("swapHome();", 120000);   // 120,000 milliseconds = 2 minutes
  }