scrollheight = 60 ;											//卷軸高
lineNum = 1; 
boardheight= scrollheight * lineNum;		//跑馬燈高
scrollwidth			=	560;											//跑馬燈寬
scrollTimeOut 	= 30;										//移動時間
scrollStopTime 	= 150;										//停留時間 值愈小停留愈短
doScroll = true;												//是否要跑
scrollCountTime = 0;										//目前時間
offSet = scrollheight;									//偏移量
startSetp = 0;

function ScrollBluezz() {
	
	if(document.getElementById("hid_newsrls").value == 3){
		scrollheight = 60;
	}else if(document.getElementById("hid_newsrls").value == 2){
		scrollheight = 40;
	}else {
		scrollheight = 20;
	}
	boardheight= scrollheight * lineNum;
	offSet = scrollheight;	
	
	for (i=0;i<=document.getElementById("hid_newscnt").value;i++) {
		if(document.getElementById("tk"+i)){
 			document.getElementById("tk"+i).style.display = "block";
 		} 
 	}
	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
	setInterval("scrollUpBluezz()",scrollTimeOut)
}
function scrollUpBluezz() {
	var thisSc=document.getElementById('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 ++ 
	  }
	 }
}
function ScrollBluezz_status(v){
	if(v==0){
		doScroll = false;
	}else{
		doScroll = true;	
	}
}