var interval = null;
-var counter = "$content[restart]";
+var countDown = "$content[restart]";
var timer = document.getElementById("surfbar_counter");
var buttonDiv = document.getElementById("surfbar_button");
-function Restart () {
+function restart () {
this.location.reload();
}
-function ShowButton () {
+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 Counter () {
- if (counter == 0) {
+function counter () {
+ if (countDown == 0) {
if ($content[autostart] == true) {
- Restart();
+ restart();
} else {
- ShowButton();
+ showButton();
}
window.clearInterval(interval);
} else {
- counter--;
- timer.innerHTML = counter;
+ countDown--;
+ timer.innerHTML = countDown;
}
}
-function Init () {
- interval = window.setInterval("Counter()", 1000);
+function init () {
+ interval = window.setInterval("counter()", 1000);
timer.innerHTML = "$content[restart]";
}
-window.setTimeout("Init()", 500);
+window.setTimeout("init()", 500);