/*
Fading Scroller- By DynamicDrive.com
For full source code, and usage terms, visit http://www.dynamicdrive.com
This notice MUST stay intact for use
*/

var delay=8000 //set delay between message change (in miliseconds)
var fcontent=new Array()
begintag='<span class="quotes">' //set opening tag, such as font declarations
fcontent[0]="I had rather be on my farm than be emperor of the world.  ~George Washington, 1st President"
fcontent[1]="Loving is not just looking at each other, it's looking in the same direction.  ~Antoine de Saint-Exupéry"
fcontent[2]="Honesty is the first chapter of the book of wisdom.  ~Thomas Jefferson, 3rd President"
fcontent[3]="If men were angels, no government would be necessary.  ~James Madison, 4th President"
fcontent[4]="Each day I love you more; today more than yesterday and less than tomorrow.  ~Rosemonde Gerard"
fcontent[5]="Labor disgraces no man; unfortunately, you occasionally find men who disgrace labor.  ~Ulysses S. Grant, 18th President"
fcontent[6]="The lesson of history is rarely learned by the actors themselves.  ~James A. Garfield, 20th President" 
fcontent[7]="This country will not be a good place for any of us to live in unless we make it a good place for all of us to live in.  ~Theodore Roosevelt, 26th President"
fcontent[8]="Trip over love, you can get up.  Fall in love and you fall forever.  ~Author Unknown"
fcontent[9]="I would never read a book if it were possible for me to talk half an hour with the man who wrote it.  ~Woodrow Wilson, 28th President"
closetag='</span>'

var fwidth='350px' //set scroller width
var fheight='55px' //set scroller height

var fadescheme=0 //set 0 to fade text color from (white to black), 1 for (black to white)
var fadelinks=1  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////

var hex=(fadescheme==0)? 255 : 0
var startcolor=(fadescheme==0)? "rgb(255,255,255)" : "rgb(0,0,0)"
var endcolor=(fadescheme==0)? "rgb(0,0,0)" : "rgb(255,255,255)"

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0

if (DOM2)
faderdelay=2000

//function to change content
function changecontent(){
if (index>=fcontent.length)
index=0
if (DOM2){
document.getElementById("fscroller").style.color=startcolor
document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
linksobj=document.getElementById("fscroller").getElementsByTagName("A")
if (fadelinks)
linkcolorchange(linksobj)
colorfade()
}
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()
}

index++
setTimeout("changecontent()",delay+faderdelay)
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

frame=20;

function linkcolorchange(obj){
if (obj.length>0){
for (i=0;i<obj.length;i++)
obj[i].style.color="rgb("+hex+","+hex+","+hex+")"
}
}

function colorfade() {	         	
// 20 frames fading process
if(frame>0) {	
hex=(fadescheme==0)? hex-12 : hex+12 // increase or decrease color value depd on fadescheme
document.getElementById("fscroller").style.color="rgb("+hex+","+hex+","+hex+")"; // Set color value.
if (fadelinks)
linkcolorchange(linksobj)
frame--;
setTimeout("colorfade()",20);	
}

else{
document.getElementById("fscroller").style.color=endcolor;
frame=20;
hex=(fadescheme==0)? 255 : 0
}   
}

if (ie4||DOM2)
document.write('<div id="fscroller" style="border:1px #C8B8A8;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

window.onload=changecontent
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
