//----------------------------------------------------------------
//
//Auto Banner
//last modified:26/07/2010
//
//----------------------------------------------------------------

//------ All pictures in the Auto Banner
var imgs1 = new Array(      'ReviewsHeader.png', 'FacebookHeader.png', 'CupcakeHeader.png'        );

//------ All Links in the Auto Banner respective of imgs1
var lnks1 = new Array(      'Product_Reviews.html', 'http://www.facebook.com/pages/Almond-Art/363258964027', 'Cupcakes.html'  );

//------ All tooltips in the Auto Banner respective of imgs1
var title1 = new Array(     'Click here to learn all you need to know about reviewing our products.', 'Join us on Facebook & meet other cake decorators', 'Click here to view our huge range of everything cupcake!'            );

//------ Intervals of pictures respectively
var interval1 = new Array(  '7000 ', '14000', '7000'    );

//------ Number of pictures in Auto Banner
var imgCt1 = imgs1.length;

//------ Cycles through pictures and other attributes respectively
var currentAd1 = 0;
var oldad = 0;
function cycle1() {
  if (currentAd1 == imgCt1) {
    currentAd1 = 0;
  }

//------ Changes currrent image for new image (inc. respective attributes)
var banner1 = document.getElementById('Banner');
var link1 = document.getElementById('BannerLink');
  banner1.src=imgs1[currentAd1]
  banner1.title=title1[currentAd1]
  link1.href=lnks1[currentAd1]
  oldad = currentAd1
  currentAd1++;
}
//------ eg. Wait # secs
window.setInterval('cycle1(); ',interval1[oldad]);

