d = new Date();
dateText = "";
dayValue = d.getDay();
if (dayValue == 0)
    dateText += "Chủ Nhật";
else if (dayValue == 1)
    dateText += "Thứ hai";
else if (dayValue == 2)
    dateText += "Thứ ba";
else if (dayValue == 3)
    dateText += "Thứ tư";
else if (dayValue == 4)
    dateText += "Thứ năm";
else if (dayValue == 5)
    dateText += "Thứ sáu";
else if (dayValue == 6)
    dateText += "Thứ bảy";
dateText += " " + d.getDate() + "/";
monthValue = d.getMonth();
dateText += "";
if (monthValue == 0)
   // dateText += "January";
	dateText += "01";
if (monthValue == 1)
   // dateText += "February";
   dateText += "02";
if (monthValue == 2)
    //dateText += "March";
	dateText += "03";
if (monthValue == 3)
    //dateText += "April";
	dateText += "04";
if (monthValue == 4)
   // dateText += "May";
   dateText += "05";
if (monthValue == 5)
   // dateText += "June";
   dateText += "06";
if (monthValue == 6)
   // dateText += "July";
   dateText += "07";
if (monthValue == 7)
   // dateText += "August";
   dateText += "08";
if (monthValue == 8)
   // dateText += "September";
   dateText += "09";
if (monthValue == 9)
  //  dateText += "October";
  dateText += "10";
if (monthValue == 10)
   // dateText += "November";
   dateText += "11";
if (monthValue == 11)
   // dateText += "December";
   dateText += "12";

if (navigator.appName.indexOf('Microsoft') != -1){
	dateText += "/" + (0000 + d.getYear());
}else if (navigator.appName.indexOf('Netscape') != -1){
	//dateText += "/" + d.getDate() + "/" + (1900 + d.getYear());
	dateText += "/" + (1900 + d.getYear());
}

minuteValue = d.getMinutes();
if (minuteValue < 10)
    minuteValue = "0" + minuteValue;
hourValue = d.getHours();
if (hourValue < 12)
    {
		greeting = "Good morning!";
		//timeText = " at " + hourValue + ":" + minuteValue + " AM. Welcome to our site.";
		timeText = " - " + hourValue + ":" + minuteValue + " AM";
    }
else if (hourValue == 12)
    {
		greeting = "Good afternoon!";
		//timeText = " at " + hourValue + ":" + minuteValue + " PM. Welcome to our site.";
		timeText = " at " + hourValue + ":" + minuteValue + " PM";
    }
else if (hourValue < 17)
    {
		greeting = "Good afternoon!";
		//timeText = " at " + (hourValue-12) + ":" + minuteValue + " PM. Welcome to our site.";
		timeText = " at " + (hourValue-12) + ":" + minuteValue + " PM";
    }
else
    {
		greeting = "Good evening!";
		//timeText = " at " + (hourValue-12) + ":" + minuteValue + " PM. Welcome to our site.";
		timeText = " at " + (hourValue-12) + ":" + minuteValue + " PM";
    }
document.open();
//document.write(greeting + " It's " + dateText + timeText);
//document.write(dateText + timeText);
document.write(dateText);
