// Banner rotation script
// from http://www.xs4all.nl/~ppk/js/rotate.html
// the <body> tag needs to include the fresh() function as:
// <body onLoad="fresh()">
// banner link can go anywhere in page

// list the links to the banner images here
// one per line, with NO comma on the last entry
var banners = new Array("http://www.musicweb.uk.net/rotating_banners/arcodiva.gif",
"http://www.musicweb.uk.net/rotating_banners/bmsbanner.gif",
"http://www.musicweb.uk.net/rotating_banners/MicMacBanner.gif",
"http://www.musicweb.uk.net/rotating_banners/CDAccord.gif",
"http://www.musicweb.uk.net/rotating_banners/hoffnung.gif",
"http://www.musicweb.uk.net/rotating_banners/Glogo60.gif",
"http://www.musicweb.uk.net/rotating_banners/redcliffe.gif" );
// list the corresponding URLs for the banner links here
// one per line, with NO comma on the last entry
var linx = new Array(
"http://www.musicweb.uk.net/arcodiva/ARCO_DIVA_catalogue.htm",

"http://www.musicweb.uk.net/BMS/recordings.html", 

"http://www.micmacmusic.com","http://www.musicweb.uk.net/CDACCORD/CDACCORD_Catalogue.htm",
"http://www.musicweb.uk.net/hoffnung/Hoffsales/hoffsale.htm",

"http://www.musicweb.uk.net/Gasparo/index.htm",
"http://www.musicweb.uk.net/Redcliffe/index.htm"
);
var old = 0;
var current = 0;
// timeout is the refresh rate in milliseconds for the banner rotation, set to suit
// defaulted to 5 secs
var timeout = 5000;

function fresh() {	
   if (!document.images) return;
   	
   while (current == old) 	{
   		current = Math.floor(Math.random()*banners.length);
   }	
      old = current;
   	document.images['banner'].src = banners[current];	
      setTimeout('fresh()',timeout);
}

function sendPage() {
    location.href = linx[current];
}