﻿function showDateVN()
		{
			var strdate;
			var dt = new Date();
			var strarrDay = new Array("Ch&#7911; nh&#7853;t", "Th&#7913; hai", "Th&#7913; ba", "Th&#7913; t&#432;", "Th&#7913; n&#259;m", "Th&#7913; s&#225;u", "Th&#7913; b&#7843;y"); 
			var strarrMonth = new Array("01","02","03","04","05","06","07","08","09","10","11","12"); 
			var strThu = dt.getDay();			
			strThu = strarrDay[strThu] + "&nbsp; ";
			var strDay=dt.getDate();
			if (strDay<10) strDay="0" + strDay
			var strMonth= dt.getMonth();
			strMonth= strarrMonth[strMonth] ;
			var strYears = dt.getYear();
			if (strYears<1900) strYears += 1900;
			strdate= strThu + strDay + "/" + strMonth + "/" + strYears;
			window.document.write (strdate);
		}
function ShowTime()
	{
		var dt = new Date();
		var strMonth = new Array("01","02","03","04","05","06","07","08","09","10","11","12"); 
		var strDay = new Array("Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"); 
		var date = strDay[dt.getDay()] + ", ";
		var years = dt.getYear();
		var days=dt.getDate();
		if (years<1900) years += 1900;
		if (days<10)
			date += "0" + dt.getDate() + "/" + strMonth[dt.getMonth()] + "/" + years;
		else
			date += "" + dt.getDate() + "/" + strMonth[dt.getMonth()] + "/" + years;
			var phut=dt.getMinutes();
			if(phut<10)
			{			
			phut="0"+phut;
			}
if(document.getElementById("timer")!=null)
{
		 document.getElementById("timer").innerHTML=date+", "+dt.getHours()+":"+phut+":"+dt.getSeconds()+" GMT+7";
}
		
	} 

/*
getTime()		Get the number of milliseconds since 01/01/1970 00:00:00
getSeconds()	Get the number of seconds (0-59)
getMinutes()	Get the number of minutes (0-59)
getHours()		Get the number of hours (0-23)
getDay()		Get the day of the week (0 = Sunday, 6 = Saturday)
getDate()		Get the day of the month (1-31)
getMonth()		Get the month number (0 = January, 11 = December)
getYear()		Described below in great detail
*/

function ShowTimeX()
{
	var v = (new Date());
	var h, m, s, Y, M, D, WD, ss;
	
	Y='20'+Right(v.getYear(),2);
	M=v.getMonth()+1;
	D=v.getDate();
	WD=v.getDay();
	
	h = v.getHours();
	m = v.getMinutes();
	s = v.getSeconds();
	
	switch(WD)
	{
	case 0: WD='Ch&#7911; nh&#7853;t'; break;
	case 1: WD='Th&#7913; 2';break;
	case 2: WD='Th&#7913; 3';break;
	case 3: WD='Th&#7913; 4';break;
	case 4: WD='Th&#7913; 5';break;
	case 5: WD='Th&#7913; 6';break;
	case 6: WD='Th&#7913; 7';break;
	}
	if(M<10)M='0'+M;

	ss="".concat((h < 10) ? '0'.concat(h) : h).concat(':').concat((m < 10) ? '0'.concat(m) : m).concat(':').concat((s < 10) ? '0'.concat(s) : s);
	ss= WD+', '+D+'-'+M+'-'+Y + ', ' + ss;
	document.getElementById('td_header_time').innerHTML = ss;
}

function ShowTimeXEN()
{
	var v = (new Date());
	var h, m, s, Y, M, D, WD, ss;
	
	Y='20'+Right(v.getYear(),2);
	M=v.getMonth()+1;
	D=v.getDate();
	WD=v.getDay();
	
	h = v.getHours();
	m = v.getMinutes();
	s = v.getSeconds();
	
	switch(WD)
	{
	case 0: WD='Sunday'; break;
	case 1: WD='Monday';break;
	case 2: WD='Tuesday';break;
	case 3: WD='Wednesday';break;
	case 4: WD='Thursday';break;
	case 5: WD='Friday';break;
	case 6: WD='Saturday';break;
	}
	if(M<10)M='0'+M;

	ss="".concat((h < 10) ? '0'.concat(h) : h).concat(':').concat((m < 10) ? '0'.concat(m) : m).concat(':').concat((s < 10) ? '0'.concat(s) : s);
	ss= WD+', '+D+'-'+M+'-'+Y + ', ' + ss;
	document.getElementById('td_header_time').innerHTML = ss;
	
}
   
