function adArray() {
 for (i=0; i*2<adArray.arguments.length; i++) {
  this[i] = new Object();
  this[i].src = adArray.arguments[i*2];
  this[i].href = adArray.arguments[i*2+1];
 }
 this.length = i;
}

function getAdNum() {
 dat = new Date();
 dat = (dat.getTime()+"").charAt(8);
 if (dat.length == 1)
  ad_num = dat%ads.length;
 else
  ad_num = 0;
 return ad_num;
}

//------ Begin Ad/Image Information -----------------------------------------------------

// This array below holds the information for the ads.
// Change the elements as needed. If you are going to add more ads, notice that each line
// ends with a comma EXCEPT for the last one.

var ads = new adArray(
"ad_banners/actionwebbanner.jpg","http://gamuttheatre.com/",
"ad_banners/BigLickBluesFestival.jpg","http://www.biglickblues.org/",
"ad_banners/OperaRoanoke.jpg","http://www.operaroanoke.org",
"ad_banners/PiedmontArtsOnlineAd.jpg","http://www.piedmontarts.org/",
"ad_banners/RoanokeTimes.jpg","http://www.roanoke.com",
"ad_banners/JAX.jpg","http://www.jeffcenter.org",
"ad_banners/Allstate.jpg","http://www.Allstate.com",
"ad_banners/CVB.jpg","http://www.visitroanokeva.com/",
"ad_banners/SVB.jpg","http://www.svballet.org/");

//------ End Ad/Image Information -------------------------------------------------------

var ad_num = getAdNum(); 

document.write('<center><table cellpadding=0 cellspacing=1 border=0><tr><td><a href='+ads[ad_num].href+'><img src='+ads[ad_num].src+' '
+'width=750 height=150 border=0 name=js_ad></a><\/td><\/tr><\/table><\/center>');
link_num = document.links.length-1;

function rotateSponsor() {
 if (document.images) {
  //ad_num = (ad_num+1)%ads.length;
  ad_num = Math.floor(Math.random()*ads.length);
  document.js_ad.src = ads[ad_num].src;
  document.links[link_num].href = ads[ad_num].href;
  
//To change the time between rotations, change this number...1000 = 1 second  
  setTimeout("rotateSponsor()",8000);
 }
}

//If you change the rotation time, change it here too to match
setTimeout("rotateSponsor()",8000);