var b_idx = 0;
var b_tot = 18;
var b = new Array(b_tot);

b[0]  = new bowl(1994, 11, 26, 'Playoffs (Round 1)', '@ Bronco Stadium', 'North Texas', '5-0-1', '7-3-1', 20, 'Boise State', '6-1', '13-2', 24);
b[1]  = new bowl(1994, 11, 26, 'Playoffs (Round 1)', '@ Cowboy Stadium', 'Idaho', '5-2', '9-3', 21, 'McNeese State', '5-1', '9-2', 38);
b[2]  = new bowl(1994, 12, 3, 'Playoffs (Quarters)', '@ Washington-Grizzly Stadium', 'McNeese State', '5-1', '10-2', 28, 'Montana', '5-2', '11-3', 30);
b[3]  = new bowl(1996, 12, 19, 'Las Vegas Bowl', '@ Sam Boyd Stadium', 'Nevada', '4-1', '8-3', 18, 'Ball State', '7-0', '8-3', 15);
b[4]  = new bowl(1997, 12, 29, 'Humanitarian Bowl', '@ Bronco Stadium', 'Utah State', '4-1', '6-5', 19, 'Cincinnati', '2-4', '7-4', 35);
b[5]  = new bowl(1998, 12, 30, 'Humanitarian Bowl', '@ Bronco Stadium', 'Idaho', '4-1', '8-3', 42, 'Southern Mississippi', '5-1', '7-4', 35);
b[6]  = new bowl(1999, 12, 30, 'Humanitarian Bowl', '@ Bronco Stadium', 'Boise State', '5-1', '9-3', 34, 'Louisville', '4-2', '7-4', 31);
b[7]  = new bowl(2000, 12, 28, 'Humanitarian Bowl', '@ Bronco Stadium', 'Boise State', '5-0', '9-2', 38, 'Texas El Paso', '6-1', '8-3', 23);
b[8]  = new bowl(2001, 12, 18, 'New Orleans Bowl', '@ Louisiana Superdome', 'North Texas', '5-1', '5-6', 20, 'Colorado State', '6-2', '6-5', 45);
b[9]  = new bowl(2002, 12, 17, 'New Orleans Bowl', '@ Louisiana Superdome', 'North Texas', '6-0', '7-5', 24, 'Cincinnati', '6-2', '7-6', 19);
b[10]  = new bowl(2003, 12, 16, 'New Orleans Bowl', '@ Louisiana Superdome', 'North Texas', '7-0', '9-3', 17, 'Memphis', '5-3', '8-4', 27);
b[11]  = new bowl(2004, 12, 14, 'New Orleans Bowl', '@ Louisiana Superdome', 'North Texas', '7-1', '7-4', 10, 'Southern Mississippi', '5-3', '5-5', 31);
b[12]  = new bowl(2004, 12, 30, 'Silicon Valley Bowl', '@ Spartan Stadium', 'Troy', '5-2', '7-4', 21, 'Northern Illinois', '7-1', '7-3', 34);
b[13]  = new bowl(2005, 12, 20, 'New Orleans Bowl at Lafayette', '@ Cajun Field', 'Arkansas State', '5-2', '6-5', 19, 'Southern Mississippi', '5-3', '5-5', 31);
b[14]  = new bowl(2006, 12, 22, 'New Orleans Bowl', '@ Louisiana Superdome', 'Troy', '6-1', '7-5', 41, 'Rice', '6-2', '7-5', 17);
b[15]  = new bowl(2006, 12, 26, 'Motor City Bowl', '@ Ford Field', 'Middle Tennessee', '6-1', '7-5', 14, 'Central Michigan', '7-1', '9-4', 31);
b[16]  = new bowl(2007, 12, 21, 'New Orleans Bowl', '@ Louisiana Superdome', 'Florida Atlantic', '6-1', '7-5', 44, 'Memphis', '6-2', '7-5', 27);
b[17]  = new bowl(2008, 12, 21, 'New Orleans Bowl', '@ Louisiana Superdome', 'Troy', '6-1', '8-4', 27, 'Southern Mississippi', '4-4', '6-6', 30);
b[18]  = new bowl(2008, 12, 26, 'Motor City Bowl', '@ Ford Field', 'Florida Atlantic', '4-3', '6-6', 24, 'Central Michigan', '6-2', '8-4', 21);

