var sponsorsArray = new Array('accenture.gif', 'esso.gif', 'mcdo.gif', 'cgi.gif', 'myers.gif', 'airCanada.gif', 'urbandale.jpg', 'arnon.gif', 'bayshore.jpg', 'vh.gif', 'tommy.gif', 'amaro.gif' ,'bobfm.gif', 'ctv.gif', 'ottawaCitizen.gif','flyerForce.gif', 'pattison.gif', 'emc.gif','psac.gif');

thisIndex = 0;

function cycleSponsors() {
    if (document.images) {
        if (document.getElementById('sponsorBanner').complete) {
            if (++thisIndex == sponsorsArray.length) {
               thisIndex = 0;

            }
        }
        applyImage(thisIndex);
    }
}

function applyImage(which) {
	document.getElementById('sponsorBanner').src = '_images/logos/'+sponsorsArray[which];
}

function startSponsors() {
	thisIndex = Math.floor(Math.random()* sponsorsArray.length);
	applyImage(thisIndex);
	setInterval("cycleSponsors()", 6000);
}


