<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var hours = 0;
var days = 0;
var total_games = 0;
var schedule = new Array();
var first_game_idx = 0;


// *************** 2009 SCHEDULE **************************
/*
schedule[total_games] = new Object();
schedule[total_games].against = new String('Louisiana-Monroe');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 5, 2009 12:00PM');
schedule[total_games].date = new Date('September 5, 2009 12:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('<b>59</b> - 20');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Wyoming');
schedule[total_games].where = new String('Laramie, Wy.');
schedule[total_games].zip = new String('82071');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 12, 2009 2:30PM');
schedule[total_games].date = new Date('September 12, 2009 14:30');
schedule[total_games].tv = new String('VS');
schedule[total_games].score = new String('<b>41</b> - 10');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Texas Tech');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 19, 2009 7:00PM');
schedule[total_games].date = new Date('September 19, 2009 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('<b>34</b> - 24');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('UTEP');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 26, 2009 2:30PM');
schedule[total_games].date = new Date('September 26, 2009 14:30');
schedule[total_games].tv = new String('FSN');
schedule[total_games].score = new String('<B>64</B> - 7');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Colorado');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 10, 2009 11:00AM');
schedule[total_games].date = new Date('October 10, 2009 11:00');
schedule[total_games].tv = new String('FSN');
schedule[total_games].score = new String('<b>38</b> - 14');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Oklahoma');
schedule[total_games].where = new String('Cotton Bowl');
schedule[total_games].zip = new String('75210');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 17, 2009 11:00AM');
schedule[total_games].date = new Date('October 17, 2009 11:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('<b>16</b> - 13');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Missouri');
schedule[total_games].where = new String('Columbia, Mo.');
schedule[total_games].zip = new String('65201');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 24, 2009 7:00PM');
schedule[total_games].date = new Date('October 24, 2009 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('<b>41</b> - 7');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Oklahoma State');
schedule[total_games].where = new String('Stillwater, Okla.');
schedule[total_games].zip = new String('74074');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 31, 2009 7:00PM');
schedule[total_games].date = new Date('October 31, 2009 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('<b>41</b> - 14');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Central Florida');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 7, 2009 11:00AM');
schedule[total_games].date = new Date('November 7, 2009 11:00');
schedule[total_games].tv = new String('FSN');
schedule[total_games].score = new String('<b>35</b> - 3');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Baylor');
schedule[total_games].where = new String('Waco Texas');
schedule[total_games].zip = new String('76701');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 14, 2009 11:00AM');
schedule[total_games].date = new Date('November 14, 2009 11:00');
schedule[total_games].tv = new String('FSN');
schedule[total_games].score = new String('<b>47</b> - 14');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Kansas');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 21, 2009 7:00PM');
schedule[total_games].date = new Date('November 21, 2009 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('<b>51</b> - 20');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Texas A&M');
schedule[total_games].where = new String('College Station');
schedule[total_games].zip = new String('77840');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 26, 2009 7:00PM');
schedule[total_games].date = new Date('November 26, 2009 19:00');
schedule[total_games].tv = new String('ESPN');
schedule[total_games].score = new String('<b>49</b> - 39');
total_games++;


schedule[total_games] = new Object();
schedule[total_games].against = new String('Nebraska');
schedule[total_games].where = new String('Big XII Championship');
schedule[total_games].zip = new String('76011');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Dec. 5, 2009 7:00PM');
schedule[total_games].date = new Date('December 5, 2009 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('<b>13</b> - 12');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Alabama');
schedule[total_games].where = new String('BCS Championship');
schedule[total_games].zip = new String('90041');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Jan. 7, 2010 7:00PM');
schedule[total_games].date = new Date('January 7, 2010 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('21 - <b>37</b>');
total_games++;
*/

// *************** 2010 SCHEDULE **************************

