+function do_refresh() {
+ mpc_refresh();
+ refresh_id = window.setTimeout(do_refresh, window['opts_refresh'].value * 1000);
+}
+
+function update_refresh_timer() {
+ if (!isNaN(refresh_id))
+ window.clearTimeout(refresh_id);
+ var rate = window['opts_refresh'].value * 1000;
+ if (rate > 0)
+ refresh_id = window.setTimeout(do_refresh, rate);
+}
+