// JavaScript Document

<!--

var urlArray = new Array(4); //for URL's, increase size as necessary
var banArray = new Array(4); //for banners, increase size as necessary
var counter = 1;
var url = "http://www.greenvillecyclingcenter.com/"; //initial URL

//add your necessary URL's
urlArray[0] = "http://www.cyclingpeakssoftware.com/affiliate/aw.aspx?A=56&amp;Task=Click";
urlArray[1] = "http://www.srm.de/usa/index.html";
urlArray[2] = "http://www.crunkpt.com/";
urlArray[3] = "http://www.skins.net/";

if(document.images) //pre-load all banner images
{
  for(i = 0; i < 4; i++) // don't forget to update this to match banner count as well
  {
    banArray[i] = new Image(468, 66);
    banArray[i].src = "http://www.greenvillecyclingcenter.com/images/banners/banner" + (i+1) + ".jpg";
  }
}


function changeBanner() //banner changer function
{
  if(counter > 3) // update this number too, must be one less than number of banners in array
   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()", 5000);

//-->