- printf("<script id='hs%d' type='text/javascript'>
-push(\"$('cont').innerHTML += '%s %d';\");
-</script>", $i, ($first ? "<br/>" : ""), $i);
+
+printf("<script id='hs%d' type='text/javascript'>
+push(\"$('cont').innerHTML += '%s %d'; gst.st = %d;\");
+</script>", $i, ($first ? "<br/>" : ""), $i, $i);