
var i = 1;
banner1= new Image();
banner1.src = "ads/sci.jpg";

banner2 = new Image();
banner2.src = "ads/Pioneer.jpg"; //you may add as many as needed

banner3 = new Image();
banner3.src = "ads/tristate_hunting.jpg"; //you may add as many as needed

banner4 = new Image();
banner4.src = "ads/plano_ad.jpg"; //you may add as many as needed

banner5 = new Image();
banner5.src = "ads/Timber_Creek.jpg"; //you may add as many as needed

banner6 = new Image();
banner6.src = "ads/WSPY_Ad.jpg"; //you may add as many as needed


links = new Array
links[1] = "http://www.sciil.us"
links[2] = "http://www.pvsashow.org/"
links[3] = "http://www.tristatehunting.com/"
links[4] = "http://www.planomolding.com/"
links[5] = "http://www.timbercreekinnandsuites.com/"
links[6] = "http://www.wspyfm.com"



description = new Array
description[1] = "SCI"
description[2] = "Pioneer"
description[3] = "Tri State"
description[4] = "Plano"
description[5] = "Timber Creek"
description[6] = "WSPY FM 107.1 - Nelson Multimedia"



function startTime(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
closeTime=hours*3600+mins*60+secs;
closeTime+=7;	// How many seconds until the next banner rotation
Timer();
}


function Timer(){
var time= new Date();
hours= time.getHours();
mins= time.getMinutes();
secs= time.getSeconds();
curTime=hours*3600+mins*60+secs
if (curTime>=closeTime){
if (i < 7){	// The number 2 is the amount of banners that you have above - adjust accordingly
i++;
document.banner.src = eval("banner" + i + ".src");
}
else{
i = 1;
document.banner.src = eval("banner" + i + ".src");
}
startTime();
}
else{
window.setTimeout("Timer()",1000)}
}
function clickLink(){
top.location = links[i]
}
function descript(){
window.status = description[i]
}

