For counting the visitor's time on your page Use the following code:
<SCRIPT LANGUAGE="javascript">