var height = 100;
var velE = 1, velM = 1;
var posE = height, posM = height;

function startScroll() {

	var divE = document.getElementById('divEventos');
	var ulE = document.getElementById('ulEventos');
	var hE = ulE.offsetHeight;
	
	var divM = document.getElementById('divMes');
	var ulM = document.getElementById('ulMes');
	var hM = ulM.offsetHeight;

	divE.style.position = divM.style.position = "relative";
	divE.style.height = divM.style.height = height + "px";
	divE.style.overflow = divM.style.overflow = "hidden";
	ulE.style.position = ulM.style.position = "absolute";
	
	addEvent(divE, "mouseover", limpaIntervaloE);
	addEvent(divE, "mouseout", ativaIntervaloE);
	addEvent(divM, "mouseover", limpaIntervaloM);
	addEvent(divM, "mouseout", ativaIntervaloM);
	
	var intervalo = window.setInterval(function() {
		
		posE -= velE;
		posM -= velM;
		ulE.style.top = posE + 'px';
		ulM.style.top = posM + 'px';
		
		if (posE < -hE) posE = height;
		if (posM < -hM) posM = height;
		
	}, 50);
	
}

function limpaIntervaloE() { velE = 0; }
function ativaIntervaloE() { velE = 1; }
function limpaIntervaloM() { velM = 0; }
function ativaIntervaloM() { velM = 1; }

function addEvent(obj, evType, fn){
	if (obj.addEventListener) obj.addEventListener(evType, fn, true)
	if (obj.attachEvent) obj.attachEvent("on"+evType, fn)
}