/***********************************************
* IFRAME Scroller script- © 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
***********************************************/

//Specify speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=1
//Specify intial delay before scroller starts scrolling (in miliseconds):
var initialdelay=3000
var resetheight = "10px"
var scrolltimeout = 60

function initializeScroller(){
	dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
	dataobj.style.top=resetheight
	setTimeout("getdataheight()", initialdelay)
}

function getdataheight(){
	thelength=dataobj.offsetHeight
	if (thelength==0)
		setTimeout("getdataheight()",10)
	else
		scrollDiv()
}

function scrollDiv(){
	dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px"
	if (parseInt(dataobj.style.top) < thelength*(-1)) {
		dataobj.style.top=resetheight
		setTimeout("scrollDiv()",initialdelay)
	}
	else {
		setTimeout("scrollDiv()",scrolltimeout)
	}
}

function newspause(state) {
	if (state == "on") {
		scrollspeed=0;
		//document.body.style.backgroundPosition = "0px -190px"
		//document.getElementById("paused").style.display = "block"
	}
	else {
		scrollspeed=cache;
		//document.body.style.backgroundPosition = "0px 0px"
		//document.getElementById("paused").style.display = "none"
	}
}

if (window.addEventListener)
	window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
	window.attachEvent("onload", initializeScroller)
else
	initializeScroller()
