﻿/***********************************************
* 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
***********************************************/


/********************************************\
 )		INCLUDE THE FOLLOWING IN THE HEADER	(
<				(SETTINGS)					 >
 )											(
\********************************************/


/*<script type="text/javascript" charset="utf-8">
	//configure the below five variables to change the style of the scroller
	var scrollerdelay='8000' //delay between msg scrolls. 3000=3 seconds.
	var scrollerwidth2='210px'
	var scrollerheight2='60px'
	var scrollerbgcolor='#ffffff'
	//set below to '' if you don't wish to use a background image
	var scrollerbackground=''

	var paragraphStart = '<p>'
	var paragraphEnd = '</p>'

	//configure the below variable to change the contents of the scroller
	var messages=new Array()
	messages[0]= paragraphStart +'Random facts about Ballyhoo that scrolls.'+ paragraphEnd
	messages[1]= paragraphStart +'Jack is left-handed.'+ paragraphEnd
	messages[2]= paragraphStart +'thunder::tech HQ is located in MidTown Cleveland'+ paragraphEnd
	messages[3]= paragraphStart +'More people have a phobia of frogs than rats.'+ paragraphEnd
	messages[4]= paragraphStart +'Sheryl Crow\'s two front teeth are fake.'+ paragraphEnd
	messages[5]= paragraphStart +'Keanu Reeves is afraid of the dark.'+ paragraphEnd
	messages[6]= paragraphStart +'One quarter of the human brain is used to control the eyes.'+paragraphEnd
	massages[7]= paragraphStart +'A dime has 118 ridges around the edge, a quarter has 119.'+paragraphEnd
</script>*/


/********************************************\
 )				END HEADER CODE				(
<											 >
 )				  (SETTINGS)				(
\********************************************/


///////Do not edit pass this line///////////////////////

var ie=document.all
var dom=document.getElementById

if (messages2.length>2)
	i2=2
else
	i2=0

function move4(whichdiv){
	tdiv4=eval(whichdiv)
	if (parseInt(tdiv4.style.top)>0&&parseInt(tdiv4.style.top)<=5){
		tdiv4.style.top=0+"px"
		setTimeout("move4(tdiv4)",scrollerdelay)
		setTimeout("move3(second3_obj)",scrollerdelay)
		return
	}
	if (parseInt(tdiv4.style.top)>=tdiv4.offsetHeight*-1){
		tdiv4.style.top=parseInt(tdiv4.style.top)-5+"px"
		setTimeout("move4(tdiv4)",50)
	} else {
		tdiv4.style.top=parseInt(scrollerheight2)+"px"
		tdiv4.innerHTML=messages2[i2]
		if (i2==messages2.length-1)
			i2=0
		else
			i2++
	}
}

function move3(whichdiv){
	tdiv3=eval(whichdiv)
	if (parseInt(tdiv3.style.top)>0&&parseInt(tdiv3.style.top)<=5){
		tdiv3.style.top=0+"px"
		setTimeout("move3(tdiv3)",scrollerdelay2)
		setTimeout("move4(first3_obj)",scrollerdelay2)
		return
	}
	if (parseInt(tdiv3.style.top)>=tdiv3.offsetHeight*-1){
		tdiv3.style.top=parseInt(tdiv3.style.top)-5+"px"
		setTimeout("move3(second3_obj)",50)
	}else{
		tdiv3.style.top=parseInt(scrollerheight2)+"px"
		tdiv3.innerHTML=messages2[i2]
	if (i2==messages2.length-1)
		i2=0
	else
		i2++
	}
}

function startscroll2(){
	first3_obj=ie? first3 : document.getElementById("first3")
	second3_obj=ie? second3 : document.getElementById("second3")
	move4(first3_obj)
	second3_obj.style.top=scrollerheight2
	second3_obj.style.visibility='visible'
}

if (ie||dom){
	document.writeln('<div id="main3" style="position:relative;width:'+scrollerwidth2+';height:'+scrollerheight2+';overflow:hidden;">')
	document.writeln('<div style="position:absolute;width:'+scrollerwidth2+';height:'+scrollerheight2+';clip:rect(0 '+scrollerwidth2+' '+scrollerheight2+' 0);left:0px;top:0px">')
	document.writeln('<div id="first3" style="position:absolute;width:'+scrollerwidth2+';left:0px;top:1px;">')
	document.write(messages2[0])
	document.writeln('</div>')
	document.writeln('<div id="second3" style="position:absolute;width:'+scrollerwidth2+';left:0px;top:0px;visibility:hidden;">')
	document.write(messages2[dyndetermine=(messages2.length==1)? 0 : 1])
	document.writeln('</div>')
	document.writeln('</div>')
	document.writeln('</div>')
}

if (window.addEventListener)
	window.addEventListener("load", startscroll2, false)
else if (window.attachEvent)
	window.attachEvent("onload", startscroll2)
else if (ie||dom)
	window.onload=startscroll2