﻿timeID = 10;
stcnt = 18;
msg = "歡迎光臨台北天心中醫醫院網站！";
wmsg = new Array(32);
	wmsg[0]=msg;
	blnk = "                                                               ";
	for (i=1; i<32; i++)
	{
		b = blnk.substring(0,i);
		wmsg[i]="";
		for (j=0; j<msg.length; j++) wmsg[i]=wmsg[i]+msg.charAt(j)+b;
	}
function wiper()
{
	ct = new Date();
	h = "0"+ct.getHours();
	m = "0"+ct.getMinutes();
	s = "0"+ct.getSeconds();
	h = h.substring(h.length-2,h.length+1);
	m = m.substring(m.length-2,m.length+1);
	s = s.substring(s.length-2,s.length+1);
	cl = " 現在時間：【"+h+":"+m+":"+s+" 】";
	if (stcnt > -1) str = wmsg[stcnt]; else str = wmsg[0];
	if (stcnt-- < -40) stcnt=31;
	status = cl+str;
	clearTimeout(timeID);
	timeID = setTimeout("wiper()",100);
}
