
/* =================================================== *
 * TITLE  : NBuy            | banners.js               *
 * AUTHOR : Kevin Scholl    | kscholl@comcast.net      *
 * CREATED: 01 Nov 2006     | UPDATED: 01 Nov 2006     *
 * =================================================== */

/* =================================================== *
// CREATE BANNER OBJECTS AND GROUP
 * =================================================== */

function bannerObj(url,target,loc,width,height,title) {
	this.target  = target; // link target
	this.url     = url;    // link URL
	this.loc     = loc;    // path and filename for image
	this.width   = width;  // width of image
	this.height  = height; // height of image
	this.desc    = title;  // alt and title attribute for image
	}

// =================================================== *
// EDIT START HERE

var BANNERGRP = new Array(14); // adjust for however many banners you have


BANNERGRP[0] = new bannerObj("http://shop.nbuy.com/feature-ads/travel-guide.php","_top","http://shop.nbuy.com/feature-ads/images/banner-ad-travel-guide.gif","728","90","nBuy Advertisement");
BANNERGRP[1] = new bannerObj("http://shop.nbuy.com/feature-ads/travel-cruise.php","_top","http://shop.nbuy.com/feature-ads/images/banner-ad-cruise.gif","728","90","nBuy Advertisement");
BANNERGRP[2] = new bannerObj("http://buy-idshield.at/nBuy?CTY=2&amp;CID=14883","_top","http://b1.perfb.com/o1.php?ID=14883&amp;PURL=buy-idshield.at/nBuy","728","90","ID Theft");
BANNERGRP[3] = new bannerObj("http://buy-idshield.at/nBuy?CTY=2&amp;CID=13275","_top","http://b1.perfb.com/o1.php?ID=13275&amp;PURL=buy-idshield.at/nBuy","728","90","3-in1 Report");
BANNERGRP[4] = new bannerObj("http://www.kqzyfj.com/c0110ox52x4KMQMRTMMKMLORUTRT","_top","http://www.lduhtrp.net/kh98r6Az42OQUQVXQQOQPSVYXVX","728","90","nBuy Advertisement");
BANNERGRP[5] = new bannerObj("http://buy-idshield.at/nBuy?CTY=2&amp;CID=12843","_top","http://b1.perfb.com/o1.php?ID=12843&amp;PURL=buy-idshield.at/nBuy","728","90","nBuy Advertisement");
BANNERGRP[6] = new bannerObj("http://www.res99.com/hotel/deals/10012630/127/nassau_hotels.html","_top","http://images.wctravel.com/wct-images/partners/images-banners/caribbean/ca728x90_scuba.jpg","728","90","nBuy Advertisement");
BANNERGRP[7] = new bannerObj("http://www.res99.com/hotel/deals/10012630/249/orlando_fl_hotels.html","_top","http://images.wctravel.com/wct-images/partners/images-banners/florida/orl728x90_coaster.jpg","728","90","nBuy Advertisement");
BANNERGRP[8] = new bannerObj("http://www.res99.com/hotel/deals/10012630/208/honolulu_hi_hotels.html","_top","http://images.wctravel.com/wct-images/partners/images-banners/hawaii/haw728x90_baby.jpg","728","90","nBuy Advertisement");
BANNERGRP[9] = new bannerObj("http://www.res99.com/hotel/deals/10012630/218/las_vegas_nv_hotels.html","_top","http://images.wctravel.com/wct-images/partners/images-banners/lasvegas/lv728x90_skyline.jpg","728","90","nBuy Advertisement");
BANNERGRP[10] = new bannerObj("http://www.res99.com/hotel/deals/10012630/148/cancun_hotels.html","_top","http://images.wctravel.com/wct-images/partners/images-banners/mexico/mex728x90_handstand.jpg","728","90","nBuy Advertisement");
BANNERGRP[11] = new bannerObj("http://shop.nbuy.com/feature-ads/home-value.php","_top","http://www.electronicappraiser.com/creatives/images/detailed_728.gif","728","90","nBuy Advertisement");
BANNERGRP[12] = new bannerObj("http://www.dpbolvw.net/8f116gv30v2IKOKPRKKIKJNMLROQ","_top","http://www.tqlkg.com/qp80jy1qwuFHLHMOHHFHGKJIOLN","468","60","nBuy Advertisement");
BANNERGRP[13] = new bannerObj("http://shop.nbuy.com/feature-ads/money-advisor.php","_top","http://shop.nbuy.com/feature-ads/images/banner-ad-finance-advisor.gif","728","90","nBuy Advertisement");


// EDIT END HERE
// =================================================== */

/* =================================================== *
// GET RANDOM NUMBER 
 * =================================================== */

function getRandomNum() {
	return (Math.floor(Math.random() * BANNERGRP.length));
  }

/* =================================================== *
// DYNAMICALLY WRITE OUT CONTENTS OF BANNERMAIN 
 * =================================================== */

function displayBanner() {
	var ranNum    = getRandomNum();
	var theBanner = BANNERGRP[ranNum];

	document.write('<a ');
	document.write('href="' + theBanner.url + '" target="' + theBanner.target + '"><img ');
	document.write('src="' + theBanner.loc + '" alt="' + theBanner.desc + '" title="' + theBanner.desc + '" width="' + theBanner.width + '" height="' + theBanner.height + '" border="0">');
	document.write('</a>');
	}
