//---------------------------------------------------------------
//
//	Ad Cycler - About Us Page
//
//---------------------------------------------------------------

var CycleTime = "10";	// ad cycle is every 20 seconds
CycleTime = CycleTime * 1000;

var Index = 0;
var Images = new Array();
var URL = new Array();
var Objects;

//each ad section contains a max of 3 cycling ads
//when maximum is reached, promo ad should be removed
//the two arrays are used for all ad positions. 0-2=Left Top Ads, 3-5=Right Top Ads, 6-8=Left Link Ads, and 9-11=Page Bottom Ads

//Left Links
Images[0] = "Pictures/AdPromo3.gif";
URL[0] = "Advertising.html#OnlineAds";

//Right Links
Images[3] = "Pictures/AdPromo3.gif";
URL[3] = "Advertising.html#OnlineAds";

//Link Links
Images[6] = "Pictures/AdPromo2.jpg";
URL[6] = "Advertising.html#OnlineAds";

//Bottom Links
Images[9] = "Pictures/AdPromo.jpg";
URL[9] = "Advertising.html#OnlineAds";

//----------------------------------------------------
function Cycler() {
Switch();
setInterval("Switch()", CycleTime);
}

function Switch() {	//multiplier indicates number of ads in that ad cycler (0 is one ad)

PickLeft = Math.round((Math.random()*0));		//*2 when full
leftcycle.src = Images[PickLeft];
leftlink.href = URL[PickLeft];

PickRight = (Math.round((Math.random()*0))+3);	//*2 +3 when full
rightcycle.src = Images[PickRight];
rightlink.href = URL[PickRight];

PickLink = (Math.round((Math.random()*0))+6);	//*2 +6 when full
linkcycle.src = Images[PickLink];
linklink.href = URL[PickLink];

PickBottom = (Math.round((Math.random()*0))+9);	//*2 +9 when full
bottomcycle.src = Images[PickBottom];
bottomlink.href = URL[PickBottom];
}
