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

BANNERGRP[0] = new bannerObj("index-adult-student.html","_top","images/adult-student.jpg","232","525","Time for Me to Go Back to School");
BANNERGRP[1] = new bannerObj("index-career-upgrade.html","_top","images/asian-woman-upgrade.jpg","232","525","Need to develop new skills to advance my career.");
BANNERGRP[2] = new bannerObj("manage-money.html","_top","images/credit-card.jpg","232","525","Need money to pay for my computer");
BANNERGRP[3] = new bannerObj("index-online-eschools.html","_top","images/feature-schools.jpg","232","525","Show me schools that offer online programs.");
BANNERGRP[4] = new bannerObj("index-finish-college.html","_top","images/finish-college.jpg","232","525","Time to finish college. What online programs are available?");
BANNERGRP[5] = new bannerObj("index-teaching-student.html","_top","images/girl-teaching.jpg","232","525","I enjoy teaching, but want to do something different.");
BANNERGRP[6] = new bannerObj("index-master-degree.html","_top","images/master-degree.jpg","232","525","I need IT skills to manage this expansive opportunity");
BANNERGRP[7] = new bannerObj("index-mba-degree.html","_top","images/man-mba.jpg","232","525","I need my MBA without disrupting my career.");
BANNERGRP[8] = new bannerObj("index-IT-degree.html","_top","images/it-skills.jpg","232","525","What Master's Degree Programs are Available?");
BANNERGRP[9] = new bannerObj("index-nurse-degree.html","_top","images/nurse-degree.jpg","232","525","The health profession is growing, I need to get my nursing degree.");
BANNERGRP[10] = new bannerObj("index-computer.html","_top","images/pc.jpg","232","525","Tell me more about the grad PLUS loan");
BANNERGRP[11] = new bannerObj("index-phd-degree.html","_top","images/phd-schools.jpg","232","525","I would like to finish my PhD online.");
BANNERGRP[12] = new bannerObj("index-associate-degree.html","_top","images/student-quick.jpg","232","525","Look for Associate Degrees to Get a Good Job Quick");
BANNERGRP[13] = new bannerObj("index-science-degree.html","_top","images/team.jpg","232","525","Need to complete my college degree");
BANNERGRP[14] = new bannerObj("index-grad-prep.html","_top","images/prep.jpg","232","525","Help me prepare for graduate school");
BANNERGRP[15] = new bannerObj("college-money.html","_top","images/money.jpg","232","525","I need money quick to pay tuition");
BANNERGRP[16] = new bannerObj("index-criminal-science.html","_top","images/criminal.jpg","232","525","I need to return to school part-time");
BANNERGRP[17] = new bannerObj("index-digital-degree.html","_top","images/digital.jpg","232","525","My dream is to become a digital game designer");
BANNERGRP[18] = new bannerObj("tools.html","_top","images/tools.jpg","232","525","What tools do you have to help my manage my online experience");
BANNERGRP[19] = new bannerObj("index-fin-aid.html","_top","images/fin-aid.jpg","232","525","Help me understand student financial 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>');
	}
