/*----------------------------------------------------
||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.                                       ||
-----------------------------------------------------*/

var numAds = 5;

function makeAd() {
	this.width = ''
	this.height = ''
	this.src = ''
	this.href = ''
	this.mouseover = ''
}

var ads = new Array()
for(var i = 1; i <= numAds; i++) { ads[i] = new makeAd() }

i = 1;

ads[i].width = "125"
ads[i].height = "125"
ads[i].src = "http://media.redgaloshes.com/creative/332/332.jpg"
ads[i].href = "http://tracking.bridaluxe.com/15/2042/2261/c/332/"
ads[i].mouseover = "20% Bonus Discount on Diamond Rings"
i++

ads[i].width = "125"
ads[i].height = "125"
ads[i].src = "http://media.redgaloshes.com/creative/838/838.jpg"
ads[i].href = "http://tracking.bridaluxe.com/15/1091/2261/c/838/"
ads[i].mouseover = "Wedding Ballet Flats"
i++

ads[i].width = "125"
ads[i].height = "125"
ads[i].src = "http://media.redgaloshes.com/creative/624/624.jpg"
ads[i].href = "http://tracking.bridaluxe.com/15/2042/2261/c/624/"
ads[i].mouseover = "Save 20% Plus Free Shipping on Fine Jewelry and Rings"
i++

ads[i].width = "125"
ads[i].height = "125"
ads[i].src = "http://media.redgaloshes.com/creative/780/780.jpg"
ads[i].href = "http://tracking.bridaluxe.com/15/2038/2261/c/780/"
ads[i].mouseover = "Tuxedos and Formal Accessories 50% off Retail"
i++

ads[i].width = "125"
ads[i].height = "125"
ads[i].src = "http://media.redgaloshes.com/creative/741/741.jpg"
ads[i].href = "http://tracking.bridaluxe.com/15/2042/2261/c/741/"
ads[i].mouseover = "20% off All Wedding and Engagement Rings"
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 += ('\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
}

