") + "//" +
        document.location.host + "/ws";
    }


    // the WAMP connection to the Router
    //
    var connection = new autobahn.Connection({
        url: wsuri,
        realm: "realm1"
    });


    // timers
    //
    var t1, t2;


    // fired when connection is established and session attached
    //
    connection.onopen = function (session, details) {

        console.log("Connected");

        // SUBSCRIBE to a topic and receive events
        //
        function on_counter(args) {
    