var mboxCopyright = "&copy; 1996-2008. Omniture, Inc. All rights reserved.";
mboxUrlBuilder = function(a, b) {
    this.a = a;
    this.b = b;
    this.c = new Array();
    this.d = function(e) {
        return e;
    };
    this.f = null;
};
mboxUrlBuilder.prototype.addParameter = function(g, h) {
    var i = new RegExp('(\'|")');
    if (i.exec(g)) {
        throw "Parameter '" + g + "' contains invalid characters";
    }
    for (var j = 0; j < this.c.length; j++) {
        var k = this.c[j];
        if (k.name == g) {
            k.value = h;
            return this;
        }
    }
    var l = new Object();
    l.name = g;
    l.value = h;
    this.c[this.c.length] = l;
    return this;
};
mboxUrlBuilder.prototype.addParameters = function(c) {
    if (!c) {
        return this;
    }
    for (var j = 0; j < c.length; j++) {
        var m = c[j].indexOf('=');
        if (m == -1 || m == 0) {
            continue;
        }
        this.addParameter(c[j].substring(0, m), c[j].substring(m + 1, c[j].length));
    }
    return this;
};
mboxUrlBuilder.prototype.setServerType = function(n) {
    this.o = n;
};
mboxUrlBuilder.prototype.setBasePath = function(f) {
    this.f = f;
};
mboxUrlBuilder.prototype.setUrlProcessAction = function(p) {
    this.d = p;
};
mboxUrlBuilder.prototype.buildUrl = function() {
    var q = this.f ? this.f: '/m2/' + this.b + '/mbox/' + this.o;
    var r = document.location.protocol == 'file:' ? 'http:': document.location.protocol;
    var e = r + "//" + this.a + q;
    var s = e.indexOf('?') != -1 ? '&': '?';
    for (var j = 0; j < this.c.length; j++) {
        var k = this.c[j];
        e += s + k.name + '=' + encodeURIComponent(k.value);
        s = '&';
    }
    return this.t(this.d(e));
};
mboxUrlBuilder.prototype.getParameters = function() {
    return this.c;
};
mboxUrlBuilder.prototype.setParameters = function(c) {
    this.c = c;
};
mboxUrlBuilder.prototype.clone = function() {
    var u = new mboxUrlBuilder(this.a, this.b);
    u.setServerType(this.o);
    u.setBasePath(this.f);
    u.setUrlProcessAction(this.d);
    for (var j = 0; j < this.c.length; j++) {
        u.addParameter(this.c[j].name, this.c[j].value);
    }
    return u;
};
mboxUrlBuilder.prototype.t = function(v) {
    return v.replace(/\"/g, '&quot;').replace(/>/g, '&gt;');
};
mboxStandardFetcher = function() {};
mboxStandardFetcher.prototype.getType = function() {
    return 'standard';
};
mboxStandardFetcher.prototype.fetch = function(w) {
    w.setServerType(this.getType());
    document.write('<' + 'scr' + 'ipt src="' + w.buildUrl() + '" language="JavaScript"><' + '\/scr' + 'ipt>');
};
mboxStandardFetcher.prototype.cancel = function() {};
mboxAjaxFetcher = function() {};
mboxAjaxFetcher.prototype.getType = function() {
    return 'ajax';
};
mboxAjaxFetcher.prototype.fetch = function(w) {
    w.setServerType(this.getType());
    var e = w.buildUrl();
    this.x = document.createElement('script');
    this.x.src = e;
    document.body.appendChild(this.x);
};
mboxAjaxFetcher.prototype.cancel = function() {};
mboxMap = function() {
    this.y = new Object();
    this.z = new Array();
};
mboxMap.prototype.put = function(A, h) {
    if (!this.y[A]) {
        this.z[this.z.length] = A;
    }
    this.y[A] = h;
};
mboxMap.prototype.get = function(A) {
    return this.y[A];
};
mboxMap.prototype.remove = function(A) {
    this.y[A] = undefined;
};
mboxMap.prototype.each = function(p) {
    for (var j = 0; j < this.z.length; j++) {
        var A = this.z[j];
        var h = this.y[A];
        if (h) {
            p(A, h);
        }
    }
};
mboxFactory = function(B, b, C) {
    this.D = false;
    this.B = B;
    this.C = C;
    this.E = new mboxList();
    mboxFactories.put(C, this);
    this.F = typeof document.createElement('div').replaceChild != 'undefined' && (function() {
        return true;
    })() && typeof document.getElementById != 'undefined' && typeof(window.attachEvent || document.addEventListener || window.addEventListener) != 'undefined' && typeof encodeURIComponent != 'undefined';
    this.G = this.F && mboxGetPageParameter('mboxDisable') == null;
    var H = C == 'default';
    this.I = new mboxCookieManager('mbox' + (H ? '': ('-' + C)), (function() {
        return mboxCookiePageDomain();
    })());
    this.G = this.G && this.I.isEnabled() && (this.I.getCookie('disable') == null);
    if (this.isAdmin()) {
        this.enable();
    }
    this.J = mboxGenerateId();
    this.K = new mboxSession(this.J, 'mboxSession', 'session', 31 * 60, this.I);
    this.L = new mboxPC('PC', 1209600, this.I);
    this.w = new mboxUrlBuilder(B, b);
    this.M(this.w, H);
    this.N = new Date().getTime();
    this.O = this.N;
    var P = this;
    this.addOnLoad(function() {
        P.O = new Date().getTime();
    });
    if (this.F) {
        this.addOnLoad(function() {
            P.D = true;
            P.getMboxes().each(function(Q) {
                Q.setFetcher(new mboxAjaxFetcher()),
                Q.finalize();
            });
        });
        this.limitTraffic(100, 10368000);
        if (this.G) {
            this.R();
            this.S = new mboxSignaler(function(T, c) {
                return P.create(T, c);
            },
            this.I);
        }
    }
};
mboxFactory.prototype.isEnabled = function() {
    return this.G;
};
mboxFactory.prototype.getDisableReason = function() {
    return this.I.getCookie('disable');
};
mboxFactory.prototype.isSupported = function() {
    return this.F;
};
mboxFactory.prototype.disable = function(U, V) {
    if (typeof U == 'undefined') {
        U = 60 * 60;
    }
    if (typeof V == 'undefined') {
        V = 'unspecified';
    }
    if (!this.isAdmin()) {
        this.G = false;
        this.I.setCookie('disable', V, U);
    }
};
mboxFactory.prototype.enable = function() {
    this.G = true;
    this.I.deleteCookie('disable');
};
mboxFactory.prototype.isAdmin = function() {
    return document.location.href.indexOf('mboxEnv') != -1;
};
mboxFactory.prototype.limitTraffic = function(W, U) {};
mboxFactory.prototype.addOnLoad = function(p) {
    if (window.addEventListener) {
        window.addEventListener('load', p, false);
    } else if (document.addEventListener) {
        document.addEventListener('load', p, false);
    } else if (document.attachEvent) {
        window.attachEvent('onload', p);
    }
};
mboxFactory.prototype.getEllapsedTime = function() {
    return this.O - this.N;
};
mboxFactory.prototype.getEllapsedTimeUntil = function(X) {
    return X - this.N;
};
mboxFactory.prototype.getMboxes = function() {
    return this.E;
};
mboxFactory.prototype.get = function(T, Y) {
    return this.E.get(T).getById(Y || 0);
};
mboxFactory.prototype.update = function(T, c) {
    if (!this.isEnabled()) {
        return;
    }
    if (this.E.get(T).length() == 0) {
        throw "Mbox " + T + " is not defined";
    }
    this.E.get(T).each(function(Q) {
        Q.getUrlBuilder().addParameter('mboxPage', mboxGenerateId());
        Q.load(c);
    });
};
mboxFactory.prototype.create = function(T, c, Z) {
    if (!this.isSupported()) {
        return null;
    }
    var e = this.w.clone();
    e.addParameter('mboxCount', this.E.length() + 1);
    e.addParameters(c);
    var Y = this.E.get(T).length();
    var _ = this.C + '-' + T + '-' + Y;
    var ab;
    if (Z) {
        ab = new mboxLocatorNode(Z);
    } else {
        if (this.D) {
            throw 'The page has already been loaded, can\'t write marker';
        }
        ab = new mboxLocatorDefault(_);
    }
    try {
        var P = this;
        var bb = 'mboxImported-' + _;
        var Q = new mbox(T, Y, e, ab, bb);
        if (this.G) {
            Q.setFetcher(this.D ? new mboxAjaxFetcher() : new mboxStandardFetcher());
        }
        Q.setOnError(function(cb, n) {
            Q.setMessage(cb);
            if (n == 'standard') {
                Q.activate();
                if (!Q.isActivated()) {
                    P.disable(60 * 60, 'browser timeout');
                    window.location.reload(false);
                }
            } else {
                throw cb;
            }
        });
        this.E.add(Q);
    } catch(db) {
        this.disable();
        throw 'Failed creating mbox "' + T + '", the error was: ' + db;
    }
    return Q;
};
mboxFactory.prototype.getCookieManager = function() {
    return this.I;
};
mboxFactory.prototype.getPageId = function() {
    return this.J;
};
mboxFactory.prototype.getPCId = function() {
    return this.L;
};
mboxFactory.prototype.getSessionId = function() {
    return this.K;
};
mboxFactory.prototype.getSignaler = function() {
    return this.S;
};
mboxFactory.prototype.getUrlBuilder = function() {
    return this.w;
};
mboxFactory.prototype.M = function(e, H) {
    e.addParameter('mboxHost', document.location.hostname).addParameter('mboxSession', this.K.getId());
    if (!H) {
        e.addParameter('mboxFactoryId', this.C);
    }
    if (this.L.getId() != null) {
        e.addParameter('mboxPC', this.L.getId());
    }
    e.addParameter('mboxPage', this.J);
    var eb = this.I.getCookie('edge');
    if (eb != null) {
        e.addParameter('edge', eb);
    }
    e.setUrlProcessAction(function(e) {
        e += '&mboxURL=' + encodeURIComponent(document.location);
        var fb = encodeURIComponent(document.referrer);
        if (e.length + fb.length < 2000) {
            e += '&mboxReferrer=' + fb;
        }
        e += '&mboxVersion=' + mboxVersion;
        return e;
    });
};
mboxFactory.prototype.gb = function() {
    return "";
};
mboxFactory.prototype.R = function() {
    document.write('<style>.' + 'mboxDefault' + ' { visibility:hidden; }</style>');
};
mboxSignaler = function(hb, I) {
    this.I = I;
    var ib = I.getCookieNames('signal-');
    for (var j = 0; j < ib.length; j++) {
        var jb = ib[j];
        var kb = I.getCookie(jb).split('&');
        var Q = hb(kb[0], kb);
        Q.load();
        I.deleteCookie(jb);
    }
};
mboxSignaler.prototype.signal = function(lb, T) {
    this.I.setCookie('signal-' + lb, mboxShiftArray(arguments).join('&'), 45 * 60);
};
mboxList = function() {
    this.E = new Array();
};
mboxList.prototype.add = function(Q) {
    if (Q != null) {
        this.E[this.E.length] = Q;
    }
};
mboxList.prototype.get = function(T) {
    var mb = new mboxList();
    for (var j = 0; j < this.E.length; j++) {
        var Q = this.E[j];
        if (Q.getName() == T) {
            mb.add(Q);
        }
    }
    return mb;
};
mboxList.prototype.getById = function(nb) {
    return this.E[nb];
};
mboxList.prototype.length = function() {
    return this.E.length;
};
mboxList.prototype.each = function(p) {
    if (typeof p != 'function') {
        throw 'Action must be a function, was: ' + typeof(p);
    }
    for (var j = 0; j < this.E.length; j++) {
        p(this.E[j]);
    }
};
mboxLocatorDefault = function(g) {
    this.g = 'mboxMarker-' + g;
    document.write('<div id="' + this.g + '" style="visibility:hidden;display:none"></div>');
};
mboxLocatorDefault.prototype.locate = function() {
    var ob = document.getElementById(this.g);
    while (ob != null) {
        if (ob.nodeType == 1) {
            if (ob.className == 'mboxDefault') {
                return ob;
            }
        }
        ob = ob.previousSibling;
    }
    return null;
};
mboxLocatorDefault.prototype.force = function() {
    var pb = document.createElement('div');
    pb.className = 'mboxDefault';
    var qb = document.getElementById(this.g);
    qb.parentNode.insertBefore(pb, qb);
    return pb;
};
mboxLocatorNode = function(rb) {
    this.ob = rb;
};
mboxLocatorNode.prototype.locate = function() {
    return typeof this.ob == 'string' ? document.getElementById(this.ob) : this.ob;
};
mboxLocatorNode.prototype.force = function() {
    return null;
};
mboxCreate = function(T) {
    var Q = mboxFactoryDefault.create(T, mboxShiftArray(arguments));
    if (Q) {
        Q.load();
    }
    return Q;
};
mboxDefine = function(Z, T) {
    var Q = mboxFactoryDefault.create(T, mboxShiftArray(mboxShiftArray(arguments)), Z);
    return Q;
};
mboxUpdate = function(T) {
    mboxFactoryDefault.update(T, mboxShiftArray(arguments));
};
mbox = function(g, sb, w, tb, bb) {
    this.ub = null;
    this.vb = 0;
    this.ab = tb;
    this.bb = bb;
    this.wb = null;
    this.xb = new mboxOfferContent();
    this.pb = null;
    this.w = w;
    this.message = '';
    this.yb = new Object();
    this.zb = 0;
    this.sb = sb;
    this.g = g;
    this.Ab();
    w.addParameter('mbox', g).addParameter('mboxId', sb);
    this.Bb = function() {};
    this.Cb = function() {};
};
mbox.prototype.getId = function() {
    return this.sb;
};
mbox.prototype.Ab = function() {
    if (this.g.length > 250) {
        throw "Mbox Name " + this.g + " exceeds max length of " + "250 characters.";
    } else if (this.g.match(/^\s+|\s+$/g)) {
        throw "Mbox Name " + this.g + " has leading/trailing whitespace(s).";
    }
};
mbox.prototype.getName = function() {
    return this.g;
};
mbox.prototype.getParameters = function() {
    var c = this.w.getParameters();
    var mb = new Array();
    for (var j = 0; j < c.length; j++) {
        if (c[j].name.indexOf('mbox') != 0) {
            mb[mb.length] = c[j].name + '=' + c[j].value;
        }
    }
    return mb;
};
mbox.prototype.setOnLoad = function(p) {
    this.Cb = p;
    return this;
};
mbox.prototype.setMessage = function(cb) {
    this.message = cb;
    return this;
};
mbox.prototype.setOnError = function(Bb) {
    this.Bb = Bb;
    return this;
};
mbox.prototype.setFetcher = function(Db) {
    if (this.wb) {
        this.wb.cancel();
    }
    this.wb = Db;
    return this;
};
mbox.prototype.getFetcher = function() {
    return this.wb;
};
mbox.prototype.load = function(c) {
    if (this.wb == null) {
        return this;
    }
    this.setEventTime("load.start");
    this.cancelTimeout();
    this.vb = 0;
    var w = (c && c.length > 0) ? this.w.clone().addParameters(c) : this.w;
    this.wb.fetch(w);
    var P = this;
    this.Eb = setTimeout(function() {
        P.Bb('Fetch of mbox timed out', P.wb.getType());
    },
    15000);
    this.setEventTime("load.end");
    return this;
};
mbox.prototype.loaded = function() {
    this.cancelTimeout();
    if (!this.activate()) {
        var P = this;
        setTimeout(function() {
            P.loaded();
        },
        100);
    }
};
mbox.prototype.activate = function() {
    if (this.vb) {
        return this.vb;
    }
    this.setEventTime('activate' + ++this.zb + '.start');
    if (this.show()) {
        this.cancelTimeout();
        this.vb = 1;
    }
    this.setEventTime('activate' + this.zb + '.end');
    return this.vb;
};
mbox.prototype.isActivated = function() {
    return this.vb;
};
mbox.prototype.setOffer = function(xb) {
    if (xb && xb.show && xb.setOnLoad) {
        this.xb = xb;
    } else {
        throw 'Invalid offer';
    }
    return this;
};
mbox.prototype.getOffer = function() {
    return this.xb;
};
mbox.prototype.show = function() {
    this.setEventTime('show.start');
    var mb = this.xb.show(this);
    this.setEventTime(mb == 1 ? "show.end.ok": "show.end");
    return mb;
};
mbox.prototype.showContent = function(Fb) {
    if (Fb == null) {
        return 0;
    }
    if (this.pb == null || !this.pb.parentNode) {
        this.pb = this.getDefaultDiv(true);
        if (this.pb == null) {
            return 0;
        }
    }
    if (this.pb != Fb) {
        this.Gb(this.pb);
        this.pb.parentNode.replaceChild(Fb, this.pb);
        this.pb = Fb;
    }
    this.Hb(Fb);
    this.Cb();
    return 1;
};
mbox.prototype.hide = function() {
    this.setEventTime('hide.start');
    var mb = this.showContent(this.getDefaultDiv());
    this.setEventTime(mb == 1 ? 'hide.end.ok': 'hide.end.fail');
    return mb;
};
mbox.prototype.finalize = function() {
    this.setEventTime('finalize.start');
    this.cancelTimeout();
    if (this.getDefaultDiv() == null) {
        if (this.ab.force() != null) {
            this.setMessage('No default content, an empty one has been added');
        } else {
            this.setMessage('Unable to locate mbox');
        }
    }
    if (!this.activate()) {
        this.hide();
        this.setEventTime('finalize.end.hide');
    }
    this.setEventTime('finalize.end.ok');
};
mbox.prototype.cancelTimeout = function() {
    if (this.Eb) {
        clearTimeout(this.Eb);
    }
    if (this.wb != null) {
        this.wb.cancel();
    }
};
mbox.prototype.getDiv = function() {
    return this.pb;
};
mbox.prototype.getDefaultDiv = function(Ib) {
    var pb = this.ab.locate();
    if (pb != null) {
        this.Jb = pb;
    }
    return Ib ? pb: this.Jb;
};
mbox.prototype.setEventTime = function(Kb) {
    this.yb[Kb] = (new Date()).getTime();
};
mbox.prototype.getEventTimes = function() {
    return this.yb;
};
mbox.prototype.getImportName = function() {
    return this.bb;
};
mbox.prototype.getURL = function() {
    return this.w.buildUrl();
};
mbox.prototype.getUrlBuilder = function() {
    return this.w;
};
mbox.prototype.Lb = function(pb) {
    return pb.style.display != 'none';
};
mbox.prototype.Hb = function(pb) {
    this.Mb(pb, true);
};
mbox.prototype.Gb = function(pb) {
    this.Mb(pb, false);
};
mbox.prototype.Mb = function(pb, Nb) {
    pb.style.visibility = Nb ? "visible": "hidden";
    pb.style.display = Nb ? "block": "none";
};
mboxOfferContent = function() {
    this.Cb = function() {};
};
mboxOfferContent.prototype.show = function(Q) {
    var mb = Q.showContent(document.getElementById(Q.getImportName()));
    if (mb == 1) {
        this.Cb();
    }
    return mb;
};
mboxOfferContent.prototype.setOnLoad = function(Cb) {
    this.Cb = Cb;
};
mboxOfferAjax = function(Fb) {
    this.Fb = Fb;
    this.Cb = function() {};
};
mboxOfferAjax.prototype.setOnLoad = function(Cb) {
    this.Cb = Cb;
};
mboxOfferAjax.prototype.show = function(Q) {
    var Ob = document.createElement('div');
    Ob.id = Q.getImportName();
    Ob.innerHTML = this.Fb;
    var mb = Q.showContent(Ob);
    if (mb == 1) {
        this.Cb();
    }
    return mb;
};
mboxOfferDefault = function() {
    this.Cb = function() {};
};
mboxOfferDefault.prototype.setOnLoad = function(Cb) {
    this.Cb = Cb;
};
mboxOfferDefault.prototype.show = function(Q) {
    var mb = Q.hide();
    if (mb == 1) {
        this.Cb();
    }
    return mb;
};
mboxCookieManager = function mboxCookieManager(g, Pb) {
    this.g = g;
    this.Pb = Pb == '' || Pb.indexOf('.') == -1 ? '': '; domain=' + Pb;
    this.Qb = new mboxMap();
    this.loadCookies();
};
mboxCookieManager.prototype.isEnabled = function() {
    this.setCookie('check', 'true', 60);
    this.loadCookies();
    return this.getCookie('check') == 'true';
};
mboxCookieManager.prototype.setCookie = function(g, h, U) {
    if (typeof g != 'undefined' && typeof h != 'undefined' && typeof U != 'undefined') {
        var Rb = new Object();
        Rb.name = g;
        Rb.value = escape(h);
        Rb.expireOn = Math.ceil(U + new Date().getTime() / 1000);
        this.Qb.put(g, Rb);
        this.saveCookies();
    }
};
mboxCookieManager.prototype.getCookie = function(g) {
    var Rb = this.Qb.get(g);
    return Rb ? unescape(Rb.value) : null;
};
mboxCookieManager.prototype.deleteCookie = function(g) {
    this.Qb.remove(g);
    this.saveCookies();
};
mboxCookieManager.prototype.getCookieNames = function(Sb) {
    var Tb = new Array();
    this.Qb.each(function(g, Rb) {
        if (g.indexOf(Sb) == 0) {
            Tb[Tb.length] = g;
        }
    });
    return Tb;
};
mboxCookieManager.prototype.saveCookies = function() {
    var Ub = new Array();
    var Vb = 0;
    this.Qb.each(function(g, Rb) {
        Ub[Ub.length] = g + '#' + Rb.value + '#' + Rb.expireOn;
        if (Vb < Rb.expireOn) {
            Vb = Rb.expireOn;
        }
    });
    var Wb = new Date(Vb * 1000);
    document.cookie = this.g + '=' + Ub.join('|') + '; expires=' + Wb.toGMTString() + '; path=/' + this.Pb;
};
mboxCookieManager.prototype.loadCookies = function() {
    this.Qb = new mboxMap();
    var Xb = document.cookie.indexOf(this.g + '=');
    if (Xb != -1) {
        var Yb = document.cookie.indexOf(';', Xb);
        if (Yb == -1) {
            Yb = document.cookie.indexOf(',', Xb);
            if (Yb == -1) {
                Yb = document.cookie.length;
            }
        }
        var Zb = document.cookie.substring(Xb + this.g.length + 1, Yb).split('|');
        var _b = Math.ceil(new Date().getTime() / 1000);
        for (var j = 0; j < Zb.length; j++) {
            var Rb = Zb[j].split('#');
            if (_b <= Rb[2]) {
                var ac = new Object();
                ac.name = Rb[0];
                ac.value = Rb[1];
                ac.expireOn = Rb[2];
                this.Qb.put(ac.name, ac);
            }
        }
    }
};
mboxSession = function(bc, cc, jb, dc, I) {
    this.cc = cc;
    this.jb = jb;
    this.dc = dc;
    this.I = I;
    this.ec = false;
    this.sb = typeof mboxForceSessionId != 'undefined' ? mboxForceSessionId: mboxGetPageParameter(this.cc);
    if (this.sb == null || this.sb.length == 0) {
        this.sb = I.getCookie(jb);
        if (this.sb == null || this.sb.length == 0) {
            this.sb = bc;
            this.ec = true;
        }
    }
    I.setCookie(jb, this.sb, dc);
};
mboxSession.prototype.getId = function() {
    return this.sb;
};
mboxSession.prototype.forceId = function(fc) {
    this.sb = fc;
    this.I.setCookie(this.jb, this.sb, this.dc);
};
mboxPC = function(jb, dc, I) {
    this.jb = jb;
    this.dc = dc;
    this.I = I;
    this.sb = typeof mboxForcePCId != 'undefined' ? mboxForcePCId: I.getCookie(jb);
    if (this.sb != null) {
        I.setCookie(jb, this.sb, dc);
    }
};
mboxPC.prototype.getId = function() {
    return this.sb;
};
mboxPC.prototype.forceId = function(fc) {
    if (this.sb != fc) {
        this.sb = fc;
        this.I.setCookie(this.jb, this.sb, this.dc);
        return true;
    }
    return false;
};
mboxGetPageParameter = function(g) {
    var mb = null;
    var gc = new RegExp(g + "=([^\&]*)");
    var hc = gc.exec(document.location);
    if (hc != null && hc.length >= 2) {
        mb = hc[1];
    }
    return mb;
};
mboxSetCookie = function(g, h, U) {
    return mboxFactoryDefault.getCookieManager().setCookie(g, h, U);
};
mboxGetCookie = function(g) {
    return mboxFactoryDefault.getCookieManager().getCookie(g);
};
mboxCookiePageDomain = function() {
    var Pb = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1];
    var ic = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;
    if (!ic.exec(Pb)) {
        var jc = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(Pb);
        if (jc) {
            Pb = jc[0];
        }
    }
    return Pb ? Pb: "";
};
mboxShiftArray = function(kc) {
    var mb = new Array();
    for (var j = 1; j < kc.length; j++) {
        mb[mb.length] = kc[j];
    }
    return mb;
};
mboxGenerateId = function() {
    return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);
};
if (typeof mboxVersion == 'undefined') {
    var mboxVersion = 35;
    var mboxFactories = new mboxMap();
    var mboxFactoryDefault = new mboxFactory('mbox9e.offermatica.com', 'publicstorage', 'default');
};
mboxDebugActionsProto = function() {
    this.lc = new Object();
    this.mc = new
    function() {
        this.show = function() {}
    };
};
mboxDebugActionsProto.prototype.register = function(g, p) {
    this.lc[g] = p;
};
mboxDebugActionsProto.prototype.registerDefault = function(p) {
    this.mc = p;
};
mboxDebugActionsProto.prototype.show = function(g) {
    var p = this.lc[g] ? this.lc[g] : this.mc; (new p()).show();
};
if (typeof mboxDebugActions == 'undefined') {
    mboxDebugActions = new mboxDebugActionsProto();
};
mboxDebugActionDefault = function() {};
mboxDebugActionDefault.prototype.show = function() {
    var window = new mboxDebugWindow("Debug");
    window.putPageStart();
    window.put("  <b>Mbox Debug Window (version: " + mboxVersion + ")</b><br/>");
    window.put("<p/>");
    window.put("<b>Page</b>: " + document.location);
    window.put("<br/><b>Referrer</b>: " + document.referrer);
    window.put(" <ul>");
    var G = mboxFactoryDefault.isEnabled();
    window.put('  <li>Enabled: <span style="color:' + (G ? 'green': 'red') + '"><b>' + G + '</b></span></li>');
    window.put("  <li>Cookies: '" + document.cookie + "'</li></ul>");
    mboxFactories.each(function(g, nc) {
        var oc = 1;
        window.put("<hr/><ul><li><b>Factory</b>: <i>'" + g + "'</i></li><ul>");
        window.put("<li><i>pageId</i>: " + nc.getPageId() + "</li>");
        window.put("<li><i>mboxPC</i>: " + nc.getPCId().getId() + "</li>");
        window.put("<li><i>sessionId</i>: " + nc.getSessionId().getId() + "</li>");
        window.put("<hr/>");
        nc.getMboxes().each(function(Q) {
            window.put("  <li>" + oc+++". '<a href=\"" + Q.getURL() + "\">" + Q.getName() + "</a>'");
            window.put("   <ul>");
            if (Q.getId() != 0) {
                window.put("<li> <b>id</b>: " + Q.getId() + "</li>");
            }
            if (Q.getParameters().length > 0) {
                window.put(" <li><b>parameters</b>: '" + Q.getParameters().join(", ") + "'</li>");
            }
            window.put("<li><i>" + Q.getURL() + "</i></li>");
            if (Q.message != '') {
                window.put('   <li><span style="color: red"><b>Error: ' + Q.message + '</b></span></li>');
            }
            if (Q.getDefaultDiv() == null) {
                window.put('    <li><span style="color: red">' + '<b>Error: cannot find mbox in dom</b></span></li>');
            }
            window.put("   </ul>");
            window.put("  </li>");
        });
        window.put(" </ul>");
        window.put(" </ul>");
    });
    window.put(" <hr/>");
    window.putCloseButton();
    window.putPageEnd();
};
mboxDebugActions.registerDefault(mboxDebugActionDefault);
mboxDebug = function(pc, qc, nc) {
    this.rc = pc;
    this.p = null;
    this.I = nc.getCookieManager();
    var sc = mboxGetPageParameter(qc);
    if (sc == null) {
        sc = this.I.getCookie(this.rc);
    }
    if (sc != null) {
        if (sc.indexOf("x") == 0) {
            document.write('<' + 'scr' + 'ipt language="Javascript1.2" src="' + 'http://admin9.offermatica.com/admin/mbox/mbox_debug_' + sc + '.jsp?clientCode=publicstorage' + '&mboxServerHost=mbox9e.offermatica.com"><' + '\/scr' + 'ipt>');
        }
        if (!nc.isSupported()) {
            alert("mbox functionality is not supported on this browser");
            this.disable();
        }
        nc.addOnLoad(function() {
            mboxDebugActions.show(sc);
        });
        this.I.setCookie(this.rc, sc, 45 * 60);
    } else {
        this.disable();
    }
};
mboxDebug.prototype.disable = function() {
    this.I.deleteCookie(this.rc);
};
mboxDebugWindow = function(g) {
    this.g = g + " " + document.location.hostname;
    var tc = /\W/g;
    var uc = this.g.replace(tc, '_');
    this.wc = window.open("", "mboxDebugWindow" + uc, "width=600,height=300,resizable,scrollbars=yes,toolbar=yes");
    if (this.wc == null) {
        alert("Unable to open debug window.\nAre you blocking popups?\n");
    }
};
mboxDebugWindow.prototype.put = function(xc) {
    if (this.wc == null) {
        return;
    }
    try {
        this.wc.document.writeln(xc);
        this.wc.scrollBy(0, 1000);
    } catch(e) {
        alert("Unable to write to the current mboxDebug window.\n" + "Please close any open debug window");
        this.wc = null;
    }
};
mboxDebugWindow.prototype.putCloseButton = function() {
    this.put("<a href=\"javascript:mboxDebugWindowClose()\">" + "click here to close debug window</a>");
};
mboxDebugWindow.prototype.putPageStart = function() {
    this.put("<html><head>" + " <title>" + this.g + "</title>" + "  <" + "scr" + "ipt>" + "   function mboxDebugWindowClose() {" + "     try {" + "       window.opener.mboxDebugger.disable();" + "     } catch(e) {" + "       alert('Could not disable debug mode.\\n'" + "         + 'Browse to a page containing an mbox and\\n'" + "         + 'click on close link.');" + "     }" + "     window.close();" + "   }" + "  <" + "\/scr" + "ipt>" + " </head>" + " <body>");
};
mboxDebugWindow.prototype.putPageEnd = function() {
    this.put("</body></html>");
    if (this.wc != null) {
        this.wc.document.close();
    }
};
if (typeof mboxDebugger == 'undefined') {
    mboxDebugger = new mboxDebug("debug", "mboxDebug", mboxFactoryDefault);
}