// write the sidebar ads to the page

/* display one ad -- defined in banner.js
function displayAd(ad) {}
*/

/* display all the sidebar ads */
function displayAds() {
	var a;
	for (a=0;a<SBads.length;a++){
		displayAd(SBads[a])
	}
}

/* shuffle an array */
function shuffle(list) {
	list.sort(function() {return 0.5 - Math.random()})
}

/* initialize the sidebar ads array */
var SBads = new Array();
var paidAds = new Array();
var freeAds = new Array();
paidAds[0] = { title : "Rainbow Racing", img : "rainbowracing.gif", url : "http://www.rainbowracing.com/" };
paidAds[1] = { title : "Indianapolis Marathon", img : "indianapolis.jpg", url : "http://www.indianapolismarathon.com/" };
paidAds[2] = { title : "Space Coast Marathon", img : "spacecoastmarathon.jpg", url : "http://www.spacecoastmarathon.com/" };
paidAds[3] = { title : "Thunder Road Marathon", img : "thunderroad_sept10.jpg", url : "http://runcharlotte.com/" };

// freeAds[0] = { title : "Napa Valley Marathon", img : "napa.gif", url : "http://www.napavalleymarathon.org/" };

shuffle(paidAds);
SBads = paidAds.concat(freeAds);

displayAds();

