function boldchat_link(accountId, websiteId, departmentId, windowId, liveChatText, chatUnavailableText, walletNumber, walletIdentifier, name, email, phoneNumber) {
    var windowParameters = "vr=" + walletNumber + "&vi=" + walletIdentifier + "&ve=" + email + "&vp=" + phoneNumber + "&vn=" + name + "&lc=";
    var bccbId = Math.random();
    document.write(unescape('%3Cdiv id=' + bccbId + '%3E%3C/div%3E'));
    window._bcvma = window._bcvma || [];
    _bcvma.push(["setAccountID", accountId]);
    _bcvma.push(["setParameter", "WebsiteID", websiteId]);
    _bcvma.push(["setParameter", "CustomUrl", ""]);
    _bcvma.push(["setParameter", "WindowParameters", windowParameters]);
    _bcvma.push(["addText", {
        type: "chat",
        department: departmentId,
        window: windowId,
        available: liveChatText,
        unavailable: chatUnavailableText,
        id: bccbId
    }]);
    var bcLoad = function () {
        if (window.bcLoaded) return;
        window.bcLoaded = true;
        var vms = document.createElement("script");
        vms.type = "text/javascript";
        vms.async = true;
        vms.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + "vmss.boldchat.com/aid/" + accountId + "/bc.vms4/vms.js";
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(vms, s);
    };
    if (window.pageViewer && pageViewer.load)
        pageViewer.load();
    else if (document.readyState == "complete")
        bcLoad();
    else if (window.addEventListener)
        window.addEventListener('load', bcLoad, false);
    else
        window.attachEvent('onload', bcLoad);
}

function boldchat_floating_image(accountId, websiteId, floatId, invitationId, walletNumber, walletIdentifier, name, email, phoneNumber) {
    window._bcvma = window._bcvma || [];
    _bcvma.push(["setAccountID", accountId]);
    _bcvma.push(["setParameter", "WebsiteID", websiteId]);
    _bcvma.push(["setParameter", "InvitationID", invitationId]);
    _bcvma.push(["setParameter", "VisitName", name]);
    _bcvma.push(["setParameter", "VisitPhone", phoneNumber]);
    _bcvma.push(["setParameter", "VisitEmail", email]);
    _bcvma.push(["setParameter", "VisitRef", walletNumber]);
    _bcvma.push(["setParameter", "VisitInfo", walletIdentifier]);
    _bcvma.push(["setParameter", "CustomUrl", ""]);
    _bcvma.push(["setParameter", "WindowParameters", ""]);
    _bcvma.push(["addFloat", {type: "chat", id: floatId}]);
    _bcvma.push(["pageViewed"]);
    var bcLoad = function () {
        if (window.bcLoaded) return;
        window.bcLoaded = true;
        var vms = document.createElement("script");
        vms.type = "text/javascript";
        vms.async = true;
        vms.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + "vmss.boldchat.com/aid/" + accountId + "/bc.vms4/vms.js";
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(vms, s);
    };
    if (window.pageViewer && pageViewer.load)
        pageViewer.load();
    else if (document.readyState == "complete")
        bcLoad();
    else if (window.addEventListener)
        window.addEventListener('load', bcLoad, false);
    else
        window.attachEvent('onload', bcLoad);
}

function boldchat_monitor(accountId, websiteId, invitationId) {
    window._bcvma = window._bcvma || [];
    _bcvma.push(["setAccountID", accountId]);
    _bcvma.push(["setParameter", "WebsiteID", websiteId]);
    _bcvma.push(["setParameter", "InvitationID", invitationId]);
    _bcvma.push(["pageViewed", document.location.href, document.referrer]);
    var bcLoad = function () {
        if (window.bcLoaded) return;
        window.bcLoaded = true;
        var vms = document.createElement("script");
        vms.type = "text/javascript";
        vms.async = true;
        vms.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + "vmss.boldchat.com/aid/" + accountId + "/bc.vms4/vms.js";
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(vms, s);
    };
    if (window.pageViewer && pageViewer.load)
        pageViewer.load();
    else if (document.readyState == "complete")
        bcLoad();
    else if (window.addEventListener)
        window.addEventListener('load', bcLoad, false);
    else
        window.attachEvent('onload', bcLoad);
}