// 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:	[  
                     'Sadness Hits France Family Once Again As Lesa France Kennedy&#39s Husband Killed',
		             'NASCAR&#39s Premier Series To Be Named NASCAR Sprint Cup Series Beginning Jan. 1 2008',
                     'Bass Pro Shops Announces 3-Year Sponsorship With Dale Earnhardt Inc'
                     // 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:	[ 
		              'DAYTONA USA is now “Daytona 500 Experience”',
		              'Eury Sr. Named Director of Competition at JR Motorsports',
		              'Hamlin Wins AT&T 250 for Almirola',  
		              'Leicht takes checkered at Kentucky for first NBS win', 
		              'McCreadie to make Busch Series debut at Milwaukee',
					  'Dodge Brand To Be Exclusive Automotive Sponsor Of Canada&#39s First Busch Race'
	                  // 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:	[ 
		             'Ted Musgrave Suspended From Next Race Due To Infraction at Milwaukee Mile',
		             'Benson holds off Hornaday to win at Milwaukee Mile',
		             'Kvapil passes Busch with lap to go to win at Michigan',
                     'NASCAR Craftsman Truck Series Crew Chief Fined For Violations At Texas',  
		             'Tyler Walker In Violation Of Substance Abuse Policy'
		              // 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:	[
		             'T-Mac to Run Busch/ARCA/NASCAR East Races with RCR',
		             'Shannon Feldmann Joins ARCA’s No. 38 Team For Remainder Of 2007 Season', 
                     'Darnell Holds Off Hornish, Jr For Michigan Trophy',
                     'Roush Fenway Racing Signs Colin Braun To Driver Development Deal'
		             // 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);
}
