////////////////////Rotating Banner Script////////////////////
//
// Just put the images in the images directory called Banner1.jpg Banner2.jpg
// And put the links in the file below - too easy
//
/////////////////////////////////////////////////////////////

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  ShuvoRim (shuvorim@hotmail.com ) -->
<!-- Web Site:  http://www.shuvorim.tk -->

/* author@ShuvoRim
 * Banner Rotator
 */











var urlArray = new Array(3); //for URL's, increase size as necessary
var banArray = new Array(3); //for banners, increase size as necessary
var counter = 1;
var url = "http://www.consolicom.com"; //initial URL

//add your necessary URL's
urlArray[0] = "http://www.power-and-sail-accessories.com/index.htm";
urlArray[1] = "http://www.boatshop.com.au";
urlArray[2] = "http://www.power-and-sail-accessories.com/index.htm";

if(document.images) //pre-load all banner images
{
  for(i = 0; i < 3; i++)
  {
    banArray[i] = new Image(300, 50);
    banArray[i].src = "Images/banner" + (i+1) + ".jpg";
  }
}


function changeBanner() //banner changer function
{
  if(counter > 2)
   counter = 0;

  document.banner.src = banArray[counter].src; //sets a new banner

  url = urlArray[counter]; //sets a new URL to the banner
  counter++; //increase the counter for the next banner
}

//calls the changeBanner() function every 3 seconds
//change the timer as necessary (minutes * 60000) or (seconds * 1000)
var timer = window.setInterval("changeBanner()", 3000);
