window.onload=start;
var displaceBy=1;
var intervalSpeed = 100;



function start()
{
var s0 = document.getElementById("marq_cont");
	s0.onmouseover=function()
	{
	
		displaceBy=0;
	}
	s0.onmouseout=function()
	{
		displaceBy=1;
	}
	var s1 = document.getElementById("marq_part1");
	var s2 = document.getElementById("marq_part2");		
	var s1y = s1.offsetTop
	var s1h = s1.offsetHeight
	
	
	var s2y = s2.offsetTop
	var s2h = s2.offsetHeight
	s2.style.top = s1y+s1h+"px";	
	m_iInterval = setInterval(scroller, intervalSpeed);
}
function scroller(){

	var s0 = document.getElementById("marq_cont");	
	var s1 = document.getElementById("marq_part1");
	var s2 = document.getElementById("marq_part2");	
	var s0y = s0.offsetTop;
	var s0h = s0.offsetHeight;
	var s1y = s1.offsetTop
	var s1h = s1.offsetHeight
	var s2y = s2.offsetTop
	var s2h = s2.offsetHeight
	var scrollHeight= Math.abs(s0h-s0y);
	s1.style.top = s1y-displaceBy+"px";
	s2.style.top = s2y-displaceBy+"px";
	if(s1y<s2y){
		if(s2y+s2h < scrollHeight){
			s1.style.top = s2y+s2h-displaceBy+"px";
			return;
			
		}
	}else{
		if(s1y+s1h < scrollHeight){
			s2.style.top = s1y+s1h-displaceBy+"px";
			return;
			
		}		
	}
}

