/*
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 fcontent=new Array()
fcontent[0]="<div align=left><font size=4>Welcome!</font><br><br>Please <A HREF='contactinfo.asp'>let us know</A> if you have any questions.</div>"
fcontent[1]="<div align=left><font size=4>Questions?</font><br><br>Please feel free to <A HREF='contactinfo.asp'>contact us</A> with any questions that you may have.</div>"
fcontent[2]="<div align=left><font size=4>Interested in our services?</font><br><br>We can also do a quote for you. Just <A HREF='requestinfo.asp'>send us</A> the information about what you need.</div>"

begintag='<font face="Arial" size=2>' //set opening tag, such as font declarations
closetag='</font>'

var fwidth=135 //set scroller width
var fheight=150 //set scroller height

///No need to edit below this line/////////////////

var ie4=document.all&&!document.getElementById
var ns4=document.layers
var DOM2=document.getElementById
var faderdelay=0
var index=0
var RedColor=238
var GreenColor=232
var BlueColor=170
var EndingColor="0,0,0" 
var Frames=40
var ColorMultiplyer=-1 //-1 to go from light to Dark, 1 to go from Dark to light
								
if (DOM2)
	faderdelay=2000

//function to change content
function changecontent(){
	if (index>=fcontent.length)
		index=0
	if (DOM2){
		document.getElementById("fscroller").style.color="rgb("+RedColor+","+GreenColor+","+BlueColor+")"
		document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
		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=Frames;
hexR=RedColor;  // Initial color value.
hexG=GreenColor;
hexB=BlueColor;

function colorfade() {	         	
	// 20 frames fading process
	if(frame>0) {
		if(frame<40){	
			hexR=hexR+(8*ColorMultiplyer); // increase color value
			hexG=hexG+(8*ColorMultiplyer);
			hexB=hexB+(8*ColorMultiplyer);
		}
		frame--;									
		document.getElementById("fscroller").style.color="rgb("+hexR+","+hexG+","+hexB+")"; // Set color value.
		setTimeout("colorfade()",Frames);	
	}
	else{
		document.getElementById("fscroller").style.color="rgb("+EndingColor+")";
		frame=Frames;
		hexR=RedColor;
		hexG=GreenColor;
		hexB=BlueColor
	}   
}

if (ie4||DOM2)
	document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+';padding:2px"></div>')

window.onload=changecontent