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

||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(myCode)

// -->

</script>

</div>

<!-- End Banner Ad-->



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



//-3) time between switching the ad, in milliseconds -\\

var refreshTime = 60000; //- 20000 ms = 20 seconds -\\



//-4) number of ads to rotate -\\

var numAds = 6;



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;





ads[i].width = "120"    

ads[i].height = "600"                  

ads[i].src = "http://www.adnotifier.com/idevaffiliate/banners/adnotifier-120x600.gif"  			

ads[i].href = "http://www.adnotifier.com/idevaffiliate/pages/194.php?set=1&link=7"           	 

ads[i].mouseover = "receive Craigslist email alerts - Free Demo"       

ads[i].sponsor = "Craigslist Notifier"                 

i++



ads[i].width = "160"    

ads[i].height = "600"                  

ads[i].src = "http://www.awltovhc.com/image-3658777-10681730"  			

ads[i].href = "http://www.tkqlhce.com/click-3658777-10681730"           	 

ads[i].mouseover = "Rent Unlimited Books from $9.95/month at BookSwim"       

ads[i].sponsor = "BookSwim"                 

i++



ads[i].width = "120"    

ads[i].height = "600"                  

ads[i].src = "http://www.awltovhc.com/image-3658777-10436606"  			

ads[i].href = "http://www.dpbolvw.net/click-3658777-10436606"           	 

ads[i].mouseover = "RealtyTrac 7-day Free Trial"       

ads[i].sponsor = "RealtyTrac"                 

i++



ads[i].width = "120"    

ads[i].height = "600"                  

ads[i].src = "http://www.cashbackforex.com/Portals/0/images/affiliates/Banners/120x600cbf.jpg"  			

ads[i].href = "http://www.cashbackforex.com/?aid=4456"           	 

ads[i].mouseover = "RealtyTrac 7-day Free Trial"       

ads[i].sponsor = "Cash Back Forex"                 

i++



ads[i].width = "160"    

ads[i].height = "600"                  

ads[i].src = "http://vosmd.com/images/6258-201885-160x600.gif?s=102393"  			

ads[i].href = "http://vosmd.com/click/?s=102393&c=201885"           	 

ads[i].mouseover = "4 Disney DVDs for $1"       

ads[i].sponsor = "Walt Disney Co."                 

i++



ads[i].width = "160"    

ads[i].height = "600"                  

ads[i].src = "http://legalzoom.directtrack.com/42/336/17/&dp=935"  			

ads[i].href = "http://legalzoom.directtrack.com/z/17/CD336/&dp=935&l=0&p=0&subid1=&subid2=&subid3=&cm_mmc=affiliate-_-dt-_-CD336-_-na"           	 

ads[i].mouseover = "LegalZoom LLC"       

ads[i].sponsor = "LegalZoom Services"                 

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 += ('<br>Sponsored by: <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

	

}
