gtag('event', 'bsbload', {
  'lwcourse': myLWCrs,
  'lwformat': myLWFmt,
  'lwversion': myLWVer,
  'lwpart': myLWPrt,
  page_path: myLWPge
});


function loadFile(url, timeout, callback) {
    var args = Array.prototype.slice.call(arguments, 3);
    var xhr = new XMLHttpRequest();
    xhr.ontimeout = function () {
        //console.error("The request for " + url + " timed out.");
    };
    xhr.onload = function() {
        if (xhr.readyState === 4) {
            if (xhr.status === 200) {
                callback.apply(xhr, args);
            }
        }
    };
    xhr.open("GET", url, true);
    xhr.timeout = timeout;
    xhr.send(null);
}

function showMessage (message) {
//    console.log(message + this.responseText);
}

var req="https://www.liggywebb.com/bsblms.gif?v=" + myLWVer + "&c=" + encodeURIComponent(myLWCrs) + "&f=" + myLWFmt + "&p=" + myLWPrt + "&dt=" + (new Date()).getTime();
loadFile(req, 1000, showMessage, "version\n");
