<html>
<head>
<title>Abakada DHTML Demo: A Simple Clock</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<script language="JavaScript">
<!--
function setClock ( ) {
setInterval ( tick, 1000 );
}
var ratio = 4;
function tick ( ) {
var s = Date ( );
var t = s.substring ( 11, 19 );
var doc_height = document.body.offsetHeight / 2;
var doc_width = document.body.offsetWidth / 2;
if ( ( doc_height * ratio ) > doc_width )
doc_height = doc_width / ratio;
theTime.innerText = t;
theTime.style.fontSize = doc_height;
}
//-->
</script>
</head>
<body onload="setClock ( )">
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada DHTML Demo: A Simple Clock</h2></div>
<hr size=1 width=92%>
<div align="center">
<p id="msg">This example demonstrates a simple clock that adjusts the size of its readout to fit the current width and height of the document body. Resize this window to see. </p>
<div id="theTime" style="font: bold arial; color: steelblue"></div>
</div>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>