/* =================================================== *
 * 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(13); // 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("http://www.sayfinancialaid.com/banner-agronomy.html","_top","images/feature-schools.jpg","232","525","What Federal Student Loans are available");
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");



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