var banDelay = 3000; // display for 5.000 seconds each

var banners = {

banner1 : ['<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b1-1.jpg" border="0" alt="1"/></a>'],

banner2 : ['<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b2-1.jpg" border="0" alt="2"/></a>','<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b2-2.jpg" border="0" alt="2"/></a>'],

banner3 : ['<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b3-1.jpg" border="0" alt="3"/></a>', '<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b3-3.jpg" border="0" alt="3"/></a>','<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b3-2.jpg" border="0" alt="3"/></a>'],

banner4 : ['<a href="http://our-catalogue.co.uk/pages/catalogue/catalogue_home.asp?c=1167&s=729&sid=483498291" title="Catalog" target="_blank"><img src="/en/templates/images/jpg/b4-1.jpg" border="0" alt="4"/></a>']

};







// Banner Rotator

// copyright 12th October 2009 by Stephen Chapman

// http://javascript.about.com

// permission to use this Javascript on your web page is granted

// provided that all of the code below in this script (including these

// comments) is used without any alteration   

var banimg = []; for (x in banners) {for (var i=banners[x].length-1; i >= 0; i--) {var b = banners[x][i].match(/<img.+?src=['"'](.*?)['"']/);if (b) banimg.push(b[1]);}} for (var i = banimg.length - 1; i >= 0; i--) {var h = new Image(); h.src = banimg[i];}

function randOrd(){return (Math.round(Math.random())-0.5); }

var banlist = [];function Ban(b) {this.loc = document.getElementById(b);this.ary = banners[b];this.ary.sort(randOrd);this.cnt = -1;banlist.push(this);}function rotateBan() {for (var j = banlist.length - 1; j >= 0; j--) {var max = banlist[j].ary.length;banlist[j].cnt++;if (banlist[j].cnt >= max) banlist[j].cnt = 0;banlist[j].loc.innerHTML = banlist[j].ary[banlist[j].cnt];}setTimeout(rotateBan,banDelay);} function startBanner() {for (x in banners) {if (document.getElementById(x)) new Ban(x);} rotateBan();} 



window.onload = startBanner;
