/*
// ABOUT
// ==================================================
// scArea v0.5 
// scArea簡單符合SEO的垂直跑馬燈範例(javascript)
// 大部分此類型的程式，搜尋引擎完全看不懂因此降低了相關內容與連結被找到的機會，此範例改善此缺點
// made by zenon blue,2007/8
// http://bluezz.tw/c.php?id=967
// service@bluezz.com.tw
// ==================================================
*/

//卷軸高
scrollheight	= 40;
lineNum		= 1; 
//跑馬燈高
boardheight	= scrollheight * lineNum;
//跑馬燈寬
scrollwidth	= 400;
//移動時間
scrollTimeOut	= 20;
//停留時間	
scrollStopTime	= 400
//是否要跑
doScroll	= true;
//目前時間
scrollCountTime	= 0;
//偏移量
offSet		= scrollheight;
startSetp	= 0;

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++;
		}
	}
}
