﻿
function UpdateClocks()
{
	// www.timeanddate.com/worldclock
	var ct = new Date();
	document.all.Clock.innerHTML =	'<font color="darkblue">' + ClockString(ct) + '</font>' ;
	window.setTimeout("UpdateClocks()", 1001) ;
}

function ClockString(dt)
{
	var stemp, ampm ;
	var dt_year = dt.getFullYear() ;
	var dt_month = dt.getMonth() + 1 ;
	var dt_day = dt.getDate() ;
	var dt_hour = dt.getHours() ;
	var dt_minute = dt.getMinutes() ;
	var dt_second = dt.getSeconds() ;

	dt_year = dt_year.toString() ;
	if (0 <= dt_hour && dt_hour < 12)
	{
		ampm = 'AM' ;
		if (dt_hour == 0) dt_hour = 12 ;
	} else {
		ampm = 'PM' ;
		dt_hour = dt_hour - 12 ;
		if (dt_hour == 0) dt_hour = 12 ;		
	}
	if (dt_minute < 10)
		dt_minute = '0' + dt_minute ;
	if (dt_second < 10)
		dt_second = '0' + dt_second ;
	stemp = dt_year+'年'+dt_month + '月' + dt_day + '日';
	stemp = stemp + ' ' + dt_hour + ":" + dt_minute + ":" + dt_second + ' ' + ampm ;
	return stemp ;
}

function movepic(img_name,img_src) {
document[img_name].src=img_src;
}

function LoadFlash(url,wmode,width,Height)
{ 
document.write(
  '<embed src="' + url + '" wmode=' + wmode +
  ' quality="high" pluginspage=http://www.macromedia.com/go/getflashplayer type="application/x-shockwave-flash" width="' + width + 
  '" height="' + Height + '"></embed>');   
}


// End -->
