/*----------------------------------------------------
||Banner Ad Rotater v1.01                            ||
||                                                   ||
||Script by:                                         ||
||Anarchos                                           ||
||URL: http://www.xs.mw/anarchos                     ||
||E-mail: anarchos3@hotmail.com                      ||
||ICQ: 12007422                                      ||
||                                                   ||
||E-mail or ICQ me if you have any questions or need ||
||help setting up your banner ad rotator. Check out  ||
||my webpage every once in a while for updates to    ||
||this script.                                       ||
-----------------------------------------------------*/


//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(myCode2)
// -->
</script>
</div>
<!-- End Banner Ad-->

-----------------------------*/

//-3) time between switching the ad, in milliseconds -\\
var refreshTime = 15000; //- 5000 ms = 5 seconds -\\

//-4) number of ads to rotate -\\
var numAds = 9;

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 = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS8.jpg"	       //image url
ads[i].href = "specials/pulloverwindvest.html"           	       //link url
ads[i].mouseover = "Apparel"            //text to display when mouse moves over banner
i++
/*-------------end banner definition-----------*/

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS9.jpg"	       //image url
ads[i].href = "specials/callawaywarbirdhumidor.html"           	       //link url
ads[i].mouseover = "Golf Gifts"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS10.jpg"	       //image url
ads[i].href = "specials/bosshatclipmarkerkit.html"           	       //link url
ads[i].mouseover = "Golf Gifts"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS11.jpg"	       //image url
ads[i].href = "specials/footjoygolfglove.html"           	       //link url
ads[i].mouseover = "Accessories"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS12.jpg"	       //image url
ads[i].href = "specials/deluxeheadcovers.html"           	       //link url
ads[i].mouseover = "Accessories"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS13.jpg"	       //image url
ads[i].href = "specials/execputterset.html"           	       //link url
ads[i].mouseover = "Golf Gifts"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS14.jpg"	       //image url
ads[i].href = "specials/nikevneckwindshirt.html"           	       //link url
ads[i].mouseover = "Apparel"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS15.jpg"	       //image url
ads[i].href = "specials/balls.html"           	       //link url
ads[i].mouseover = "Balls"            //text to display when mouse moves over banner
i++

ads[i].width = "231"                           //width of image
ads[i].height = "195"                           //height of image
ads[i].src = "images/specials/GS16.jpg"	       //image url
ads[i].href = "specials/matchbookteepack.html"           	       //link url
ads[i].mouseover = "Tees"            //text to display when mouse moves over banner
i++



var myCode3 = '';
do {
var n= Math.floor(Math.random() * (numAds + 1) + 1);
} while(n > numAds);
var current_ad = n;
myCode3 = 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.bannerAd3.document.write(text)
		document.bannerAd3.document.close();
		}
	else
		if (document.all)
			document.all.bannerAd3.innerHTML = text
	
}