
var delay=3000 //set delay between message change (in miliseconds)
begintag='<font face="Tahoma" size=4>' //set opening tag, such as font declarations
closetag='</font>'
var fwidth=400 //set scroller width
var fheight=50 //set scroller height
var fcontent=new Array()
fcontent[0] = "Damon Harmon current ECPRA points series leader.";
fcontent[1] = "6/1/2008 Damon Harmon wins 2008 Larry's Spring Nationals in Xenia, OH";
fcontent[2] = "3/9/2008 Damon Harmon wins ECPRA season opener at Silver Dollar Dragway";
fcontent[3] = "Damon Harmon 2007 ECPRA points series champion.";
fcontent[4] = "10/14/2007 Damon Harmon beats out largest Pro Stock field ever in Farmington";
fcontent[5] = "8/19/2007 Damon and QT3 placed first at Piedmont Dragway in Greensboro, NC";
fcontent[6] = "7/15/2007 Harmon top qualifier and best ET at 2nd Annual Bugwild in Roxboro, NC";
fcontent[7] = "9/23/2007 Harmon sets new record at Rockingham"; 
fcontent[8] = "6/2/2007 Harmon sets new record at Larry's Nationals";
fcontent[9] = "5/6/2007 Harmon takes win at Volksblast";
fcontent[10] = "Contact <a href=Contact.htm target=main><font color=yellow>Harmon Fire Extinguisher Service</font></a> for all of your Fire Extinguisher needs";
fcontent[11] = "2007 TXPRA Pro Stock Champion";
fcontent[12] = "Best E.T. - 1/8 Mi 6.03s @112.96 mph";
fcontent[13] = "Best E.T. - 1/4 Mi 9.54s @138.94 mph";
fcontent[14] = "Custom Engine Building";
fcontent[15] = "Dyno Services";
fcontent[16] = "Custom Transmissions";
fcontent[17] = "Flow Bench Testing";
fcontent[18] = "Mig and Tig Welding";
fcontent[19] = "Machine Services";
fcontent[20] = "Authorized Scat Dealer";

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0
frame=20;
hex=255  // Initial color value.

if (DOM2)
faderdelay=2000

//function to change content
function changecontent()
{
		if (index>=fcontent.length)
		index=0
		if (DOM2)
		{
			frame=20;
			fadedown()
		}
		else if (ie4)
		{
			document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag
		}
		else if (ns4)
		{
			document.fscrollerns.document.fscrollerns_sub.document.write(begintag+fcontent[index]+closetag)
			document.fscrollerns.document.fscrollerns_sub.document.close()
		}

}

function fadeup()
{	         	
	// 20 frames fading process
	if(frame>0) 
	{	
		hex+=12; // increase color value
		document.getElementById("fscroller").style.color="rgb(255,"+hex+","+hex+")"; // Set color value.
		frame--;
		setTimeout("fadeup()",30);	
	}
	else
	{
		document.getElementById("fscroller").style.color="rgb(255,255,255)";
		index++
		hex = 255;
		setTimeout("changecontent()",delay+faderdelay)
	}   
}

function fadedown() 
{	         	
	// 20 frames fading process
	if(frame>0) 
	{	
		hex-=12; // increase color value
		document.getElementById("fscroller").style.color="rgb(255,"+hex+","+hex+")"; // Set color value.
		frame--;
		setTimeout("fadedown()",30);	
	}
	else
	{
		document.getElementById("fscroller").style.color="rgb(213,0,0)";
		frame=20;
		hex = 0;
		pausebetween()
	}   
}
function pausebetween()
{
	document.getElementById("fscroller").innerHTML=begintag+closetag
	setTimeout("nexttext()",1000);	
}
function nexttext()
{
		document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
		fadeup();	
}
if (ie4||DOM2)
document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

window.onload=changecontent