expiretimer.xsl from HIP 3.04 UK


<?xml version="1.0"?>
<!--
    Copyright (c) 2001-2002 by epixtech, inc.  All rights reserved.
-->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="no"/>
<xsl:template name="expiretimer">
<xsl:variable name="time"><xsl:value-of select="//expirepage"/></xsl:variable>
<xsl:if test="$time &gt; 0">
<SCRIPT LANGUAGE="JavaScript">
&lt;!&#045;&#045;

    var ip = 'USERIP <xsl:value-of select="//browser/addr"/>';

	function startTimer()
	{
		curUrl = window.location.href;

	    if ( ip.indexOf(" 161.112.253") &gt; 0 ) 
	    {


		if (curUrl.indexOf("startover=true", 0) &lt; 0)
		{    
		  var time= new Date();
	        hours= time.getHours();
	        mins= time.getMinutes();
	        secs= time.getSeconds();
	        closeTime=hours*3600+mins*60+secs;
	        closeTime+=<xsl:value-of select="$time"/>;
	        Timer();
		}
	    }
	}
	function Timer()
	{
	        var time= new Date();
	        hours= time.getHours();
	        mins= time.getMinutes();
	        secs= time.getSeconds();
	        curTime=hours*3600+mins*60+secs;
	        if(curTime>=closeTime)
		{
		        location = "<xsl:value-of select="$host"/>?session=<xsl:value-of select="//session"/>&amp;profile=<xsl:value-of select="//profile"/>&amp;logout=true&amp;startover=true";
		}
		else
		{
			window.setTimeout("Timer()",1000);
		}
	}
//-->
</SCRIPT>
</xsl:if>
</xsl:template>
</xsl:stylesheet>