<script language="JavaScript">
<!--
   // alert before session end
   var remainingseconds=@@@REMAININGSECONDS@@@;
   var url = "@@@PREFSURL@@@?action=timeoutwarning&sessionid=@@@SESSIONID@@@";
   var tid;

   function timeoutwarning () {
      var hWnd = window.open(url,"_timeoutwarning","width=400,height=140,resizable=no,scrollbars=no");
      hWnd.focus();
   }
   function timeoutcheck () {
      remainingseconds=remainingseconds-1;
      if (remainingseconds >= 65) {
         tid=setTimeout("timeoutcheck()", 1*1000);
      } else if (remainingseconds > 0 ) {
         clearTimeout(tid);
         timeoutwarning();
         @@@JSCODE@@@
      }
   }

   timeoutcheck();
//-->
</script>
