/*
Fading Scroller- By DynamicDrive.com
For full source code, 100's more DHTML scripts, and TOS,
visit http://www.dynamicdrive.com
*/

var delay=3000 //set delay between message change (in miliseconds)
var index=0


var fcontent=new Array()
fcontent[0]="There is a candle in every soul, Some brightly burning, Some dark and cold, There is a spirit who brings the fire, Ignites his candle and makes his home"
fcontent[1]="Carry your candle, Run to the darkness, Seek out the hopeless, confused and torn, Hold out your candle for all to see it, Take your candle and go light your world"
fcontent[2]="Frustrated brother, see how he's tried to, Light his own candle some other way, See now your sister, she's been robbed and lied to, Still holds a candle without a flame"
fcontent[3]="Cause We are a family whose hearts are blazing, So let's raise our candles and light up the sky, Praying to our Father, in the name of Jesus, Make us a beacon in darkest times"
fcontent[4]="Carry your candle, run to the darkness, Seek out the helpless, confused and torn, Hold out your candle for all to see it, Take your candle, and go light your world"

//fcontent[2]="news item 3 can go here"
closetag='</div>'

///No need to edit below this line/////////////////

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0


if (DOM2)
faderdelay=4000

//function to change content
function changecontent(){
begintag='<div style="padding: 10px; padding-left: 30px;">' //set opening tag, such as font declarations
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("anim").style.color="rgb(0,0,0)"
document.getElementById("anim").innerHTML=begintag+fcontent[index]+closetag
colorfade()

}

index++

setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

frame=20;
hex=0  // Initial color value.

function colorfade() {	         	
// 20 frames fading process
if(frame>0) {	
hex+=12; // increase color value
document.getElementById("anim").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
frame--;
setTimeout("colorfade()",20);	
}
else{
document.getElementById("anim").style.color="rgb(255,255,255)";
frame=20;
hex=0
}   
}


window.onload=changecontent