<script language=vbscript Runat=server> 
   sub application_onstart
       application("onlineuser")=0 
   end sub 
   sub session_onstart 
       application.lock 
          application("onlineuser")=application("onlineuser")+1 
       application.unlock 
   end sub 
   sub session_onend 
       application.lock 
         application("onlineuser")=application("onlineuser")-1 
       application.unlock 
   end sub 
</script> 
