
function UpdateClock(div_tag_id)
{
	var str, TimeGMT_1,TimeGMT_2, strTime, strTimeCut, hoursVN, hoursGMT, minutes, seconds,tam
	
	TimeGMT_1 = new Date();	
	str = TimeGMT_1.toGMTString()	
	strTimeCut = str.substring(str.indexOf("UTC"),0)	
	TimeGMT_2 = new Date(strTimeCut);
		
	hoursGMT = TimeGMT_2.getHours()
	minutes = TimeGMT_2.getMinutes()
	seconds = TimeGMT_2.getSeconds()
	hoursVN = hoursGMT + 7;
	
	if (TimeGMT_2.getMinutes() <10) {
		minutes = "0"+TimeGMT_2.getMinutes()
	}
	if (TimeGMT_2.getSeconds() <10)	{
		seconds = "0"+TimeGMT_2.getSeconds()
	}
	
	if (hoursVN < 12) {
		strTime = hoursVN + ":"+minutes+":"+seconds +" AM";	
	} 
	else {
		hoursVN = hoursVN - 12;
		strTime = hoursVN + ":"+minutes+":"+seconds +" PM";	
	}
	document.getElementById(div_tag_id).innerHTML = strTime;
	window.setTimeout('UpdateClock("' + div_tag_id + '")',1000); 
}