// JavaScript Document

/***********************************************
* Pausing updown message scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//configure the below five variables to change the style of the scroller
var scrollerdelay='5000' //delay between msg scrolls. 3000=3 seconds.
var scrollerwidth='100%'
var scrollerheight='18px'
var scrollerbgcolor=''
var scrollerdelayfirst='600'
//set below to '' if you don't wish to use a background image
var scrollerbackground='statusbackground.jpg'

//configure the below variable to change the contents of the scroller
var messages=new Array(21)
messages[0]=""
messages[1]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>What a great inspiration you are for kids and adults around the world!</b>&nbsp;&nbsp;- Dr. Cynthia Holland, Newberry, FL</span>"
messages[2]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>You are even motivating me to get off my couch and get physical.</b>&nbsp;&nbsp;- Scott Rossmiller, Detroit, MI</span>"
messages[3]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>All of us here in Australia are cheering you on to your goal. What an inspiration.</b>&nbsp;&nbsp;- Cheryl Gates, Victoria, Australia</span>"
messages[4]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>This is a very worthwhile thing and excellent for your health!</b>&nbsp;&nbsp;- Thomas Eagan, Charlotte, NC</span>"
messages[5]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>We are pulling for you here in South Carolina!</b>&nbsp;&nbsp;- Doretha Daniels, Blythewood, SC</span>"
messages[6]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Good luck to all of you brave souls/soles!</b>&nbsp;&nbsp;- Barbara Bomes, Los Angeles, CA</span>"
messages[7]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>I truly admire your courage and determination to take on a task as large as this!</b>&nbsp;&nbsp;- Doug Burreson, Missoula, MT</span>"
messages[8]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Amazing, interesting & challenging endeavor. You are truly pioneers!!</b>&nbsp;&nbsp;- Mel Opstad, Big Lake, MN</span>"
messages[9]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Thank you for what you are doing in the lives of children.</b>&nbsp;&nbsp;- Jeanne Bensch, Branson, MO</span>"
messages[10]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Your dedication/energy to complete this trek shows what's great about this country's youth.</b>&nbsp;&nbsp;- Michael Dolan, CA</span>"
messages[11]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Congratulations from Napanee, Ontario, Canada! What a neat idea!</b>&nbsp;&nbsp;- The Deloughery Family, Ontario, Canada</span>"
messages[12]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>This is a really good way to combine physical fitness with a goal!</b>&nbsp;&nbsp;- Eric Hefty, Missoula, MT</span>"
messages[13]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Wow! What amazing kids you are! As a runner and a mom you have inspired me.</b>&nbsp;&nbsp;- Sharon Schaifo, Red Hook, NY</span>"
messages[14]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>You're an inspiration & I hope you'll continue physical activity long past this year!</b>&nbsp;&nbsp;- Katrina Mullen, OH</span>"
messages[15]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>This is something you'll look back on with wonderful memories and a sense of pride.</b>&nbsp;&nbsp;- S. Rossmiller, Missoula, MT</span>"
messages[16]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>I'm impressed by the challenge you've undertaken in virtually running across America.</b>&nbsp;&nbsp;- Senator Conrad Burns</span>"
messages[17]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>I understand that a lot of hard work has gotten you to this point, and I wish you the best...</b>&nbsp;&nbsp;- Senator Max Baucus</span>"
messages[18]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>It's great that you have set a goal and are reaching for it with all you have.</b>&nbsp;&nbsp;- Montana Governor Brian Schweitzer</span>"
messages[19]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>You'll all be winners at the end of this! God bless you & keep running/walking.</b>&nbsp;&nbsp;- Arkansas Governor M. Huckabee</span>"
messages[20]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>I admire your determination to combine fitness with your goal to run/walk 3,200 miles.</b>&nbsp;&nbsp;- Missoula Mayor J. Engen</span>"
messages[21]="<span style='color: white;' font-family: verdana; font-size: 2pt;'><b>Combining the great physical exercise with [learning] is truly inspired teaching.</b>&nbsp;&nbsp;- L. McCulloch, Supt. Public Inst.</span>"

///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (messages.length>2) {
messageindex=2 }
else {
messageindex=0
}

function move(whichdiv){
	tdiv=eval(whichdiv)
	if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
		tdiv.style.top=0+"px"
		setTimeout("move(tdiv)",scrollerdelay)
		setTimeout("move2(second2_obj)",scrollerdelay)
		return
	}
	if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
		tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
		setTimeout("move(tdiv)",50)
	}
	else{
		tdiv.style.top=parseInt(scrollerheight)+"px"
		tdiv.innerHTML=messages[messageindex]
		if (messageindex==messages.length-1) {
			messageindex=0 }
		else {
			messageindex++ }
	}
}

function movefirst(whichdiv){
	tdiv=eval(whichdiv)
	if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
		tdiv.style.top=0+"px"
		setTimeout("move(tdiv)",scrollerdelayfirst)
		setTimeout("move2(second2_obj)",scrollerdelayfirst)
		return
	}
	if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
		tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
		setTimeout("move(tdiv)",50)
	}
	else{
		tdiv.style.top=parseInt(scrollerheight)+"px"
		tdiv.innerHTML=messages[messageindex]
		if (messageindex==messages.length-1) {
			messageindex=0 }
		else {
			messageindex++ }
	}
}

function move2(whichdiv){
	tdiv2=eval(whichdiv)
	if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
		tdiv2.style.top=0+"px"
		setTimeout("move2(tdiv2)",scrollerdelay)
		setTimeout("move(first2_obj)",scrollerdelay)
		return
	}
	if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
		tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
		setTimeout("move2(second2_obj)",50)
	}
	else{
		tdiv2.style.top=parseInt(scrollerheight)+"px"
		tdiv2.innerHTML=messages[messageindex]
		if (messageindex==messages.length-1) {
			messageindex=0 }
		else {
			messageindex++ }
	}
}

function startscroll(){
	first2_obj=ie? first2 : document.getElementById("first2")
	second2_obj=ie? second2 : document.getElementById("second2")
	
	movefirst(first2_obj)
	second2_obj.style.top=scrollerheight
	second2_obj.style.visibility='visible'
}

if (ie||dom){
	document.writeln('<div id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hidden;background-color:'+scrollerbgcolor+' ;background-image:url('+scrollerbackground+')">')
	document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0px;top:0px">')
	document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:1px;">')
	document.write(messages[0])
	document.writeln('</div>')
	document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0px;top:0px;visibility:hidden">')
	document.write(messages[dyndetermine=(messages.length==1)? 0 : 1])
	document.writeln('</div>')
	document.writeln('</div>')
	document.writeln('</div>')
}

if (window.addEventListener) {
window.addEventListener("load", startscroll, false) }
else if (window.attachEvent) {
window.attachEvent("onload", startscroll) }
else if (ie||dom) {
window.onload=startscroll }

