// 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:	[ 
		             'Rusty Wallace And Ray Evernham Taking Aim On Another Victory At Bristol Motor Speedway',  
		             'Darlington Raceway Unveils 2009 Southern 500® Logo With Help From Ned Jarrett And Bondy Long',
		             'Yates And Gilliland Amicably Part Ways',
		             'Crew Member Paul Chodora In Violation Of NASCAR Substance Abuse Policy',
		             '“House” Star Hugh Laurie Named Grand Marshal For Auto Club 500 At Auto Club Speedway On Feb. 22', 
                     'No Fear Racing Announces Merger With Rick Clark Motorsports',
					 'New Format Creates Suspense in NASCAR® NMPA Chex Most Popular Driver Voting' 
		             // no comma after last item
					 ]
		}, // do not forget this comma
		// MAIN/CUP NEWS END
		
		
		
		// BUSCH NEWS BEGIN
		{
		header:		'',
		title:		'',
		link: 		'http://www.catchfence.com/bgncts/nbs.html',
		headlines:	[ 
		               // no comma after last item
					 ]
		}, // do not forget this comma
		// BUSCH NEWS END
		
		
		// TRUCK NEWS BEGIN
		{
		header:		'',
		title:		'',
		link: 		'http://www.catchfence.com/bgncts/cts.html',
		headlines:	[ 
		             
				      // no comma after last item
					 ]
		}, // do not forget this comma
		// TRUCK NEWS END
		
		
		// ARCA NEWS BEGIN
		{
		header:		'',
		title:		'',
		link: 		'http://www.catchfence.com/arca/arca.html',
		headlines:	[
		           
					 // 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);
}