scrollheight = 33 ;//卷軸高
lineNum = 1; 
boardheight=scrollheight * lineNum;//跑馬燈高
scrollwidth=600;//跑馬燈寬
scrollTimeOut = 60;//移動時間
scrollStopTime = 30;//停留時間值愈小停留愈短

doScroll = true;//是否要跑
scrollCountTime = 0;//目前時間
offSet = scrollheight;//偏移量
startSetp = 0;
objnum = 0;

function ScrollBluezz() {
	var thisSc = document.getElementById('scArea');
	thisSc.style.width = scrollwidth+"px";
	thisSc.style.height = boardheight+"px";
	thisSc.style.overflowX = "hidden";
	thisSc.style.overflowY = "hidden";
	thisSc.scrollTop = 0;
	mytime = setInterval("scrollUpBluezz()",scrollTimeOut);
}

function scrollUpBluezz() {
	var thisSc = document.getElementById('scArea');
	var obj = thisSc.getElementsByTagName("div");
	if (doScroll == false) return	//不跑
	if (obj.length <= lineNum) return	//不跑
	offSet ++; 
	if (offSet == scrollheight + 1) {
		scrollCountTime ++; 
		offSet --; 
		if (scrollCountTime == scrollStopTime) {
			offSet = 0;
			scrollCountTime = 0;
			thisSc.innerHTML += "<div class='news_text' style='margin-left:150px;'>"+obj[objnum].innerHTML+"</div>";
			objnum++;
		}
	}else {
		startSetp = thisSc.scrollTop + (scrollheight * lineNum);
		thisSc.scrollTop ++;
	}
}

function scStop(){
	doScroll = false;
}
function scStart(){
	doScroll = true;
}