//
// Banner Ad Rotater v3.02
// Anarchos > anarchos3@hotmail.com
// http://anarchos.xs.mw/bannerad.phtml
//

var running = true;

function Banner(refreshTime, width, height, altText, start, random){
	this.objName = "bannerAd" + (Banner.count++);
	eval(this.objName + "=this");
	if (!refreshTime) this.refreshTime = 5000; else this.refreshTime = refreshTime*1000;
	if (!width) this.width = 460; else this.width = width;
	if (!height) this.height = 68; 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, title, 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 = "_self"; 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 == "_new"){
			open(ad.href,this.objName + "Win");
 	}
		else top.frames[ad.target].location.href = ad.href;
	}

	this.showStatus = function(){
	        this.stopStart();
		var ad = this.ads[this.currentAd];
		if (ad.mouseover) status = ad.mouseover;
		else status = ad.href;
	}
	
	this.stopStart = function() {
 	        (running) ? running = false : running = true;
		if (running) this.nextAd();
		else status = "";
        }

	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 = '<center><a href="javascript:'+this.objName+'.link();"';
			tempCode += ' onMouseOver="' + this.objName + '.showStatus(); return true"';
			tempCode += ' onMouseOut="' + this.objName + '.stopStart(); 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><br><img src="images/design/linkster.jpg" border="0" alt=""></center>';
			document.write(tempCode);
			this.nextAd();
		} else document.write("Error: two banners must be defined for the script to work.");
	}

	this.newAd = function(){
	if (running) {

		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;                      




      <!--
        myAd = new Banner( 5, 88, 31, "Linkster", 0, 1 );
      	myAd.Ad( "images/linkster/chocolatepeach.jpg",     "http://peach.kyuton.net/",	      	      "_blank", "Chocolate Peach Designs + Music" ); 
      	myAd.Ad( "images/linkster/reminiscentdesigns.jpg", "http://reminiscent-designs.net/", 	      "_blank", "Reminiscent Designs" );  
      	myAd.Ad( "images/linkster/synthoxide.jpg",         "http://synthoxide.net/", 		          "_blank", "Synthoxide" );
        myAd.Ad( "images/linkster/godsrainbow.jpg",        "http://rain.pop-is-dead.net/", 	          "_blank", "Gods & rainbow" );
        myAd.Ad( "images/linkster/flyangel.jpg",           "http://flyangel.org/", 	          	      "_blank", "FlyAngel" );	
        myAd.Ad( "images/linkster/scrapboxed.gif",         "http://scrapboxed.yinten.com/",    	      "_blank", "Scrapboxed" );	
        myAd.Ad( "images/linkster/x-tenshi.jpg",           "http://x-tenshi.com/",    	              "_blank", "X-Tenshi" );	
        myAd.Ad( "images/linkster/infinitemoon.jpg",       "http://infinite-moon.net/",    	          "_blank", "Infinite Moon" ); 
        myAd.Ad( "images/linkster/digitallavender.jpg",    "http://digital-lavender.com/",    	      "_blank", "Digital Lavender" );  
        
        myAd.Ad( "images/linkster/ichabod1799.jpg",        "http://ichabod1799.net/",                 "_blank", "Ichabod1799" ); 
        myAd.Ad( "images/linkster/otakutenshi14.gif",      "http://kanako14.freehostia.com/",         "_blank", "Otaku Tenshi 14" ); 
      	myAd.Ad( "images/linkster/hikaruhoshi.jpg",        "http://hikaruhoshi.com/",                 "_blank", "Hikaru Hoshi" );
      	myAd.Ad( "images/linkster/animeheart.gif",         "http://anime-heart.co.nr/",               "_blank", "Anime Heart" );
      	myAd.Ad( "images/linkster/silentkanna.jpg",        "http://sk.tainted-paradise.com/",         "_blank", "Silent Kanna" );  
        myAd.Ad( "images/linkster/emptycanvas.jpg",        "http://emptycanvas.absinthe-minded.org/", "_blank", "Empty Canvas" );    
        myAd.Ad( "images/linkster/serenity.jpg",           "http://serenity.fairycorner.net/",        "_blank", "Serenity" );
        myAd.Ad( "images/linkster/chromeanime.png",        "http://chrome.my-reality.net/", 	      "_blank", "Chrome Anime" );   
        myAd.Ad( "images/linkster/animehikari.jpg",        "http://hikari.neocrisis.com/", 	          "_blank", "Anime Hikari" );	
        myAd.Ad( "images/linkster/fadedchimera.jpg",       "http://faded-chimera.net/", 	          "_blank", "Faded Chimera" );   
      		
        myAd.output();
      // -->