#!/usr/local/bin/python

import sys
import time

print "Content-type: text/html\n"



print """
<HTML>
<HEAD>
<title>Web application 'monitor' demonstration</title>
</HEAD>
<BODY>    
<p id ="x1">Replace me.</p>
<P>You need IE 5.5, Netscape 6, latest (?) Galeon, or Mozilla 0.9.5, or greater, to see this effect.

<hr>This demonstration brought to you by <A HREF = "http://phaseit.net/">Phaseit, Inc.</A>


</body>
"""

print """<script language="JavaScript" type="text/javascript">
    myP=document.getElementById("x1");
    myTextNode=myP.childNodes[0];
    </script>
"""

while 1:
   time.sleep(1)
   print "<script>"
   display = time.ctime(time.time())
   print "    myTextNode.data = 'The time at the server is %s.'" % display
   print "</script>"
   sys.stdout.flush()


# NPH stands for non-parsed header.

 # opera 7
