var interval = null;
-var counter = "$content[restart]";
+var countDown = "{?surfbar_restart_time?}";
var timer = document.getElementById("surfbar_counter");
var buttonDiv = document.getElementById("surfbar_button");
-function Restart () {
+function restart () {
this.location.reload();
}
-function ShowButton () {
- buttonDiv.innerHTML = "<form accept-charset='utf-8' action='{?URL?}/surfbar.php' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' id='member_submit' value='Surfbar erneut starten' /></form>";
+function showButton () {
+ buttonDiv.innerHTML = "<form accept-charset='UTF-8' action='{%url=surfbar.php%}' target='_self' method='GET'><input type='hidden' name='frame' value='top' /><input type='submit' id='form_submit' value='Surfbar erneut starten' /></form>";
}
-function Counter () {
- if (counter == 0) {
- if ($content[autostart] == true) {
- Restart();
+function counter () {
+ if (countDown == 0) {
+ if ({%get=autostart%} == true) {
+ restart();
} else {
- ShowButton();
+ showButton();
}
window.clearInterval(interval);
} else {
- counter--;
- timer.innerHTML = counter;
+ countDown--;
+ timer.innerHTML = countDown;
}
}
-function Init () {
- interval = window.setInterval("Counter()", 1000);
- timer.innerHTML = "$content[restart]";
+function init () {
+ interval = window.setInterval("counter()", 1000);
+ timer.innerHTML = "{?surfbar_restart_time?}";
}
-window.setTimeout("Init()", 500);
+window.setTimeout("init()", 500);