function bowl (yr, mo, dy, game, venue, team1, conf1, overall1, score1, team2, conf2, overall2, score2) {
	this.yr = yr;
	this.mo = mo;
	this.dy = dy;
	this.game = game;
	this.venue = venue;
	this.team1 = team1;
	this.conf1 = conf1;
	this.overall1 = overall1;
	this.score1 = score1;
	this.team2 = team2;
	this.conf2 = conf2;
	this.overall2 = overall2;
	this.score2 = score2;
}

var prevyr = -9999;

function build_div_bowlgames () {
	for (idx = b_idx; idx <= b_tot; idx++) {
		if (b[idx].yr == prevyr) {
			document.write("<br />\n");
		}
		else {
			if (prevyr != -9999) {
				document.write("</div>\n");
			}
			document.write("<div id=\"bowl" + b[idx].yr + "\">\n");
		}
		wr_bowl_hdr(b[idx].yr, b[idx].mo, b[idx].dy, b[idx].game, b[idx].venue);
		wr_bowl_team (b[idx].yr, b[idx].team1, b[idx].conf1, b[idx].overall1, b[idx].score1);
		wr_bowl_team (b[idx].yr, b[idx].team2, b[idx].conf2, b[idx].overall2, b[idx].score2);
	}
	wr_bowl_ftr();
}

function wr_bowl_hdr (yr, mo, dy, bowl, venue) {
	document.write("	<div style=\"width: 362px; height: 15px; color: #fff; background: #000; text-align: center;\">" + yr + " " + bowl + " " + venue + " (" + mo + "/" + dy + ")</div>\n");
	prevyr = yr;
}

function wr_bowl_team (year, team, conf, overall, score) {
	findvariables (year, team);
	document.write("	<div style=\"width: 362px; height: 30px; line-height: 1.3em; color: #fff;\">\n");
	document.write("		<div style=\"width: 362px; height: 30px; background: " + seccolor + " url(\'images/teams/bkgnds/" + teamcode + "_bg.png\') repeat-x;\">\n");
	document.write("			<span style=\"float: left; width: 80px;\">\n");
	document.write("				<div style=\"width: 80px; height: 30px; background: url(\'images/teams/" + teamcode + ".gif\') no-repeat 0px -18px;\"></div>\n");
	document.write("			</span>\n");
	document.write("			<span style=\"float: left; width: 135px; text-align: left; padding-left: 5px;\">" + team + "<br />" + teamnamefull + "</span>\n");
	document.write("			<span style=\"float: left; width: 137px; text-align: left; padding-left: 5px;\">" + conf + " Conf.<br />" + overall + " Overall</span>\n");
	document.write("		</div>\n");
	document.write("		<div style=\"position: relative; top: -36px; width: 347px; height: 0px; line-height: 1.4em; text-align: right; padding-right: 15px; font-size: 28px; color: #fff; background: transparent;\">" + score + "</div>\n");
	document.write("	</div>\n");
}

function wr_bowl_ftr () {
	document.write("</div>\n");
}

var minBowlYear = b[b_idx].yr;
var maxBowlYear = b[b_tot].yr;
function switchBowl(year) {
	for (var chkYear = minBowlYear; chkYear <= maxBowlYear; chkYear++) {
		if (chkYear != 1995) {
			var el = document.getElementById('bowl' + chkYear);
			if (chkYear == year) {
				el.style.display = '';
			}
			else {
				el.style.display = 'none';
			}
		}
	}
}
