var refreshTime = 15000; //- 5000 ms = 5 seconds -\\

//-4) number of ads to rotate -\\
var numAds = 14;

function makeAd() {
	this.width = ''
	this.height = ''
	this.src = ''
	this.href = ''
	this.mouseover = ''
	this.sponsor = ''
	this.target = ''
}

var ads = new Array()
for(var i = 1; i <= numAds; i++) { ads[i] = new makeAd() }

i = 1;

ads[i].width = "650"                           //width of image
ads[i].height = "80"                           //height of image
ads[i].src = "ads/skype650_80.jpg"  	       //image url
ads[i].href = "http://www.jdoqocy.com/click-1738176-10386658"           //link url
ads[i].mouseover = "Skype VOIP"                //text to display when mouse moves over banner
ads[i].sponsor = ""                            //text to display for text link under banner
ads[i].target = "_blank"
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/argentinemarket_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/Food_and_Beverages_from_Argentina.html"           	 
ads[i].mouseover = "Argentine Products"       
ads[i].sponsor = ""
ads[i].target = "_blank"                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/classifieds.jpg"  			
ads[i].href = "/classifieds.asp"           	 
ads[i].mouseover = "Classified Adverts"       
ads[i].sponsor = ""
ads[i].target = ""                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/ONA_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/For_the_player.html"           	 
ads[i].mouseover = "ONA Polo Gloves"       
ads[i].sponsor = ""
ads[i].target = "_blank"                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/polistas650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/Polistas_Polo_Clothing.html"           	 
ads[i].mouseover = "Click HERE for Polistas Collection"       
ads[i].sponsor = ""
ads[i].target = "_blank"                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/MH_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/copy_of_Polo_Accessories_gifts.html"           	 
ads[i].mouseover = "Polo jewellery gifts & accessories"       
ads[i].sponsor = ""
ads[i].target = "_blank"                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/polodvds_videos_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/Tickets_and_Publications.html"           	 
ads[i].mouseover = "Polo DVDs, etc"       
ads[i].sponsor = ""
ads[i].target = "_blank"                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/proshop_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/index.html"           	 
ads[i].mouseover = "7minutes.co.uk Polo Shop"       
ads[i].sponsor = ""
ads[i].target = "_blank"                 
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/villamil650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/For_the_player.html"           	 
ads[i].mouseover = "Villamil Premium Polo Equipment"       
ads[i].sponsor = ""
ads[i].target = "_blank"                
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/Casablanca_Polo_02.gif"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/For_the_player.html"           	 
ads[i].mouseover = "Casablanca Polo Helmets"       
ads[i].sponsor = ""
ads[i].target = "_blank"                
i++

ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/crew_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/Polistas_Polo_Clothing___2006_Range.html"           	 
ads[i].mouseover = "Official England Clothing"       
ads[i].sponsor = ""
ads[i].target = "_blank"                
i++


ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/smiths_lawn_650_80.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/Tickets_and_Publications.html"           	 
ads[i].mouseover = "Smiths Lawn"       
ads[i].sponsor = ""
ads[i].target = "_blank"                
i++


ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/labocha650_80.jpg"  			
ads[i].href = "http://www.labocha.com"           	 
ads[i].mouseover = "La Bocha"       
ads[i].sponsor = ""
ads[i].target = "_blank"                
i++


ads[i].width = "650"    
ads[i].height = "80"                  
ads[i].src = "ads/banner_2.jpg"  			
ads[i].href = "http://7minutes.waterloossl.com/acatalog/Lolo_Equestrian_Clothing.html"           	 
ads[i].mouseover = "LoLo Collection"       
ads[i].sponsor = ""
ads[i].target = "_blank"                
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 + '" target="' + ads[adNumber].target + '" \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.all.bannerAd.innerHTML = text
	
}
