// D.O.A - http://doa.angelosthefallen.com
// A modified version of
/****
* Banner Ad Rotater v3.02
* Anarchos > anarchos3@hotmail.com
* http://anarchos.xs.mw/bannerad.phtml
**/

function goto_URL(object) {
    open(object.options[object.selectedIndex].value)
};

function Banner(refreshTime, width, height, altText, start, random){
	this.objName = "bannerAd" + (Banner.count++);
	eval(this.objName + "=this");
	if (!refreshTime) this.refreshTime = 15000; else this.refreshTime = refreshTime*1000;
	if (!width) this.width = 200; else this.width = width;
	if (!height) this.height = 40; else this.height = height;
	if (random == null) this.random = 1; else this.random = random;
	this.altText = altText;
	this.ads = [];
	if (start) this.currentAd = start-1; else start = null;
	this.mySize = 0;

	this.Ad = function(src, href, target, mouseover) {
		var tempImage = new Image();
		tempImage.src = src;
		this.ads[this.mySize] = new Object();
		var ad = this.ads[this.mySize];
		ad.src = src;
		if (typeof(target) == "undefined" || target == null) ad.target = "_blank"; else ad.target = target;
		ad.href = href;
		ad.mouseover = mouseover;
		this.mySize++;
	}

	this.link = function(){
		var	ad = this.ads[this.currentAd];
		if (ad.target == "_self"){
			location.href = ad.href;
		}
		else if (ad.target == "_blank" || ad.target == "_blank"){
			open(ad.href,this.objName + "Win");
		}
		else top.frames[ad.target].location.href = ad.href;
	}

	this.showStatus = function(){
		var ad = this.ads[this.currentAd];
		if (ad.mouseover) status = ad.mouseover;
		else status = ad.href;
	}

	this.randomAd = function(){
		var n;
		do { n = Math.floor(Math.random() * (this.mySize)); } 
		while(n == this.currentAd);
		this.currentAd = n;
	}

	this.output = function(){
		var tempCode = "";
		if (this.mySize > 1){
			if (this.currentAd == null) this.randomAd();
			if (this.currentAd >= this.mySize) this.currentAd = this.mySize - 1;
			tempCode = '<a href="javascript:'+this.objName+'.link();"';
			tempCode += ' onMouseOver="' + this.objName + '.showStatus(); return true"';
			tempCode += ' onMouseOut="status=\'\';return true">';
			tempCode += '<img src="' + this.ads[this.currentAd].src + '" width="' + this.width;
			tempCode += '" name="' + this.objName + 'Img" height="' + this.height + '" ';
			if (this.altText) tempCode += 'alt="'+this.altText + '" ';
			tempCode += 'border="0" /></a>';
			document.write(tempCode);
			this.nextAd();
		} else document.write("Error: two banners must be defined for the script to work.");
	}

	this.newAd = function(){
		if (!this.random){	
			this.currentAd++;
			if (this.currentAd >= this.mySize)
			   this.currentAd = 0;
		}
		else {
			this.randomAd();
		}
		this.nextAd();
	}

	this.nextAd = function(){
		document.images[this.objName+ 'Img'].src = this.ads[this.currentAd].src;
		setTimeout(this.objName+'.newAd()',this.refreshTime)
	}
}
Banner.count = 0;
document.writeln('<table width="202" border="0" cellpadding="1" cellspacing="0" bgcolor="#000000">');
document.writeln('<tr align="center"><td bgcolor="#000000">');

myAd = new Banner(15,200,40,"",0,0);
// BulletProof
myAd.Ad("http://www.angelosthefallen.com/doa/bulletproofban.jpg","http://kitsune.rydia.net/comicsbulletproof.html","_blank","BulletProof");
// Angelos:TF
myAd.Ad("http://www.angelosthefallen.com/doa/bn_angelos1.jpg","http://www.angelosthefallen.com","_blank","Angelos:TF");
// Fey Winds
myAd.Ad("http://www.angelosthefallen.com/doa/feywindsban.jpg","http://kitsune.rydia.net/comicsfeywinds.html","_blank","Fey Winds");
// Psyche
myAd.Ad("http://www.angelosthefallen.com/doa/psychebanner.jpg","http://www.genkigirl.com","_blank","Psyche");
// Starbooze
myAd.Ad("http://www.angelosthefallen.com/doa/banbooze.jpg","http://starbooze.jinguj.net/","_blank","Starbooze");
// Tenshi
myAd.Ad("http://www.angelosthefallen.com/doa/tenshiban.gif","http://tenshi.perfect-works.com","_blank","Tenshi");
// Technopolis
myAd.Ad("http://www.angelosthefallen.com/doa/technoban.jpg","http://psychobob.xepher.net/technopolis","_blank","Technopolis");



myAd.output();

document.writeln('<\/td><\/tr><td bgcolor="#000000"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000"><tr><FORM><td>');
document.writeln('<SELECT NAME="selectName" onChange="goto_URL(this.form.selectName)">');
// DOA Comics
document.write('<OPTION VALUE="http://www.angelosthefallen.com/doa">DOA Comics<\/OPTION>');
// Angelos
document.write('<OPTION VALUE="http://www.angelosthefallen.com">Angelos:The Fallen<\/OPTION>');
// Bulletproof
document.write('<OPTION VALUE="http://kitsune.rydia.net/comicsbulletproof.html">BulletProof<\/OPTION>');
// Fey Winds
document.write('<OPTION VALUE="http://kitsune.rydia.net/comicsfeywinds.html">Fey Winds<\/OPTION>');
// Psyche          
document.write('<OPTION VALUE="http://www.genkigirl.com">Psyche<\/OPTION>');
// Starbooze
document.write('<OPTION VALUE="http://starbooze.jinguj.net/">StarBooze<\/OPTION>');
// Tenshi
document.write('<OPTION VALUE="http://tenshi.perfect-works.com">Tenshi<\/OPTION>');
// Technopolis
document.write('<OPTION VALUE="http://psychobob.xepher.net/technopolis">Technopolis<\/OPTION>');



document.writeln('<\/SELECT>');
document.writeln('<\/td><\/FORM><td align="right">');
document.writeln('<a href="http://www.angelosthefallen.com/doa"><img src="http://www.angelosthefallen.com/doa/logo.jpg" alt="DOA Comics" width="21" height="21" border="0"></a>&nbsp;<\/td>'); 
document.writeln('<\/tr><\/table><\/td><\/tr><\/table>');