// 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:	[   
		             'Commission Upholds Penalty On Roush Fenway Racing&#39s No. 99',
		             'Gillett Evernham Motorsports Signs Patrick Carpentier to Drive in 2008',
                     'No. 41 Team Penalized For Rule Violations At Talladega',
		             'Most Popular Driver Award Tops Three Million Votes',
                     'RCR Fan Day Slated for Oct. 12 in Welcome' 
		              // 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:	[ 
		              'Reed Sorenson To Assist Rusty Wallace Racing In Development Process',
		              'Nationwide Insurance To Be Title Partner',
					  'Crew Chief Bumgarner Fined For Rule Violations At Kansas',
					  'Stephen Leicht released from contract with Robert Yates Racing',
					  'Tony Eury Sr. To Serve As Interim Crew Chief for No. 88 Team'
					   // 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:	[ 
		             'Bodine edges Crawford, Benson for &#39Dega win',
					 'SPEED Confirms Ray Dunlap Suspended Again',
					 'Crew Chief Fined For Las Vegas Infraction'
		              // 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:	[
		             'Michael Annett Takes Toyota to Victory at Talladega',
					 'Scott Speed To Race Full 2008 ARCA RE/MAX Series Season With Eddie Sharp Racing', 
		             'Sheltra Motorsports To Giveaway Talladega Weekend Ticket Package On Inside The ARCA RE/MAX Series'
					 // 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);
}
