
/* =================================================== *
 * 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(9); // adjust for however many banners you have


BANNERGRP[0] = new bannerObj("http://www.saycampuslife.com/support-files/index-scholarships.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-scholarship-available.gif","500","85","Search Scholarships");
BANNERGRP[1] = new bannerObj("http://www.saycampuslife.com/sayevents/index-travel-guide.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-travel.gif","500","85","Travel Guides");
BANNERGRP[2] = new bannerObj("http://www.saycampuslife.com/sayevents/index-discount-shopping.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-shopping.gif","500","85","Student Shopping");
BANNERGRP[3] = new bannerObj("http://www.saycampuslife.com/lending/index-lending-student.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-college-aid.gif","500","85","College Aid");
BANNERGRP[4] = new bannerObj("http://www.saycampuslife.com/lending/index-lending-auto.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-auto.gif","500","85","Search Autos");
BANNERGRP[5] = new bannerObj("http://www.saycampuslife.com/lending/index-lending-mortgage.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-lending.gif","500","85","Smart Aid");
BANNERGRP[6] = new bannerObj("http://www.saycampuslife.com/lending/index-lending-refi.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-lending-refi.gif","500","85","Smart Refi Aid");
BANNERGRP[7] = new bannerObj("http://www.saycampuslife.com/lending/index-lending-equity.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-lending-equity.gif","500","85","Smart Equity Aid");
BANNERGRP[8] = new bannerObj("http://www.saycampuslife.com/lending/index-lending-debt.php","_top","http://www.sayplanning.com/ads-saycampuslife/images/ad-lending-debt.gif","500","85","Smart Debt Aid");





// 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>');
	}
