function msieversion()
{
	var ua = window.navigator.userAgent
	var msie = ua.indexOf ( "MSIE " )
        
	if ( msie > 0 )		
		return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )
	else
		return 0
}
window.IEVersion=msieversion()
window.RunningIE4=(window.IEVersion >=4);
now = new Date()
hour = now.getHours()
   if (window.RunningIE4 == true) {
      	document.write('<img src="/pict/header/line_a.gif"><img src="/pict/header/line_b.jpg" height="15" width="250"><img src="/pict/header/line_c.gif">');
	document.write("<font style='font-size=10pt' face='Verdana,MS Sans Serif,Arial,Helvetica' color='#4494dd' id=Clock></font>")
	function tick() {
	  var hours, minutes, seconds, ap;
	  var intDate, intMonth, intYear, intHours, intMinutes, intSeconds;
	  var today;

	  today = new Date();
          intDate = today.getDate();
          intMonth = today.getMonth()+1;
          intYear = today.getYear();

          intHours = today.getHours();
	  intMinutes = today.getMinutes();
	  intSeconds = today.getSeconds();
	  if (intHours == 0) {
	     hours = "12:";
	     ap = "午夜 ";
	  } else if (intHours < 12) { 
	     hours = intHours+":";
	     ap = "早上 ";
	  } else if (intHours == 12) {
	     hours = "12:";
	     ap = "中午 ";
	  } else {
	     intHours = intHours - 12
	     hours = intHours + ":";
	     ap = "下午 ";
	  }

	  if (intMinutes < 10) {
	     minutes = "0"+intMinutes+":";
	  } else {
	     minutes = intMinutes+":";
	  }

	  if (intSeconds < 10) {
	     seconds = "0"+intSeconds+" ";
	  } else {
	     seconds = intSeconds+" ";
	  } 

	  timeString = Date();
	  timeString = "&nbsp;"+intDate+"/"+intMonth+"/"+intYear+"  "+ap+hours+minutes+seconds;
          //timeString = "&nbsp;"+hours+minutes+seconds;
          Clock.innerHTML = timeString;
	  window.setTimeout("tick();", 100);
	}

	window.onload = tick;
   }
   else {
	document.write('<img src="/pict/header/line_a.gif"><img src="/pict/header/line_b.jpg" height="15" width="250"><img src="/pict/header/line_c.gif">');
	if (hour < 12) {
	        document.write("早安, " + now.toLocaleString())
	} else if (hour < 18){
	        document.write("午安, " + now.toLocaleString())
	} else if (hour >= 18) {
		document.write("晚安, " + now.toLocaleString())
	} 
	
   }



