var scrollspeed=1
var marqueeheight
var thelength
var thelength2
var numContenitore

function initialize()
{
marqueeheight=document.all? parent.document.all.scroll.offsetHeight : parent.document.getElementById("scroll").style.offsetHeight
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj2=document.all? document.all.datacontainer2 : document.getElementById("datacontainer2")
dataobj.style.top=5
thelength=dataobj.offsetHeight
thelength2=dataobj2.offsetHeight
thelength < 10 ? thelength = 1000 : thelength = dataobj.offsetHeight
thelength2 < 10 ? thelength2 = 1000 : thelength2 = dataobj2.offsetHeight
numContenitore = 1
setTimeout("scrolltest()",1000)
}

function scrolltest()
{
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed
dataobj2.style.top=parseInt(dataobj2.style.top)-scrollspeed

if (numContenitore == 1)
	obj = dataobj
else
	obj = dataobj2

//CONTROLLO FINE SCROLL CORRENTE:
//if (parseInt(obj.style.top)<thelength*(-1))
if (parseInt(obj.style.top) < 0)
{
	if ((parseInt(obj.style.top)*(-1) + marqueeheight) >= thelength)
	{
	if (numContenitore == 1)
		{
		obj = dataobj2
		numContenitore = 2
		}
	else
		{	
		obj = dataobj
		numContenitore = 1
		}
	obj.style.top=marqueeheight + 20
	}
}
setTimeout("scrolltest()",50)
}




