if (/msie/i.test (navigator.userAgent)) { document.nativeGetElementById = document.getElementById; document.getElementById = function(id) { var elem = document.nativeGetElementById(id); if(elem) { //make sure that it is a valid match on id if(elem.attributes['id'].value == id) { return elem; } else { //otherwise find the correct element for(var i=1;i < document.all[id].length;i++) { if(document.all[id][i].attributes['id'].value == id) { return document.all[id][i]; } } } } return null; }; } var bannerImg = new Array(); var bannerText = new Array(); // Enter the names of the images below bannerImg[0]="http://www.emailbookclub.com/book/fiction.jpg"; bannerText[0]="Fiction"; bannerImg[1]="http://www.emailbookclub.com/book/original.jpg"; bannerText[1]="Non-Fiction"; bannerImg[2]="http://www.emailbookclub.com/book/teen.jpg"; bannerText[2]="Teen"; bannerImg[3]="http://www.emailbookclub.com/book/business.jpg"; bannerText[3]="Business"; bannerImg[4]="http://www.emailbookclub.com/book/romance.jpg"; bannerText[4]="Romance"; bannerImg[5]="http://www.emailbookclub.com/book/goodnews.jpg"; bannerText[5]="Good News"; bannerImg[6]="http://www.emailbookclub.com/book/sf.jpg"; bannerText[6]="Sci-Fi"; bannerImg[7]="http://www.emailbookclub.com/book/mystery.jpg"; bannerText[7]="Mystery"; bannerImg[8]="http://www.emailbookclub.com/book/thriller.jpg"; bannerText[8]="Thriller"; bannerImg[9]="http://www.emailbookclub.com/book/audio.jpg";bannerText[9]="Audio"; bannerImg[10]="http://www.emailbookclub.com/book/prepub.jpg"; bannerText[10]="PrePub"; var newBanner = 0; var timesBanner = 0; var totalBan = bannerImg.length; function cycleBan() { timesBanner++; if (timesBanner != 1) { newBanner++; if (newBanner == totalBan) { newBanner = 0; } document.getElementById("bctitle").innerHTML = bannerText[newBanner]; document.getElementById("bcjackets").src=bannerImg[newBanner]; } // set the time below for length of image display // i.e., "4*1000" is 4 seconds setTimeout("cycleBan()", 2000); if (timesBanner == 1) {setTimeout("cycleBan()", 2003);} } function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); } } } addLoadEvent(cycleBan);