/*----------------------------------------------------
||Banner Ad Rotater v1.01                            ||
||                                                   ||
||Script by:                                         ||
||Anarchos                                           ||
-----------------------------------------------------*/


//Setup Instructions:
//-0) Modify this file then copy and paste it into the <head> of the webpage to use the banner ad script

/*---------------------------
1) add into your <head>:
 
<script language="javascript" src="bannerscript.js"></script>

<style>
<!--
#bannerAd{visibility:visible;}
-->
</style>
 
-----------------------------*/

/*----------------------------
2) add this code into your webpage where you want the banner ad to be displayed:

<!-- Banner Ad code -->
<div id="bannerAd">
<script language="JavaScript">
<!-- 
document.write(myCode)
// -->
</script>
</div>
<!-- End Banner Ad-->

-----------------------------*/

//-3) time between switching the ad, in milliseconds -\\
var refreshTime = 4000; //- 5000 ms = 5 seconds -\\

//-4) number of ads to rotate -\\
var numAds = 16;

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;

//banner01-newest 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/01.jpg"  			
ads[i].href = "videos.shtml"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Muddy driving, Mozambique"                 
i++

//banner02 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/02.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Bushcamping"                 
i++

//banner03 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/03.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Makgadikgadi Pans, Botswana"                 
i++

//banner04 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/04.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Soft sand - Mauritania"                 
i++

//banner05
ads[i].width = "265"                         
ads[i].height = "161"                        
ads[i].src = "news/africa-overland_logo.jpg"  		
ads[i].href = "http://www.africa-overland.net"           	 
ads[i].mouseover = "The Africa Overland Network Website"
ads[i].sponsor = "The Africa Overland Network Website"                
i++


//banner06
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/05.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for salet"       
ads[i].sponsor = "The Beach Run - Mauritania"                 
i++

//banner07
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/06.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Stuck in a Rut, Mali"                 
i++

//banner08
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/07.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Muddy tracks, Cameroon"                 
i++

//banner09
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/08.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Gabon"                 
i++

//banner10
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/10.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Parked up..."                 
i++

//banner11
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/11.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Angolan tracks"                 
i++

//banner12
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/12.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "True Blue"                 
i++

//banner13
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/13.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Angolan tracks"                 
i++

//banner14 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/14.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Makgadikgadi Pans"                  
i++

//banner15 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/09.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Somewhere in Africa"                  
i++

//banner16 
ads[i].width = "320"    
ads[i].height = "240"                  
ads[i].src = "news/01-december-05/15.jpg"  			
ads[i].href = "diary.htm"           	 
ads[i].mouseover = "Maggie, the Landy, is for sale"       
ads[i].sponsor = "Full camping, Uganda"                  
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 += ('<font color="#FFFFFF" face="Verdana" size="2">')
	tempCode += ('<a class="nav_bar" 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=2 >')
	tempCode += ('<br><b>' + ads[adNumber].sponsor + '</b>') //delete this line if you don't want any text to be displayed under your banner
	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.all.bannerAd.innerHTML = text
	
}
