Constant SECS and MINS are now deprecated/removed, surfbar extended with static costs...
[mailer.git] / templates / de / html / mailid / mailid_timer.tpl
index ef4fc9053d84c28dd756991b8f8d1acfe0090851..a99bc96a107255d98b26bfcfa617bf251d2bb050 100644 (file)
@@ -1,19 +1,20 @@
 <SCRIPT language="JavaScript" type="text/javascript">
 <!--
-var Timer = "{--_TIME_VALUE--}";
+var Timer = "{--_TIME_VALUE!}";
 
-function Init()
-{
+function Init() {
        var Counter = window.setInterval("StartCounter()", 1000);
 }
 
-function StartCounter()
-{
+function StartCounter() {
+       if (Timer < 1) {
+               return false;
+       }
+
        Timer--;
        document.confirm.counter.value = Timer;
-       if (Timer == 0)
-       {
-               document.location.href="{!URL!}/mailid_top.php?uid={!_UID_VALUE!}&{!_TYPE_VALUE!}={!_DATA_VALUE!}&mode=confirm&code={--_RAND_VALUE--}";
+       if (Timer == 0) {
+               document.location.href="{!URL!}/mailid_top.php?uid={!_UID_VALUE!}&{!_TYPE_VALUE!}={!_DATA_VALUE!}&mode=confirm&code={--_RAND_VALUE!}";
                clearInterval(Counter);
        }
 }
@@ -33,8 +34,8 @@ function StartCounter()
                                <TD align="center">
                                <FORM name="confirm" style="margin-top: 0px; margin-bottom: 0px">
                                {--MEMBER_TIME_COUNTER_1--} <INPUT type="text" name="counter"
-                                       size="{--_TIM2_VALUE--}" readonly class="member_normal"
-                                       value="{--_TIME_VALUE--}">&nbsp;{--SECS--}
+                                       size="{--_TIM2_VALUE!}" readonly class="member_normal"
+                                       value="{--_TIME_VALUE!}">&nbsp;{--_SECONDS--}
                                {--MEMBER_TIME_COUNTER_2--}</FORM>
                                </TD>
                        </TR>