// Code to rotate images
var iMaxImgs = 6;
var arrImg = new Array(iMaxImgs);
var arrText1 = new Array(iMaxImgs);
var arrText2 = new Array(iMaxImgs);


///////////////////////////////////////////////////// MODIFY THE BELOW TO CHANGE IMAGE/TEXT ////////////////////////////////////////////////////////////

// Set the rotation interval for the images.
var RotationInterval = 3000;  // This is in millisecs, so 3000 = 3 secs

// Array of images
arrImg[0]="../media/RotatingImages/HomeImg2.jpg";
arrImg[1]="../media/RotatingImages/HomeImg3.jpg";
arrImg[2]="../media/RotatingImages/HomeImg4.jpg";
arrImg[3]="../media/RotatingImages/HomeImg5.jpg";
arrImg[4]="../media/RotatingImages/HomeImg6.jpg";
arrImg[5]="../media/RotatingImages/HomeImg1.jpg";  // This is the first image in the series

// Rotating Text 1

// Text for 2nd image
arrText1[0] = "<strong>The hardest winter for many years is almost over.<br/>Signs of new growth are starting to appear,<br /> click <a href='http://www.images-4.com/respages/lightbox.asp?LightBox=D67F4FC3-C94C-4774-AEAE-15836ED8D556'>here</a> to see more spring images...";
// Text for 3rd image
arrText1[1] = "<strong>The hardest winter for many years is almost over.<br/>Signs of new growth are starting to appear,<br /> click <a href='http://www.images-4.com/respages/lightbox.asp?LightBox=D67F4FC3-C94C-4774-AEAE-15836ED8D556'>here</a> to see more spring images...";
// Text for 4th image
arrText1[2] = "<strong>The hardest winter for many years is almost over.<br/>Signs of new growth are starting to appear,<br /> click <a href='http://www.images-4.com/respages/lightbox.asp?LightBox=D67F4FC3-C94C-4774-AEAE-15836ED8D556'>here</a> to see more spring images...";
// Text for 5th image
arrText1[3] = "<strong>The hardest winter for many years is almost over.<br/>Signs of new growth are starting to appear,<br /> click <a href='http://www.images-4.com/respages/lightbox.asp?LightBox=D67F4FC3-C94C-4774-AEAE-15836ED8D556'>here</a> to see more spring images...";
// Text for 6th image
arrText1[4] = "<strong>The hardest winter for many years is almost over.<br/>Signs of new growth are starting to appear,<br /> click <a href='http://www.images-4.com/respages/lightbox.asp?LightBox=D67F4FC3-C94C-4774-AEAE-15836ED8D556'>here</a> to see more spring images...";
// Text for 1st image
arrText1[5] = "<strong>The hardest winter for many years is almost over.<br/>Signs of new growth are starting to appear,<br /> click <a href='http://www.images-4.com/respages/lightbox.asp?LightBox=D67F4FC3-C94C-4774-AEAE-15836ED8D556'>here</a> to see more spring images...";


// Rotating Text 2

// Text for 2nd image
arrText2[0] = "<strong>Use the keyword search to find the images you need,<br /> or call our researchers on 0114 258 0281.";
// Text for 3rd image
arrText2[1] = "<strong>Use the keyword search to find the images you need,<br /> or call our researchers on 0114 258 0281.";
// Text for 4th image
arrText2[2] = "<strong>Use the keyword search to find the images you need,<br /> or call our researchers on 0114 258 0281.";
// Text for 5th image
arrText2[3] = "<strong>Use the keyword search to find the images you need,<br /> or call our researchers on 0114 258 0281.";
// Text for 6th image
arrText2[4] = "<strong>Use the keyword search to find the images you need,<br /> or call our researchers on 0114 258 0281.";
// Text for 1st image
arrText2[5] = "<strong>Use the keyword search to find the images you need,<br /> or call our researchers on 0114 258 0281.";

///////////////////////////////////////////////////// MODIFY THE ABOVE TO CHANGE IMAGE/TEXT ////////////////////////////////////////////////////////////


var iCurImg = 0;

function rotateImage()
{
  document.images["imgHome"].src = arrImg[iCurImg];
  document.all["Imgtxt1"].innerHTML = arrText1[iCurImg];
  document.all["Imgtxt2"].innerHTML = arrText2[iCurImg];
  iCurImg = iCurImg + 1;
  if (iCurImg >= iMaxImgs)
  {
    iCurImg=0;
  }
}
