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

BANNERGRP[0] = new bannerObj("http://www.saystudent.com/private-student-loans.html","_top","http://www.nbuy.com/ads-home/college_sitting-girl.jpg","160","600","Money for College");
BANNERGRP[1] = new bannerObj("http://www.anrdoezrs.net/click-1330211-10434175","_top","http://www.nbuy.com/ads-home/id-theft.gif","160","600","ID-Theft Protection");
BANNERGRP[2] = new bannerObj("http://www.res99.com/nexres/air/frontdoor.cgi?&src=10012630","_top","http://www.nbuy.com/ads-home/air_travel.jpg","160","600","Find your lowest airfares.");
BANNERGRP[3] = new bannerObj("http://www.saylending.com/market-values.html","_top","http://www.nbuy.com/ads-home/market_value.jpg","160","600","What is your home worth?");
BANNERGRP[4] = new bannerObj("http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=928797-0000&PA=956523","_top","http://www.nbuy.com/ads-home/repossessed_cars.jpg","160","600","Get great car values through an auction.");
BANNERGRP[5] = new bannerObj("http://www.nbuy.com/RX/index.html","_top","http://www.nbuy.com/ads-home/health_meds.jpg","160","600","Pharmacy discounts and other meds.");
BANNERGRP[6] = new bannerObj("http://www.saylearning.com/arts-humanities.html","_top","http://www.nbuy.com/ads-home/eart.jpg","160","600","Online Degrees in Art");
BANNERGRP[7] = new bannerObj("http://www.nbuy.com/student/housing.php","_top","http://www.nbuy.com/ads-home/nbuy-student-housing.jpg","160","600","Student Housing");
BANNERGRP[8] = new bannerObj("http://www.nBuy.com/environment/download_book.html","_top","http://www.nbuy.com/ads-home/success_book.jpg","150","389","Success in Life begins with a goal");
BANNERGRP[9] = new bannerObj("http://www.saylearning.com/computers-it.html","_top","http://www.nbuy.com/ads-home/eIT.jpg","160","600","Online Degrees in IT");
BANNERGRP[10] = new bannerObj("http://www.nbuy.com/student/transportation.php","_top","http://www.nbuy.com/ads-home/nbuy-student-trans.jpg","160","600","College Transportation");
BANNERGRP[11] = new bannerObj("http://www.SayEducate.com","_top","http://www.nbuy.com/ads-home/money_manage.jpg","160","600","Money Management Guides");
BANNERGRP[12] = new bannerObj("http://www.nbuy.com/student/techgadgets.php","_top","http://www.nbuy.com/ads-home/nbuy-student-tech.jpg","160","600","Tech Gadgets for College");
BANNERGRP[13] = new bannerObj("http://www.saylearning.com/business-degrees.html","_top","http://www.nbuy.com/ads-home/ebusiness.jpg","160","600","Online Degrees in Business");
BANNERGRP[14] = new bannerObj("http://www.saystudent.com/private-student-loans.html","_top","http://www.nbuy.com/ads-home/college_child-phone.jpg","160","600","Money for College Fast");
BANNERGRP[15] = new bannerObj("http://res99.lmdeals.com/?SRC=10012630&SRC_AID=","_top","http://www.nbuy.com/ads-home/lastminute_travel.jpg","160","600","Last minute travel deals - find your spot");
BANNERGRP[16] = new bannerObj("http://www.saylearning.com/science-engineer.html","_top","http://www.nbuy.com/ads-home/escience.jpg","160","600","Online Science Degrees");
BANNERGRP[17] = new bannerObj("http://www.saylearning.com","_top","http://www.nbuy.com/ads-home/offtocollege_online.jpg","160","600","Online Learning");
BANNERGRP[18] = new bannerObj("http://www.nbuy.com/party/story_download.html","_top","http://www.nbuy.com/ads-home/ghost_story.gif","150","356","FREE Ghost Story");
BANNERGRP[19] = new bannerObj("http://www.saylearning.com/social-science.html","_top","http://www.nbuy.com/ads-home/esocial.jpg","160","600","Online Social Science Degrees");
BANNERGRP[20] = new bannerObj("http://cruises.res99.com/default.asp?cid=10012630","_top","http://www.nbuy.com/ads-home/cruise.jpg","160","600","Cruise Specials");
BANNERGRP[21] = new bannerObj("http://www.nbuy.com/student/dorm.php","_top","http://www.nbuy.com/ads-home/nbuy-student-dorm.jpg","160","600","Stuff for the College Dorm");
BANNERGRP[22] = new bannerObj("http://www.nbuy.com/student/schoolsupplies.php","_top","http://www.nbuy.com/ads-home/nbuy-student-supply.jpg","160","600","College Textbooks and Supplies");
BANNERGRP[23] = new bannerObj("http://www.saylearning.com/education-degrees.html","_top","http://www.nbuy.com/ads-home/eeducation.jpg","160","600","Online Degrees in Education");
BANNERGRP[24] = new bannerObj("http://www.nbuy.com/student/personalneeds.php","_top","http://www.nbuy.com/ads-home/nbuy-student-personal.jpg","160","600","Personal Needs for College");
BANNERGRP[25] = new bannerObj("http://www.sayplanning.com/mappingmycareer/","_top","http://www.nbuy.com/ads-home/career-plans.jpg","160","600","Making Career Plans");
BANNERGRP[26] = new bannerObj("http://www.nbuy.com/student/sports.php","_top","http://www.nbuy.com/ads-home/nbuy-student-sports.jpg","160","600","College Sporting Goods");
BANNERGRP[27] = new bannerObj("http://www.nbuy.com/student/entertainment.php","_top","http://www.nbuy.com/ads-home/nbuy-student-entertainment.jpg","160","600","College Sporting Goods");
BANNERGRP[28] = new bannerObj("http://www.SayLending.com/sayfinance/lower-bills.html","_top","http://www.nbuy.com/ads-home/lower_bills.jpg","160","600","Tips to Lower Monthly Bills");
BANNERGRP[29] = new bannerObj("http://www.saylearning.com/mba.html","_top","http://www.nbuy.com/ads-home/emba.jpg","160","600","Online MBA Degrees");
BANNERGRP[30] = new bannerObj("http://www.nbuy.com/student/food.php","_top","http://www.nbuy.com/ads-home/nbuy-student-food.jpg","160","600","Food Shopping");
BANNERGRP[31] = new bannerObj("http://www.nbuy.com/student/whatelse.php","_top","http://www.nbuy.com/ads-home/nbuy-student-whatelse.jpg","160","600","Get Ready for College");
BANNERGRP[32] = new bannerObj("http://www.SayLending.com/repairing-credit.html","_top","http://www.nbuy.com/ads-home/credit_push.jpg","160","600","Credit Repair Services");
BANNERGRP[33] = new bannerObj("http://www.saystudent.com/private-student-loans.html","_top","http://www.nbuy.com/ads-home/magnify_money.jpg","160","600","Money for College");
BANNERGRP[34] = new bannerObj("http://www.saystudentcards.com","_top","http://www.nbuy.com/ads-home/nbuy-student-cards.jpg","160","600","Student Credit Cards");
BANNERGRP[35] = new bannerObj("http://www.nbuy.com/student/schoolsupplies.php","_top","http://www.nbuy.com/ads-home/nbuy-student-books.jpg","160","600","Discount College Textbooks");
BANNERGRP[36] = new bannerObj("http://www.saycampuslife.com","_top","http://www.nbuy.com/ads-home/nbuy-student-blog.jpg","160","600","Campus BLOG");
BANNERGRP[37] = new bannerObj("http://www.saylearning.com/masters.html","_top","http://www.nbuy.com/ads-home/emasters.jpg","160","600","Online Master and Phd Degrees");
BANNERGRP[38] = new bannerObj("http://www.saylearning.com/health-nursing.html","_top","http://www.nbuy.com/ads-home/skeleton.jpg","160","600","Online Healthcare Degrees");
BANNERGRP[39] = new bannerObj("http://www.SayEducate.com","_top","http://www.nbuy.com/ads-home/mouse.gif","160","600","Life Decision Blog");
BANNERGRP[40] = new bannerObj("http://www.sayeducate.com/category/achieving-success/","_top","http://www.nbuy.com/ads-home/number1.jpg","160","600","Building Success");
BANNERGRP[41] = new bannerObj("http://www.nbuy.com/wiredhome/index.html","_top","http://www.nbuy.com/ads-home/computer.jpg","160","600","Computer and Software");
BANNERGRP[42] = new bannerObj("http://www.saylearning.com/certificate-programs.html","_top","http://www.nbuy.com/ads-home/ecareer.jpg","160","600","Online Career Certificates");
BANNERGRP[43] = new bannerObj("http://www.saylending.com/sayfinance.html","_top","http://www.nbuy.com/ads-home/finance.jpg","160","600","Financial Tips");
BANNERGRP[44] = new bannerObj("http://www.sayfinancialaid.com","_top","http://www.nbuy.com/ads-home/nbuy-student-fafsa.jpg","160","600","Understanding the FAFSA form");
BANNERGRP[45] = new bannerObj("http://www.webreader.com/download/college-moving.pdf","_top","http://www.nbuy.com/ads-home/nbuy-student-packing.jpg","160","600","Understanding the FAFSA form");
BANNERGRP[46] = new bannerObj("http://www.saycollegemove.com","_top","http://www.nbuy.com/ads-home/nbuy-student-move.jpg","160","600","College Moving Center");
BANNERGRP[47] = new bannerObj("http://www.nbuy.com/student/","_top","http://www.nbuy.com/ads-home/nbuy-student-shop.jpg","160","600","Student Shopping Center");
BANNERGRP[48] = new bannerObj("http://www.nbuy.com/student/transportation.php","_top","http://www.nbuy.com/ads-home/nbuy-student-wheels.jpg","160","600","College Auto Center");
BANNERGRP[49] = new bannerObj("http://www.saystudent.com/home-equity-banker/","_top","http://www.nbuy.com/ads-home/nbuy-student-bankequity.jpg","160","600","Bank Equity Program");

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