
lineNum = 1; 
boardheight=scrollheight * lineNum;	//跑馬燈高
doScroll = true			//是否要跑
scrollCountTime = 0;	//目前時間
offSet = scrollheight;	//偏移量
startSetp = 0;
scrollTimeOut = scrollheight*0.65;	//移動時間
function stage(m){
	if( m =="stop"){
		doScroll = false;
	}else{
		doScroll = true;
	}
	
}
function ScrollBluezz(){
    thisSc = document.all['scArea']; 
	thisSc.style.width = scrollwidth;
	thisSc.style.height = boardheight;
	thisSc.style.overflowX = "hidden";
	thisSc.style.overflowY = "hidden";
	thisSc.scrollTop = 0
	setInterval("scrollUpBluezz()",scrollTimeOut)
}

function scrollUpBluezz(){
	thisSc = document.all['scArea'];
	if (doScroll == false) return	//不跑
	offSet ++ 
	if (offSet == scrollheight + 1) {
	  scrollCountTime ++ 
	  offSet -- 
	   if (scrollCountTime == scrollStopTime) {
		 offSet = 0
		 scrollCountTime = 0
	   }
	 }else {
	  startSetp = thisSc.scrollTop + (scrollheight * lineNum);
	  thisSc.scrollTop ++
	  if (startSetp == thisSc.scrollTop + (scrollheight * lineNum)) {
		thisSc.scrollTop = scrollheight * (lineNum-1)
		thisSc.scrollTop ++ 
	  }
	 }
}
window.onload=ScrollBluezz;
