// JavaScript Document

var MessageText = "-`๏'-  น้ำมิ้นเจียงดาว ::  รับงานบันเทิง ขับฮ้องเพลงเจ้า :: ยินดีจาดนักเจ้า -`๏'- ";
var DisplayLength = 399;
var pos = 1 - DisplayLength;

function ScrollInStatusBar(){
	var scroll = "";
	pos++;
	if (pos == MessageText.length) pos = 1 - DisplayLength;
	if (pos<0) {
		for (var i=1; i<=Math.abs(pos); i++)
			scroll = scroll + "";
			scroll = scroll + MessageText.substring(0, DisplayLength - i + 1);
		}
	else
		scroll = scroll + MessageText.substring(pos, pos + DisplayLength);
		window.status = scroll;
		document.title=scroll;
		//Scrolling speed
		setTimeout("ScrollInStatusBar()",0);
}
ScrollInStatusBar();


function ThaiDate(){
		now = new Date(); 
		var thday = new Array ("อาทิตย์","จันทร์",
		"อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์"); 
		var thmonth = new Array ("มกราคม","กุมภาพันธ์","มีนาคม",
		"เมษายน","พฤษภาคม","มิถุนายน", "กรกฎาคม","สิงหาคม","กันยายน",
		"ตุลาคม","พฤศจิกายน","ธันวาคม"); 
		
		document.write("วัน" + thday[now.getDay()]+ "ที่ "+ now.getDate()+ " " + 
		thmonth[now.getMonth()]+ " " + (0+now.getYear()+543));
}


