/****
* Banner Ad Rotater v3.02
* Anarchos > anarchos3@hotmail.com
* http://anarchos.xs.mw/bannerad.phtml
**/

function Banner(refreshTime, width, height, altText, start, random){
	this.objName = "bannerAd" + (Banner.count++);
	eval(this.objName + "=this");
	if (!refreshTime) this.refreshTime = 100; else this.refreshTime = refreshTime*9000;
	if (!width) this.width = 468; else this.width = width;
	if (!height) this.height = 60; 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 = "_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(){
		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;

function showbanner() {

myAd = new Banner( 7, 468, 60, "Personal Touch", 1, 0 );
// myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/", "_self", "Happy 4th of July!" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/index.html", "_self", "Happy Valentine's" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/index.html", "_self", "2 day sale" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/index.html", "_self", "Happy Mothers Day" );//
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/specialpromo.html", "_self", "1 Day Sale" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/buy5get1free.html", "_self", "Happy Fathers Day" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/specialpromo.html", "_self", "Happy 4th of July" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/specialpromo.html", "_self", "Happy 4th of July" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/summer-clearance.html", "_self", "Summer Sale! Save 25%" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/index.html", "_self", "Happy New Year" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/product212.html", "_self", "Adult Bibs" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/product300.html", "_self", "Non Skid Slipper Socks" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/product997.html", "_self", "Incontinence Bedpads" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/index.html", "_self", "We Support Our Troops" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/Slipper_Socks.html", "_self", "Slipper Socks" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/Wholesale-H_gowns.html", "_self", "By the Dozen" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/Disposable-H_Gowns.html", "_self", "3 Cases" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/Diabetic_Socks.html", "_self", "Diabetic Socks" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/store/gift-choices.html", "_self", "Thanksgiving Sale" );
//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/shop/specialpromo.html", "_self", "Special Promition" );
//put 2 above back

//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/new_valen22.gif", "http://www.nursinghomeapparel.com/store/giftwrap.html", "_self", "Fathers Day" );

		//ar.addEntry("/images/bnr_easter_sale06","");

		//ar.addEntry("/images/easter2006.jpg","");
		//ar.addEntry("/images/bnr_summer_savings.jpg","");
		//ar.addEntry("/images/bnr_mothers_day.jpg","");
		//ar.addEntry("/images/bnr_fathers_day2.gif","");
		//ar.addEntry("/images/bnr_fathers_day.gif","");
		//ar.addEntry("/images/bnr_easter_sale.jpg","");
		//ar.addEntry("/images/bnr_free_ship_75.jpg","");
		//ar.addEntry("/images/bnr_top_alzheimers.jpg","http://www.topsitelists.com/topsites.cgi?ID=311&user=bpsibley&area=bestsites");
		//ar.addEntry("/images/bnr_call_us.gif","");
		//ar.addEntry("/images/bnr_3day_sale.jpg","");
		//ar.addEntry("/images/bnr_presidents_day.jpg","");
		//ar.addEntry("/images/bnr_corporate_apparel.jpg","http://www.nursinghomeapparel.com/store/corporate_apparel.html");
		//ar.addEntry("/images/new-year.jpg","");
		//ar.addEntry("/images/bnr_fathers_day_sale.jpg","");

		//ar.addEntry("/images/thangsgiven2.jpg","");



//document.write('<center><img src="https://www.nursinghomeapparel.com/banners2/labor-day3.jpg" border=0></center><p>');

myAd.output();

}

function showbannerhg() {

myAd = new Banner( 5, 468, 60, "Personal Touch", 1, 0 );


//myAd.Ad( "http://www.nursinghomeapparel.com/banners2/1daysale.gif", "http://www.nursinghomeapparel.com/shop/specialpromo.html", "_self", "1 Day Sale" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/spec-offer-ban.jpg", "http://www.nursinghomeapparel.com/shop/sale-hosp-gowns.html", "_self", "Hospital Gowns" );
myAd.Ad( "http://www.nursinghomeapparel.com/banners2/spec-offer-ban.jpg", "http://www.nursinghomeapparel.com/shop/sale-hosp-gowns.html", "_self", "Hospital Gowns" );



myAd.output();

}
