1 var currCounter = "{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}";
2 var maxCounter = "{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}";
3 var counter = document.getElementById("surfbar_counter");
4 var points = document.getElementById("surfbar_points");
5 var reload = document.getElementById("surfbar_reload");
6 var max = document.getElementById("surfbar_max");
9 function startStopCounter () {
10 if (countDown == null) {
12 document.getElementById("start").innerHTML = "{--MEMBER_SURFBAR_ACTION_PAUSE_SUBMIT--}";
13 countDown = window.setInterval("startCounter()", 1000);
15 document.getElementById("start").innerHTML = "{--MEMBER_SURFBAR_ACTION_UNPAUSE_SUBMIT--}";
16 window.clearInterval(countDown);
23 countDown = window.setInterval("startCounter()", 1000);
24 window.setTimeout("initCounter()", 500);
28 if (parent.surfbar_url != null) {
29 // Is in right frameset
30 parent.surfbar_url.location.href = "{%url=surfbar.php?id=$content[url_id]&check={%pipe,SURFBAR_GENERATE_VALIDATION_CODE=$content[url_id]%}&salt={%pipe,SURFBAR_GET_SALT%}%}";
32 // Called frame=top directly
33 window.location.href = "{%url=surfbar.php%}";
37 function reloadSurfbar () {
38 if (parent.surfbar_stats != null) {
39 // Is in right frameset
40 parent.surfbar_stats.location.reload();
42 // Called frame=top directly
43 window.location.href = "{%url=surfbar.php%}";
45 this.location.reload();
48 function initCounter () {
49 if (parent.surfbar_url != null) {
50 // Is in right frameset
51 parent.surfbar_url.location.href = '{%pipe,SURFBAR_GET_URL=$content[url_id]%}';
53 // Called frame=top directly
54 window.location.href = "{%url=surfbar.php%}";
57 counter.innerHTML = "{%pipe,SURFBAR_GET_RELOAD_TIME=$content[url_id]%}";
58 points.innerHTML = "{%pipe,SURFBAR_GET_REWARD,translateComma=$content[url_id]%}";
59 reload.innerHTML = "{%pipe,SURFBAR_GET_USER_LOCKS%}";
60 max.innerHTML = "{%pipe,SURFBAR_GET_TOTAL_URLS%}";
63 function startCounter () {
64 if (currCounter < 1) {
69 counter.innerHTML = currCounter;
71 if (currCounter == 0) {
72 clearInterval(countDown);
74 window.setTimeout("reloadSurfbar()", 500);