﻿function dateTime()
{
d = new Date()
dateText = ""
// Get the cuurent day and convert it to the name of the day
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"
// Get the current date; if it's before 2000,add 1900
dateText += ", " + ((d.getDate() < 10) ? ("0" + d.getDate()) : d.getDate())
// Get the current month and convert it to the name of the month
monthValue = d.getMonth()
dateText += "/"
if (monthValue == 0)
dateText += "01"
if (monthValue == 1)
dateText += "02"
if (monthValue == 2)
dateText += "03"
if (monthValue == 3)
dateText += "04­"
if (monthValue == 4)
dateText += "05"
if (monthValue == 5)
dateText += "06"
if (monthValue == 6)
dateText += "07"
if (monthValue == 7)
dateText += "08"
if (monthValue == 8)
dateText += "09"
if (monthValue == 9)
dateText += "10"
if (monthValue == 10)
dateText += "11"
if (monthValue == 11)
dateText += "12"
// Get the current year; if it's before 2000, add 1900
if (d.getYear() < 2000)
dateText += "/" + (1900 + d.getYear())
else
dateText += "/" + (d.getYear())

// Customize the greeting based on the current hours
hoursValue=d.getHours()
if (hoursValue < 10)
hoursValue="0"+hoursValue
// Get the current minutes
minuteValue = d.getMinutes()
secValue=d.getSeconds()
if (minuteValue < 10)
minuteValue="0"+ minuteValue
if (secValue < 10)
secValue="0"+secValue
// Get the current hours

dateText +=", "+hoursValue +":"+minuteValue + ":" + secValue

// Write the greeting, the date, and the time to the page
        document.getElementById('header').innerHTML = dateText + " GMT+7";
        setTimeout('dateTime()', 1000);
}
function getYear()
{
    d = new Date() 
    document.write(d.getFullYear());
}
function showcomment(id){
    if(document.getElementById(id).style.display=='')
    {
        document.getElementById(id).style.display='none';
    }
    else{
        document.getElementById(id).style.display='';
    }
}
function reloadCaptcha(){	
	$('#ctl00_ContentPlaceHolder1_wc_comments1_Captcha').attr({ src : '../captcha.aspx' + '?c=' + Math.random()});		
}