var marqueeContent=new Array();
marqueeContent[0]="click onto the red block with jump over it:<br />鼠标移动到红色部分。";
marqueeContent[1]="move the red block avoiding crash with the blue ones<br />拖动红块，避免碰到蓝色部分。";
marqueeContent[2]="don't touch the black edge.<br />不要碰到黑色区域。";
marqueeContent[3]="if you can reach more than 100 seconds, you are a genius.<br />如果你能达到100秒以上，你算得上是个天才。";
marqueeContent[4]="it is said that the pilots from the us air force are forced to reach 2 minutes.<br />据说，美国空军的飞行员被强制达到2分钟。发给你的朋友一块玩吧！";
marqueeContent[4]="==================================<br />==================================";
var marqueeInterval=new Array();
var marqueeId=0;
var marqueeDelay=2000;
var marqueeHeight=50;
function initMarquee() {
	var str=marqueeContent[0];
	document.write('<div id="marqueeBox" style="overflow:hidden;width:500px;height:'+marqueeHeight+'px" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)"><div>'+str+'</div></div>');
	marqueeId++;
	marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);
}
function startMarquee() {
	var str=marqueeContent[marqueeId];
	marqueeId++;
	if(marqueeId>=marqueeContent.length) marqueeId=0;
	if(document.getElementById("marqueeBox").childNodes.length==1) {
		var nextLine=document.createElement('DIV');
		nextLine.innerHTML=str;
		document.getElementById("marqueeBox").appendChild(nextLine);
	} else {
		document.getElementById("marqueeBox").childNodes[0].innerHTML=str;
		document.getElementById("marqueeBox").appendChild(document.getElementById("marqueeBox").childNodes[0]);
		document.getElementById("marqueeBox").scrollTop=0;
	}
	clearInterval(marqueeInterval[1]);
	marqueeInterval[1]=setInterval("scrollMarquee()",20);
}
function scrollMarquee() {
	document.getElementById("marqueeBox").scrollTop++;
	if(document.getElementById("marqueeBox").scrollTop%marqueeHeight==(marqueeHeight-1)){
		clearInterval(marqueeInterval[1]);
	}
}
initMarquee();