schedule[total_games] = new Object();
schedule[total_games].against = new String('Rice');
schedule[total_games].where = new String('Houston, TX.');
schedule[total_games].zip = new String('77005');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 4, 2010 2:30PM');
schedule[total_games].date = new Date('September 4, 2010 14:30');
schedule[total_games].tv = new String('ESPN');
schedule[total_games].score = new String('<b>34</b> - 17');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Wyoming');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 11, 2010 6:00PM');
schedule[total_games].date = new Date('September 11, 2010 18:00');
schedule[total_games].tv = new String('FSN');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Texas Tech');
schedule[total_games].where = new String('Lubbock');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 18, 2010 7:00PM');
schedule[total_games].date = new Date('September 18, 2010 19:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('UCLA');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Sep. 25, 2010 2:30PM');
schedule[total_games].date = new Date('September 25, 2010 14:30');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Oklahoma');
schedule[total_games].where = new String('Cotton Bowl');
schedule[total_games].zip = new String('75210');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 2, 2010 2:00PM');
schedule[total_games].date = new Date('October 2, 2010 14:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Nebraska');
schedule[total_games].where = new String('Lincoln');
schedule[total_games].zip = new String('75210');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 16, 2010 2:00PM');
schedule[total_games].date = new Date('October 16, 2010 14:00');
schedule[total_games].tv = new String('ABC');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Iowa State');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 23, 2010 2:00PM');
schedule[total_games].date = new Date('October 23, 2010 14:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Baylor');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Oct. 30, 2010 2:00PM');
schedule[total_games].date = new Date('October 30, 2010 14:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Kansas State');
schedule[total_games].where = new String('Manhattan');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 6, 2010 2:00PM');
schedule[total_games].date = new Date('November 6, 2010 14:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Oklahoma State');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 13, 2010 2:00PM');
schedule[total_games].date = new Date('November 13, 2010 14:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Florida Atlantic');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 20, 2010 2:00PM');
schedule[total_games].date = new Date('November 20, 2010 14:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('');
total_games++;

schedule[total_games] = new Object();
schedule[total_games].against = new String('Texas A&M');
schedule[total_games].where = new String('Royal Memorial Stadium');
schedule[total_games].zip = new String('78705');
schedule[total_games].weather_script = new String('<'+'script src="http://voap.weather.com/weather/oap/'+schedule[total_games].zip+'?template=EVNTH&par=1003155384&unit=0&key=c8db2293e7228359f83e1e2e278e7ff9"></'+'script>');
schedule[total_games].time = new String('Nov. 25, 2010 2:00PM');
schedule[total_games].date = new Date('November 25, 2010 14:00');
schedule[total_games].tv = new String('TBA');
schedule[total_games].score = new String('');
total_games++;

var wins = 0, losses = 0;	
var lastTXScore = 0;
var lastOPScore = 0;
var lastOP = '';
var lastGameLocation = '';
function processScore(score)
{
	var retObj = new Object();
	var regex = /[0-9]{1,2}/g;

	var arry = score.match(regex);

	if(arry && arry.length == 2)
	{	
		lastTXScore = parseInt(arry[0]);
		lastOPScore = parseInt(arry[1]);
	}
	return arry;
}

function calculateWins()
{
	var	current = 0;
	var	now = new Date();
	while(current<total_games && now>schedule[current].date)
	{
		var game_scores = processScore(schedule[current].score);
		if(!game_scores)
		{
			break;
		}
		if(current>=first_game_idx) {
			if(lastTXScore > lastOPScore)
				wins++;
			else
				losses++;
		}	
		lastOP = schedule[current].against;
		lastGameLocation = schedule[current].where;
		current++;
	}
}

calculateWins();

function getTime() 
{
	var	current = 0;
	var now = new Date();
	
	while(current<total_games&&now>schedule[current].date)
		current++;
	document.countdownForm.against.value = 'Against: ' + schedule[current].against;
	document.countdownForm.where.value = 'Where: '+ schedule[current].where;
	document.countdownForm.nextgame_date.value = 'When: ' + schedule[current].time;
	document.countdownForm.tv.value = 'TV: ' + schedule[current].tv;
	gameday = schedule[current].date;
	days = (gameday - now) / 1000 / 60 / 60 / 24;
	daysRound = Math.floor(days);
	hours = (gameday - now) / 1000 / 60 / 60 - (24 * daysRound);
	hoursRound = Math.floor(hours);
	minutes = (gameday - now) / 1000 /60 - (24 * 60 * daysRound) - (60 * hoursRound);
	minutesRound = Math.floor(minutes);
	seconds = (gameday - now) / 1000 - (24 * 60 * 60 * daysRound) - (60 * 60 * hoursRound) - (60 * minutesRound);
	
	secondsRound = Math.round(seconds);
	
	dy = (daysRound == 1)  ? " day " : " days, ";
	document.countdownForm.countdown.value = 'Countdown: ' + ((daysRound > 0) ? daysRound  + dy : "") + ((hoursRound >9) ? "" : "0") + hoursRound + ":" + ((minutesRound >9) ? "" : "0") + minutesRound + ":" + ((secondsRound >9) ? "" : "0") + secondsRound;
	days = daysRound;
	newtime = window.setTimeout("getTime();", 1000);
}
//  End -->
</script>
