// catchfence banner v1.0
// author: Geoff Roth (geoff@shockboy.com)


// edit these values
// use &#39; for all apostrophes & single-quotes
var news_alert = '';

var news = [
		// MAIN/CUP NEWS BEGIN
		{
		header:		'<B><I>Caught In The CatchFence</font><font face="Verdana, Arial, Helvetica" size="-3" color="#FFFF00">&copy;......&nbsp;</I></font></B>',
		title:		'MAIN/CUP NEWS:',
		link: 		'http://www.catchfence.com/index1.html/#Caught',
		headlines:	[   
                     'NASCAR Sprint Cup Series 2008 Schedule Announced',
                     'Carl Edwards Docked 25 Points, Crew Chief Fined $25,000',
		             'Tony Stewart, Old Spice Team Up to Auction One-of-a-Kind Racing Suit for Charity',
		             'Edwards wins third race of season, fails postrace inspection',  
                     'Bidding Opens to Take a Turn in History with Dale Jr. in his #8 Budweiser Chevrolet',
 		             'Mountain Dew AMP Energy & the National Guard to Sponsor Earnhardt Jr. & No. 88'
		             // no comma after last item
					 ]
		}, // do not forget this comma
		// MAIN/CUP NEWS END
		
		
		
		// BUSCH NEWS BEGIN
		{
		header:		'',
		title:		'BUSCH NEWS:',
		link: 		'http://www.catchfence.com/bgncts/nbs.html',
		headlines:	[ 
		              'Brad Keselowski injures leg in 4-car crash',
                      'Burton passes Busch in closing laps for Calif. win',
					  'Crew Chief Fined, Placed on Probation for Violations at Michigan',
					  'A.J. Allmendinger Joins Chip Ganassi Racing with Felix Sabates',
					  'NASCAR scrambling to find new sponsor for Busch Series'				  
					   // no comma after last item
					 ]
		}, // do not forget this comma
		// BUSCH NEWS END
		
		
		// TRUCK NEWS BEGIN
		{
		header:		'',
		title:		'TRUCK NEWS:',
		link: 		'http://www.catchfence.com/bgncts/cts.html',
		headlines:	[ 
		             'Benson gets by Hornaday late to win Gateway race',
					 'Jacques Villeneuve Completes First NASCAR Test'
		    		  // no comma after last item
					 ]
		}, // do not forget this comma
		// TRUCK NEWS END
		
		
		// ARCA NEWS BEGIN
		{
		header:		'',
		title:		'ARCA NEWS:',
		link: 		'http://www.catchfence.com/arca/arca.html',
		headlines:	[
		             'Brett Butler To Run In ARCA RE/MAX Series For Eddie Sharp Racing',
					 'Schrader Shines Again on DuQuoin’s “Magic Mile” Dirt',
					 'Rookie Clauson Earns Career; First Victory at Gateway',
					 'ARCA Issues Post-Milwaukee Penalties'
					 // no comma after last item
					 ]
		}, // do not forget this comma
		// ARCA NEWS END
		
		
		];




// don't edit anything below this line

function getAlert() {
	try {
		return news_alert + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp';
	} catch (e) {
		return '';
	}
}

function getNews() {
	try {
		return news;
	} catch (e) {
		return [];
	}
}

function getNewsItem(index) {
	try {
		return getNews()[index];
	} catch (e) {
		return {header: '', title: '', link: '', separator: '', headlines: []};
	}
}

function writeBanner() {
	var separator = '&nbsp;&nbsp;<B>·</B>&nbsp;&nbsp;';
	str = getAlert();
	var nlen = getNews().length;
	for (var i=0; i<nlen; i++) {
		if (getNewsItem(i) != undefined) {
			str += getNewsItem(i).header;	
			str += '<b><font face="Verdana, Arial, Helvetica" size="-1" color="#FFFF00">'
			if (getNewsItem(i).link != '') str += '<A HREF="' + getNewsItem(i).link + '" CLASS="e">';
			str += '<B>' + getNewsItem(i).title + '&nbsp;&nbsp;</B>';
			var len = getNewsItem(i).headlines.length;
			for (var j=0; j<len; j++) {
				if (getNewsItem(i).headlines[j] != undefined) {
					str += getNewsItem(i).headlines[j];
					if (j == len-1 && getNewsItem(i).link != '') str += '</A>';
					str += separator;
				}
			}
			str += '</b></font>';
		}
	}
	var banner = '<center><marquee behavior="scroll" direction="left" bgcolor="BLACK" loop="" scrollamount="5"  width="95%" height="2"><div class="banner"><b><font face="Verdana, Arial, Helvetica" size="-1" color="#FFFF00">' + str + '</font></B></div></marquee></center>';
	document.write(banner);
}