javascript动态显示时间

<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<TITLE>我的天空之中客统一战线 </TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language=javascript>
var qq=0;
function view1(){
//var tx=new data
window.open("main.htm","天上人间");
body1.innerText="  中国人不打中国人!为了祖国的和平统一和免受帝国的侵扰,我将用以我的一切包括生命去捍卫它!保卫它的尊严与荣誉!王玮是我们的榜样,它的血不能白流。美国得为它的行为负责!在这个世界上没有一个国家感对美国说不,它很强大,令你畏惧,我们不怕.我们有勇气和它斗争!直到死亡,我们还是不怕!血肉之躯何所惧。"
 
}
</script>
<SCRIPT LANGUAGE="JScript">
function reportMove() {
  window.status = "X=" + window.event.x + " Y=" + window.event.y;
}
</SCRIPT>



<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--


function document_onmousemove() {
reportMove();

}



function document_onmouseup() {
alert("mouse up");
//d();
}

function document_onstop() {
alert("on_stop");
}

function window_onerror() {
alert("script error!");
}

//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=onmousemove>
<!--
//alert("dfsdf__move");
document_onmousemove()
//-->
</SCRIPT>
<script language=javascript for=window event=onload>

d();
view1();
</script>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=onmouseup>
<!--
document_onmouseup()
//-->
</SCRIPT>
<SCRIPT LANGUAGE=javascript FOR=document EVENT=onstop>
<!--
alert("would you want to leave this page!!");
document_onstop()
//-->
</SCRIPT>
<script language="javascript">
function d(){


if(!document.layers &&! document.all)
return 0;

var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
showq(hours,minutes,seconds);
if(hours>12){
dn="FM"
hours=hours-12
}
if(hours==0)
hours=12
if(minutes<=9)
minutes="0"+minutes
if(seconds<=9)
seconds="0"+seconds
myclock="<font size='5',face='arial'><b><font size='1'>Current time is:</font></br>"+hours+":"+minutes+":"+seconds+" "+dn+" </b></font>"
if(document.layers){
document.layers.liveclock.document.write(myclock)
liveclock.document.write(myclock)
document.layers.liveclock.document.close()
}
else if(document.all)
liveclock.innerHTML=myclock

setTimeout("d()",500);

}


</script>
<script language=javascript>
<!--

function showq( hour ,min, sec){


var a=new Array()

for( var i=0;i<10;i++){
a[i]=new Image()
a[i].src="tif\\dgt"+i+".gif"
}
var am=new Image()
var pm=new Image();
am.src="tif\\dgta.gif"
pm.src="tif\\dgtp.gif"
if(hour<11)
document["amPM"].src=am.src

else
document["amPM"].src=pm.src
if(hour<10){
document["tensHour"].src=a[0].src
document["Hour"].src=a[hour].src
}
if(hour>=10){
document["tensHour"].src=a[parseInt(hour/10,10)].src
document["Hour"].src=a[hour%10].src
}
if(min<10){
document["tensMin"].src=a[0].src
document["Min"].src=a[min%10].src
}
if(min>=10){
document["tensMin"].src=a[parseInt(min/10,10)].src
document["Min"].src=a[min%10].src
}
if(sec<10){
document["tensSec"].src=a[0].src
//document.write(sec)
document["Sec"].src=a[sec%10].src
}
if(sec>=10){
document["tensSec"].src=a[parseInt(sec/10,10)].src
document["Sec"].src=a[sec%10].src
}


}
//-->
</script>

</HEAD>
<BODY bgcolor="#881111" >
<P>

<span id="liveclock" style="LEFT: 30px; POSITION: absolute; TOP: 80px"> </span>&nbsp;&nbsp;
<marquee truespeed style="COLOR: #ff5533" id=MARQUEE1><font size="5">欢&nbsp;&nbsp; 迎&nbsp;&nbsp; 来&nbsp;        
&nbsp;到&nbsp;&nbsp; 天&nbsp;&nbsp; 上&nbsp;&nbsp; 人&nbsp;&nbsp; 间——<FONT        
size=3>我的天空之中客统一战线</FONT>        
          
</font></marquee>&nbsp;        
        
        
<span id=wer style="COLOR: red"  ></P><div align=center><img name="tensHour" WIDTH="16" HEIGHT="21"><img name="Hour" WIDTH="16" HEIGHT="21"><IMG height=21 src="tif\dgtcol.gif" width=7><img name="tensMin" WIDTH="16" HEIGHT="21"><img name="Min" WIDTH="16" HEIGHT="21"><IMG height=21 src="tif\dgtcol.gif" width=7><img name="tensSec" WIDTH="16" HEIGHT="21"><img name="Sec" WIDTH="16" HEIGHT="21"><IMG height=21 src="tif\dgtbl.gif" width=16><img name="amPM" WIDTH="16" HEIGHT="21"></div></SPAN>        
<span id="clender" style="LEFT: 600px; POSITION: absolute; TOP: 60px">        
<OBJECT id=Calendar1 style="LEFT: 0px; TOP: 0px"        
classid=clsid:8E27C92B-1264-101C-8A2F-040224009C02><PARAM NAME="_Version" VALUE="524288"><PARAM NAME="_ExtentX" VALUE="7620"><PARAM NAME="_ExtentY" VALUE="5080"><PARAM NAME="_StockProps" VALUE="1"><PARAM NAME="BackColor" VALUE="-2147483633"><PARAM NAME="Year" VALUE=""><PARAM NAME="Month" VALUE=""><PARAM NAME="Day" VALUE=""><PARAM NAME="DayLength" VALUE="0"><PARAM NAME="MonthLength" VALUE="0"><PARAM NAME="DayFontColor" VALUE="0"><PARAM NAME="FirstDay" VALUE="1"><PARAM NAME="GridCellEffect" VALUE="1"><PARAM NAME="GridFontColor" VALUE="10485760"><PARAM NAME="GridLinesColor" VALUE="-2147483632"><PARAM NAME="ShowDateSelectors" VALUE="-1"><PARAM NAME="ShowDays" VALUE="-1"><PARAM NAME="ShowHorizontalGrid" VALUE="-1"><PARAM NAME="ShowTitle" VALUE="-1"><PARAM NAME="ShowVerticalGrid" VALUE="-1"><PARAM NAME="TitleFontColor" VALUE="10485760"><PARAM NAME="ValueIsNull" VALUE="0"></OBJECT>        
</span>        
<span width="240" height="150" #ff0000?? style ="LEFT: 40px; POSITION: absolute; TOP: 300px"><font color=red size="2"><marquee color="#ff0000" bgcolor="#993322" id=body1 truespeed=55 scrolldelay=250 width=240 height=150 direction="up"></marquee></font></span>        
<P>&nbsp;</P>        
        
</BODY>        
</HTML>