<!--

DaysofWeek = new Array()
DaysofWeek[0]="วันอาทิตย์"
DaysofWeek[1]="วันจันทร์"
DaysofWeek[2]="วันอังคาร"
DaysofWeek[3]="วันพุธ"
DaysofWeek[4]="วันพฤหัสบดี"
DaysofWeek[5]="วันศุกร์"
DaysofWeek[6]="วันเสาร์"

Months = new Array()
Months[0]="มกราคม"
Months[1]="กุมภาพันธ์"
Months[2]="มีนาคม"
Months[3]="เมษายน"
Months[4]="พฤษภาคม"
Months[5]="มิถุนายน"
Months[6]="กรกฎาคม"
Months[7]="สิงหาคม"
Months[8]="กันยายน"
Months[9]="ตุลาคม"
Months[10]="พฤศจิกายน"
Months[11]="ธันวาคม"


function fixNumber(the_number){
	if (the_number < 10){
		the_number = "0" + the_number;
		}
	return the_number;
}

function fixPMHours(the_number){
	if (the_number>12){
		the_number = the_number - 12;
		}
	return the_number;
} 

	
	var	dayVal;
	var timeVal=new Date()
	var m=timeVal.getMinutes()
	var h=timeVal.getHours()
	var fixed_hour = fixPMHours(h);
	var da=timeVal.getDate()
	var mo=timeVal.getMonth()
	var year=timeVal.getYear() + 543
	var showDay=DaysofWeek[timeVal.getDay()]
	var showMonth=Months[timeVal.getMonth()]
	var fixed_minute = fixNumber(m);
	var the_time = fixed_hour + ":" + fixed_minute;
	var the_date = (showDay+"  "+ da + "  " + showMonth + "  " + year+"  ")

function showTime(){
	var timeValue = the_date;
//	var timeValue = the_date+" "+the_time;
//	timeValue +=(h >= 12) ? " p.m." : " a.m.";
	document.write(timeValue);
}

//-->

<!--This is one of many scripts which are available at: *---
//--http://www.JavaScript.nu?javascript *---
//--This script is FREE, but you MUST let these lines *---
//--remain if you steal this script. *---

function bookmark(url, description)
{
//***---This text will be shown to the visitor if it has Netscape.
netscape="First push OK and then hit CTRL+D to add a bookmark to this site."

if (navigator.appName=='Microsoft Internet Explorer')
{
window.external.AddFavorite(url, description);
}
else if (navigator.appName=='Netscape')
{
alert(netscape);
}
}

/*************************************************************************\
boolean isNum(String argvalue)
return true if argvalue contains only numeric characters,
else return false.
\*************************************************************************/
function isNum(argvalue) {
argvalue = argvalue.toString();

if (argvalue.length == 0)
return false;

for (var n = 0; n < argvalue.length; n++){
	 if(argvalue.substring(n, n+1) != ".") 
		 if (argvalue.substring(n, n+1) < "0" || argvalue.substring(n, n+1) > "9")
			   return false;
}

return true;
};
//-->
