//---------------------------------------------------------------
//
//	Ad Cycler - Directory 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";
//Images[1] = "Pictures/BannerAds/PooperScooperMan.jpg";
//URL[1] = "http://www.thepooperscooperman.com";

//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/AdPromo3.gif";
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
document.getElementById('leftcycle').src = Images[PickLeft];
document.getElementById('leftlink').href = URL[PickLeft];

PickRight = (Math.round((Math.random()*0))+3);	//*2 +3 when full
document.getElementById('rightcycle').src = Images[PickRight];
document.getElementById('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
document.getElementById('bottomcycle').src = Images[PickBottom];
document.getElementById('bottomlink').href = URL[PickBottom];
*/
}
