//See http://www.jsmadeeasy.com/javascripts/Banners/mybannerads/index.htm  for details.

//Setup Instructions:
//-0) Modify this file then copy and paste it into the <head> of the webpage to use the banner ad script

//-3) time between switching the ad, in milliseconds -\\
var refreshTime = 15000; //- 5000 ms = 5 seconds -\\

//-4) number of ads to rotate -\\
var numAds = 7;

function makeAd() {
	this.width = ''
	this.height = ''
	this.src = ''
	this.href = ''
	this.mouseover = ''
	this.sponsor = ''
}

var ads = new Array()
for(var i = 1; i <= numAds; i++) { ads[i] = new makeAd() }

//- 5) Copy and paste the lines between the banner definition for 
//each banner you want to rotate and be sure to change numAds to 
//the number of banners (look about 15 lines up for numAds)
i = 1;



//begin banner definition
ads[i].width = "300"                           //width of image
ads[i].height = "125"                           //height of image
ads[i].src = "/bannerads/outsideworldLOGOcolor400x125.gif"  			       //image url
ads[i].href = "http://www.theoutsideworld.net"           	       //link url
ads[i].mouseover = "The Outside World"            //text to display when mouse moves over banner
ads[i].sponsor = "The Outside World"                     //text to display for text link under banner
i++
//end banner definition


ads[i].width = "375"    
ads[i].height = "75"                  
ads[i].src = "/bannerads/CaptDickBannerAD.jpg"  			
ads[i].href = "http://www.captdick.net/"           	 
ads[i].mouseover = "Captain Dick Enterprises"       
ads[i].sponsor = "Captain Dick Enterprises"                 
i++


ads[i].width = "468"    
ads[i].height = "60"                  
ads[i].src = "/bannerads/GKF_MOTY.jpg"  			
ads[i].href = "http://www.georgiakayakfishing.com/MOTY"           	 
ads[i].mouseover = "Georgia Kayak Fishing"       
ads[i].sponsor = "Georgia Kayak Fishing"                 
i++

ads[i].width = "387"    
ads[i].height = "199"                  
ads[i].src = "/bannerads/GKF_Trail_Banner_Forum.jpg"  			
ads[i].href = "http://www.KayakFishingTrail.com"           	 
ads[i].mouseover = "Kayak Fishing Trail"       
ads[i].sponsor = "Kayak Fishing Trail"                 
i++

ads[i].width = "468"    
ads[i].height = "60"                  
ads[i].src = "/bannerads/GKFBanner.png"  			
ads[i].href = "http://www.YakAngler.com"           	 
ads[i].mouseover = "YakAngler.com"       
ads[i].sponsor = "YakAngler"                 
i++



ads[i].width = "468"    
ads[i].height = "60"                  
ads[i].src = "/bannerads/coffeebluff-468-X-60.jpg"  			
ads[i].href = "http://www.coffeebluffmarina.net"           	 
ads[i].mouseover = "coffeebluffmarina.net"       
ads[i].sponsor = "Coffee Bluff Marina"                 
i++

ads[i].width = "518"    
ads[i].height = "75"                  
ads[i].src = "/bannerads/SEA_Banner_Ad.bmp"  			
ads[i].href = "http://www.southeastadventure.com"           	 
ads[i].mouseover = "southeastadventure.com"       
ads[i].sponsor = "South East Adventure"                 
i++

var myCode = '';
do {
var n= Math.floor(Math.random() * (numAds + 1) + 1);
} while(n > numAds);
var current_ad = n;
myCode = getCode(n);

function getCode(adNumber){
	var tempCode = ""
	tempCode += ('<a href="'+ ads[adNumber].href +'" \n')
	tempCode += ('onMouseOver="status=\''+ ads[adNumber].mouseover +'\';return true" \n')
	tempCode += ('onMouseOut="status=\'\'"> \n')
	tempCode += ('<img src="' + ads[adNumber].src + '" width=' + ads[adNumber].width)
	tempCode += (' onLoad="setTimeout(\'newAd();\',' + refreshTime + ');"')
	tempCode += ('\n height=' + ads[adNumber].height + ' border=0 >')
	tempCode += ('</a>')
	return tempCode;
	}

function newAd(){
	current_ad++;
	if (current_ad > numAds)
		current_ad = 1;
	if (document.all){
	   write(getCode(current_ad));
	   }
}

function write(text){
	if (document.layers) {
		document.bannerAd.document.write(text)
		document.bannerAd.document.close();
		}
	else
		if (document.all)
			document.getElementById("bannerAd").innerHTML = text
	
}