Surfbar now has start/stop button
[mailer.git] / templates / de / html / surfbar / surfbar_frame_top.tpl
index 7c6f3abbc3ccbbae151cfa35d0ce8dba770a6744..13377cde2efa2941ef67a86a25d13967784975b1 100644 (file)
@@ -9,6 +9,7 @@
 
                &raquo;<a href="$content[url]" target="_blank">Aktuelle Seite in neuem
                Fenster &ouml;ffnen</a>&laquo;&nbsp;<span class="surfbar_navi">[<a
+                href="#" onclick="return StartStopCounter();" id="start">Anhalten</a>|<a
                 target="_parent" href="{!URL!}/login.php">Loginbereich</a>|<a
                 target="_parent" href="{!URL!}/modules.php?module=login&amp;what=logout">Ausloggen</a>|<a
                 href="javascript:window.close()">Schliessen</a>]</span><br />
@@ -24,6 +25,19 @@ var maxCounter = "$content[reload]";
 var counter = document.getElementById("surfbar_counter");
 var countDown = null;
 
+function StartStopCounter () {
+       if (countDown == null) {
+               // Start counter
+               document.getElementById("start").innerHTML = "Anhalten";
+               countDown = window.setInterval("StartCounter()", 1000);
+       } else {
+               document.getElementById("start").innerHTML = "Weiter";
+               window.clearInterval(countDown);
+               countDown = null;
+       }
+       return false;
+}
+
 function Init() {
        countDown = window.setInterval("StartCounter()", 1000);
        window.setTimeout("InitCounter()", 500);