var timera = null;








var tag = 1;








var Stag = "stop";








var marqueeHeight;








var maxTop;








var minTop;








var marqueeObj;








var dpps;








var originalObj;








var cloneObj;








function marquee(Mtimes, mH, dP) {








	marqueeHeight = mH;








	dpps = dP;








	clearTimeout(timera);








	Mtimes = Mtimes ? Mtimes: 2;








	marqueeObj = document.getElementById("caselist").getElementsByTagName("ul");








	maxTop = -marqueeHeight * Mtimes;








	minTop = marqueeHeight * Mtimes;








	if (marqueeObj.length == 1) {








		originalObj = marqueeObj[0];








		cloneObj = originalObj.cloneNode(true);








		originalObj.parentNode.appendChild(cloneObj);








		marqueeObj[0].style.top = 0 + "px";








		marqueeObj[1].style.top = minTop + "px";








	}








	if ((tag == 0 && marqueeObj[0].offsetTop == 0) || marqueeObj[0].offsetTop / tag == -marqueeHeight) {








		tag++;








		Stag = "stop";








		clearTimeout(timera);








		timera = setTimeout("marquee(" + Mtimes + "," + mH + "," + dP + ")", 5000);








	} else {








		Stag = "continue";








		marqueeObj[0].style.top = marqueeObj[0].offsetTop - dpps + "px";








		marqueeObj[1].style.top = marqueeObj[1].offsetTop - dpps + "px";








		if (marqueeObj[0].offsetTop == maxTop) {








			marqueeObj[0].style.top = minTop + "px";








			tag = -Mtimes;;








		}








		if (marqueeObj[1].offsetTop == maxTop) {








			marqueeObj[1].style.top = minTop + "px";








		}








		timera = setTimeout("marquee(" + Mtimes + "," + mH + "," + dP + ")", 30)








	}








}

















$(function() {








	setTimeout("marquee(1, 264, 11)", 2000);








	$("#caselist").hover(function() {








		if (Stag == "stop") {








			clearTimeout(timera);








		}








	},








	function() {








		if (Stag == "stop") {








			timera = setTimeout("marquee(1, 264, 11)", 1000);








		}








	});








});