// Cognatio - http://cognatio.theproject.us/
// 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 = 50000; 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);
// Wielders of Light
myAd.Ad("http://cognatio.theproject.us/banners/banner_robert.jpg","http://wieldersoflight.66ghz.com/","_blank","Wielders of Light");
// The Sparrow Cafe
myAd.Ad("http://cognatio.theproject.us/banners/banner_ali.jpg","http://thesparrowcafe.christianmanga.com/","_blank","The Sparrow Cafe");
// Heaven Bound
myAd.Ad("http://cognatio.theproject.us/banners/banner_cal.gif","http://heavenbound.christianmanga.com/","_blank","Heaven Bound");
// The Mages
myAd.Ad("http://cognatio.theproject.us/banners/banner_zhen.jpg","http://themages.theproject.us","_blank","The Mages");
// Legends: Perceptions
myAd.Ad("http://cognatio.theproject.us/banners/banner_rii.png","http://www.perceptions.irisfaerie.com","_blank","Legend: Perceptions");
// Stick Monkey Chronicles
myAd.Ad("http://cognatio.theproject.us/banners/banner_smc.jpg","http://stickmonkey.theproject.us","_blank","Stick Monkey Chronicles");
// Redemption
myAd.Ad("http://cognatio.theproject.us/banners/banner_redempt.jpg","http://www.drunkduck.com/Redemption/","_blank","Redemption");
// Game Plan
myAd.Ad("http://cognatio.theproject.us/banners/banner_gameplan.gif","http://gameplan.christianmanga.com","_blank","Game Plan");
// Camera Obscura
myAd.Ad("http://cognatio.theproject.us/banners/banner_cam.png","http://www.camera.mechalobster.com","_blank","Camera Obscura");
// Kardia
myAd.Ad("http://cognatio.theproject.us/banners/banner_kardia.jpg","http://kardia.theproject.us/","_blank","Kardia");
// A Cruce Salus
myAd.Ad("http://cognatio.theproject.us/banners/banner_sara.gif","http://www.battlecrycomics.com/","_blank","A Cruce Salus");
// Urban Renewal
myAd.Ad("http://cognatio.theproject.us/banners/banner_steph.jpg","http://www.geocities.com/kewlgirl1717/","_blank","Urban Renewal");
// Paris
myAd.Ad("http://cognatio.theproject.us/banners/banner_paris.gif","http://www.freespaces.com/lunareda/","_blank","Paris");
// Advocate
myAd.Ad("http://cognatio.theproject.us/banners/banner_foxie.gif","http://advocate.christianmanga.com/","_blank","Advocate");
// Anime Angels Mangazine
myAd.Ad("http://cognatio.theproject.us/banners/banner_aa.gif","http://www.animeangels.net/","_blank","Anime Angels Mangazine");
// Soyokaze
myAd.Ad("http://cognatio.theproject.us/banners/banner_soyokaze.jpg","http://drunkduck.com/Soyokaze/index.php?p=21581","_blank","Soyokaze");
// Send Me An Angel
myAd.Ad("http://cognatio.theproject.us/banners/banner_christy.jpg","http://www.christyscomics.com/Comics/Angel/angel.html","_blank","Send Me An Angel");
// Warriors of Prayer
myAd.Ad("http://cognatio.theproject.us/banners/banner_susan.jpg","http://wopcomics.angelcities.com/warriors.html","_blank","Warriors of Prayer");
// Kingdom Come
myAd.Ad("http://cognatio.theproject.us/banners/banner_tan.jpg","http://kingdomcome.theproject.us/","_blank","KingdomCome");
// Lightning Prophetess
myAd.Ad("http://cognatio.theproject.us/banners/banner_shan2.jpg","http://www.lpthemanga.com/","_blank","Lightning Prophetess");
// The Way
myAd.Ad("http://cognatio.theproject.us/banners/banner_riot.gif","http://www.riotgearcomics.com/","_blank","The Way");
// Psychoteers
myAd.Ad("http://cognatio.theproject.us/banners/banner_ann.jpg","http://psychoteers.theproject.us","_blank","Psychoteers");


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)">');
// Web Exchange Home
document.write('<OPTION VALUE="http://cognatio.theproject.us/">|| > C o g n a t i o < ||<\/OPTION>');
// Wielders of Light
document.write('<OPTION VALUE="http://wieldersoflight.66ghz.com/">Wielders of Light<\/OPTION>');
// The Sparrow Cafe
document.write('<OPTION VALUE="http://thesparrowcafe.christianmanga.com/">The Sparrow Cafe<\/OPTION>');
// Heaven Bound
document.write('<OPTION VALUE="http://heavenbound.christianmanga.com/">Heaven Bound<\/OPTION>');
// The Mages
document.write('<OPTION VALUE="http://themages.theproject.us">The Mages<\/OPTION>');
// Legend: Perceptions
document.write('<OPTION VALUE="http://www.perceptions.irisfaerie.com">Legend: Perceptions<\/OPTION>');
// Stick Monkey Chronicles
document.write('<OPTION VALUE="http://stickmonkey.theproject.us">Stick Monkey Chronicles<\/OPTION>');
// Redemption
document.write('<OPTION VALUE="http://www.drunkduck.com/Redemption/">Redemption<\/OPTION>');
// Game Plan
document.write('<OPTION VALUE="http://gameplan.christianmanga.com">Game Plan<\/OPTION>');
// Camera Obscura
document.write('<OPTION VALUE="http://www.camera.mechalobster.com">Camera Obscura<\/OPTION>');
// Kardia
document.write('<OPTION VALUE="http://kardia.theproject.us/">Kardia<\/OPTION>');
// A Cruce Salus
document.write('<OPTION VALUE="http://www.battlecrycomics.com/">A Cruce Salus<\/OPTION>');
// Urban Renewal
document.write('<OPTION VALUE="http://www.geocities.com/kewlgirl1717/">Urban Renewal<\/OPTION>');
// Paris
document.write('<OPTION VALUE="http://www.freespaces.com/lunareda/">Paris<\/OPTION>');
// Advocate
document.write('<OPTION VALUE="http://advocate.christianmanga.com/">Advocate<\/OPTION>');
// Soyokaze
document.write('<OPTION VALUE="http://drunkduck.com/Soyokaze/index.php?p=21581">Soyokaze<\/OPTION>');
// Send Me An Angel
document.write('<OPTION VALUE="http://www.christyscomics.com/Comics/Angel/angel.html">Send Me An Angel<\/OPTION>');
// Anime Angels Mangazine
document.write('<OPTION VALUE="http://www.animeangels.net/">Anime Angels<\/OPTION>');
// Warriors of Prayer
document.write('<OPTION VALUE="http://wopcomics.angelcities.com/warriors.html">Warriors of Prayer<\/OPTION>');
// KingdomCome
document.write('<OPTION VALUE="http://kingdomcome.theproject.us/">KingdomCome<\/OPTION>');
// Lightning Prophetess
document.write('<OPTION VALUE="http://www.lpthemanga.com/">Lightning Prophetess<\/OPTION>');
// The Way
document.write('<OPTION VALUE="http://www.riotgearcomics.com/">The Way<\/OPTION>');
// Psychoteers
document.write('<OPTION VALUE="http://psychoteers.theproject.us/">Psychoteers<\/OPTION>');


document.writeln('<\/SELECT>');
document.writeln('<\/td><\/FORM><td align="middle">');
document.writeln('<a href="http://cognatio.theproject.us" target="_blank"><img src="http://cognatio.theproject.us/images/iconcog.jpg" alt="Cognatio: Online Christian Manga" width="20" height="20" border="0"></a>&nbsp;<\/td>'); 
document.writeln('<\/tr><\/table><\/td><\/tr><\/table>');
