var spmsVars = {} || spmsVars;
spmsVars = {
    siteId: 8572032,
    spmsBaseUrl: (("https:" == document.location.protocol) ? "https://" : "http://") + ((document.location.host.substring(0, 4) != "www.") ? 'test.' : '') + 'spms.' + document.location.host.substring(document.location.host.indexOf(".") + 1),
    caParams: new Array(),
    addCa: function (key, value) {
        this.caParams.push([key, value]);
    },
    callCa: function () {
        if (typeof (spms) != "undefined" && spms != null) {
            spms._ca(this.caParams);
            this.caParams = new Array();
        }
    },
    spmsParams: new Array(),
    addSpms: function (key, value) {
        spmsVars.spmsParams.push([key, value]);
    },
    callSpms: function () {
        if (typeof (spms) != "undefined" && spms != null) {
            spms._call(this.spmsParams);
            this.spmsParams = new Array();
        }
    },
    _requestSequenceCookieName: "spms_req=",
    _increaseSequence: function () {
        var seq = this._getSequenceFromCookie();
        seq = seq + 1;
        document.cookie = this._requestSequenceCookieName + seq + "; path=/";
    },
    _getSequenceFromCookie: function () {
        var returnvalue = "0";
        var search = this._requestSequenceCookieName;        
        if (document.cookie.length > 0) {
            offset = document.cookie.indexOf(search);
            if (offset != -1) {
                offset += search.length;
                end = document.cookie.indexOf(";", offset);
                if (end == -1) end = document.cookie.length;
                returnvalue = document.cookie.substring(offset, end);
                returnvalue = parseInt(returnvalue);
            }
        }
        return returnvalue;
    }
};

try {
    spmsVars._increaseSequence();
} catch (err) {
}



