



var mboxCopyright = "&copy; 2004-2007 Offermatica &trade; Corporation";




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() { };


mboxFactory = function(y, b) {
 this.z = new mboxList();

 
 
 this.A =
 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.B = this.A;

 if (mboxGetPageParameter('mboxDisable') != null) {
 this.B = false;
 }

 
 
 if (!mboxCookies.isEnabled()) {
 this.B = false;
 }
 if (mboxCookies.getCookie('disable') == 'true') {
 this.B = false;
 }
 

 if (this.isAdmin()) {
 this.enable();
 }

 this.C = mboxGenerateId();
 this.D = new mboxSession(this.C,
 'mboxSession',
 'session', 31 * 60);
 this.E = new mboxPC(this.C,
 'PC', 63072000);

 this.w = new mboxUrlBuilder(y, b);
 this.F();

 this.G = new Date().getTime();
 this.H = this.G;

 var I = this;
 this.addOnLoad(function() { I.H = new Date().getTime(); });
 if (this.A) {
 
 
 this.addOnLoad(function() {
 I.getMboxes().each(function(J) { J.finalize(); });
 });

 this.limitTraffic(100, 10368000);

 if (this.B) {
 this.K();

 this.L = new mboxSignaler(function(M, c) {
 return I.create(M, c); });

 }

 }
};




mboxFactory.prototype.isEnabled = function() {
 return this.B;
};


mboxFactory.prototype.isSupported = function() {
 return this.A;
};


mboxFactory.prototype.disable = function(N) {
 if (typeof duration == 'undefined') {
 N = 60 * 60;
 }
 if (!this.isAdmin()) {
 this.B = false;
 mboxCookies.setCookie('disable', 'true', N);
 }
};

mboxFactory.prototype.enable = function() {
 this.B = true;
 mboxCookies.deleteCookie('disable');
};

mboxFactory.prototype.isAdmin = function() {
 return document.location.href.indexOf(
 'mboxEnv') != -1;
};


mboxFactory.prototype.limitTraffic = function(O, N) {

};


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.H - this.G;
};

mboxFactory.prototype.getEllapsedTimeUntil = function(P) {
 return P - this.G;
};


mboxFactory.prototype.getMboxes = function() {
 return this.z;
};


mboxFactory.prototype.get = function(M, Q) {
 return this.z.get(M).getById(Q || 0);
};


mboxFactory.prototype.update = function(M, c) {
 if (!this.isEnabled()) {
 return;
 }
 if (this.z.get(M).length() == 0) {
 throw "Mbox " + M + " is not defined";
 }
 this.z.get(M).each(function(J) {
 J.setFetcher(new mboxAjaxFetcher());
 
 J.getUrlBuilder()
 .addParameter('mboxRandomRequestId', mboxGenerateId());
 J.load(c);
 });
};


mboxFactory.prototype.create = function(M, c) {
 if (!this.isSupported()) {
 return null;
 }
 var e = this.w.clone();
 e.addParameter("mboxCount", this.z.length() + 1);
 e.addParameters(c);

 try {
 var I = this;
 var R = new mbox(M, this.z.get(M).length(), e);
 R.setOnError(function(S, n) {
 R.setMessage(S);
 if (n == 'standard') {
 R.activate();
 if (!R.isActivated()) {
 I.disable();
 window.location.reload(false);
 }
 } else {
 throw S;
 }
 });
 R.setFetcher(new mboxStandardFetcher());
 this.z.add(R);
 } catch (T) {
 this.disable();
 throw 'Failed creating mbox, the error was: ' + T;
 }

 return R;
};

mboxFactory.prototype.getPageId = function() {
 return this.C;
};

mboxFactory.prototype.getPCId = function() {
 return this.E;
};

mboxFactory.prototype.getSessionId = function() {
 return this.D;
};


mboxFactory.prototype.getSignaler = function() {
 return this.L;
};


mboxFactory.prototype.getUrlBuilder = function() {
 return this.w;
};

mboxFactory.prototype.F = function() {
 var e = this.w;
 e.addParameter('mboxHost', document.location.hostname)
 .addParameter('mboxSession', this.D.getId())
 .addParameter('mboxPC', this.E.getId())
 .addParameter('mboxPage', this.C);
 var U = mboxCookies.getCookie('edge');
 if (U != null) {
 e.addParameter('edge', U);
 }


 e.addParameter('mboxXDomain', "enabled");


 e.setUrlProcessAction(function(e) {

 e += '&mboxURL=' + escape(document.location);
 var V = escape(document.referrer);
 if (e.length + V.length < 2000) {
 e += '&mboxReferrer=' + V;
 }

 e += '&mboxVersion=' + mboxVersion;
 return e;
 });
};

mboxFactory.prototype.W = function() {
 return "";
};


mboxFactory.prototype.K = function() {
 document.write('<style>.' + 'mboxDefault'
 + ' { visibility:hidden; }</style>');
};



mboxSignaler = function(X) {
 var Y =
 mboxCookies.getCookieNames('signal-');
 for (var j = 0; j < Y.length; j++) {
 var Z = Y[j];
 var _ = mboxCookies.getCookie(Z).split('&');
 var J = X(_[0], _);
 J.put();
 J.load();
 mboxCookies.deleteCookie(Z);
 }
};


mboxSignaler.prototype.signal = function(ab, M ) {
 mboxCookies.setCookie('signal-' +
 ab, mboxShiftArray(arguments).join('&'), 45 * 60);
};



mboxList = function() {
 this.z = new Array();
};

mboxList.prototype.add = function(J) {
 if (J != null) {
 this.z[this.z.length] = J;
 }
};


mboxList.prototype.get = function(M) {
 var bb = new mboxList();
 for (var j = 0; j < this.z.length; j++) {
 var J = this.z[j];
 if (J.getName() == M) {
 bb.add(J);
 }
 }
 return bb;
};

mboxList.prototype.getById = function(cb) {
 return this.z[cb];
};

mboxList.prototype.length = function() {
 return this.z.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.z.length; j++) {
 p(this.z[j]);
 }
};

mboxUpdate = function(M ) {
 mboxFactoryDefault.update(M, mboxShiftArray(arguments));
};

mboxCreate = function(M ) {
 var J = mboxFactoryDefault.create(M, mboxShiftArray(arguments));
 if (J) {
 J.put();
 if (mboxFactoryDefault.isEnabled()) {
 J.load();
 }
 }
 return J;
};


mbox = function(g, db, w) {
 this.eb = null;
 this.fb = 0;
 this.gb = null;

 this.hb = new mboxOfferContent();
 this.ib = this.getDefaultDiv();

 this.w = w;

 
 this.message = '';
 this.jb = new Object();
 this.kb = 0;

 this.db = db;
 this.g = g;

 this.lb();

 this.mb = new mboxStandardFetcher();

 w.addParameter('mbox', g)
 .addParameter('mboxId', db);

 this.nb = function() {};
 this.ob = function() {};
};

mbox.prototype.getId = function() {
 return this.db;
};

mbox.prototype.lb = 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.parameters = function() {
 return this.w.getParameters();
};


mbox.prototype.setOnLoad = function(p) {
 this.ob = p;
 return this;
};

mbox.prototype.setMessage = function(S) {
 this.message = S;
 return this;
};


mbox.prototype.setOnError = function(nb) {
 this.nb = nb;
 return this;
};

mbox.prototype.setFetcher = function(pb) {
 this.mb.cancel();
 this.mb = pb;
 return this;
};

mbox.prototype.getFetcher = function() {
 return this.mb;
};


mbox.prototype.put = function() {
 document.write('<div id="' + this.getMarkerName() +
 '" style="visibility:hidden;display:none"></div>');
};


mbox.prototype.load = function(c) {

 this.setEventTime("load.start");

 this.cancelTimeout();

 var w = (c && c.length > 0) ?
 this.w.clone().addParameters(c) : this.w;
 this.mb.fetch(w);

 var I = this;
 this.qb = setTimeout(function() {
 I.nb('Fetch of mbox timed out', I.mb.getType());
 }, 15000);


 this.setEventTime("load.end");

};


mbox.prototype.activate = function() {
 if (this.fb) {
 return this.fb;
 }

 this.setEventTime('activate' + ++this.kb + '.start');


 if (this.show()) {
 this.cancelTimeout();
 this.fb = 1;
 }


 this.setEventTime('activate' + this.kb + '.end');

 return this.fb;
};


mbox.prototype.isActivated = function() {
 return this.fb;
};


mbox.prototype.setOffer = function(hb) {
 if (hb && hb.show && hb.setOnLoad) {
 this.hb = hb;
 } else {
 throw 'Invalid offer';
 }
 return this;
};

mbox.prototype.getOffer = function() {
 return this.hb;
};


mbox.prototype.show = function() {

 this.setEventTime('show.start');


 var bb = this.hb.show(this);


 this.setEventTime(bb == 1 ? "show.end.ok" : "show.end");


 return bb;
};


mbox.prototype.showContent = function(rb) {
 if (rb == null) {
 
 return 0;
 }
 if (this.ib == null) {
 this.ib = this.getDefaultDiv();
 if (this.ib == null) {
 
 return 0;
 }
 }
 this.sb(this.ib);

 this.ib.parentNode.replaceChild(rb, this.ib);
 this.ib = rb;

 this.tb(rb);

 this.ob();

 
 return 1;
};


mbox.prototype.hide = function() {

 this.setEventTime('hide.start');


 var bb = this.showContent(this.getDefaultDiv());


 this.setEventTime(bb == 1 ? 'hide.end.ok' : 'hide.end.fail');


 return bb;
};


mbox.prototype.finalize = function() {

 this.setEventTime('finalize.start');


 this.cancelTimeout();

 if (this.getDefaultDiv() == null) {
 
 this.gb = document.createElement('div');
 this.gb.className = 'mboxDefault';
 var ub = document.getElementById(this.getMarkerName());
 ub.parentNode.insertBefore(this.gb, ub);
 this.setMessage('No default content, an empty one has been added');
 }

 if (!this.activate()) {
 this.hide();


 this.setEventTime('finalize.end.hide');

 }


 this.setEventTime('finalize.end.ok');

};

mbox.prototype.cancelTimeout = function() {
 if (this.qb) {
 clearTimeout(this.qb);
 }
 this.mb.cancel();
};

mbox.prototype.getDiv = function() {
 return this.ib;
};

mbox.prototype.getDefaultDiv = function() {
 if (this.gb != null) {
 return this.gb;
 }

 var vb = document.getElementById(this.getMarkerName());
 while (vb != null) {
 
 if ((vb.nodeType == 1) && (vb.nodeName == "DIV")) {
 if (vb.className.indexOf('mboxMarker-') > 0) {
 return null;
 } else if (vb.className == 'mboxDefault') {
 this.gb = vb;

 return vb;
 }
 }
 vb = vb.previousSibling;
 }

 return null;
};

mbox.prototype.getMarkerName = function() {
 return 'mboxMarker-' + this.g + '-' + this.db;
};

mbox.prototype.setEventTime = function(wb) {
 this.jb[wb] = (new Date()).getTime();
};

mbox.prototype.getEventTimes = function() {
 return this.jb;
};

mbox.prototype.getURL = function() {
 return this.w.buildUrl();
};

mbox.prototype.getUrlBuilder = function() {
 return this.w;
};

mbox.prototype.xb = function(ib) {
 return ib.style.display != 'none';
};

mbox.prototype.tb = function(ib) {
 this.yb(ib, true);
};

mbox.prototype.sb = function(ib) {
 this.yb(ib, false);
};

mbox.prototype.yb = function(ib, zb) {
 ib.style.visibility = zb ? "visible" : "hidden";
 ib.style.display = zb ? "block" : "none";
};

mboxOfferContent = function() {
 this.ob = function() {};
};

mboxOfferContent.prototype.show = function(J) {
 var bb = J.showContent(document.getElementById(
 this.Ab(J)));
 if (bb == 1) {
 this.ob();
 }
 return bb;
};

mboxOfferContent.prototype.setOnLoad = function(ob) {
 this.ob = ob;
};

mboxOfferContent.prototype.Ab = function(J) {
 return 'mboxImported-' + J.getName() + '-' +
 J.getId();
};


mboxOfferAjax = function(rb) {
 this.rb = rb;
 this.ob = function() {};
};

mboxOfferAjax.prototype.setOnLoad = function(ob) {
 this.ob = ob;
};

mboxOfferAjax.prototype.show = function(J) {
 var Bb = document.createElement('div');

 Bb.id = 'mboxImported-' +
 J.getName() + '-' + J.getId();
 Bb.innerHTML = this.rb;

 var bb = J.showContent(Bb);
 if (bb == 1) {
 this.ob();
 }
 return bb;
};


mboxOfferDefault = function() {
};

mboxOfferDefault.prototype.setOnLoad = function(ob) { };

mboxOfferDefault.prototype.show = function(J) {
 return J.hide();
};

mboxCookieManager = function mboxCookieManager(g, Cb) {
 this.g = g;
 
 this.Cb = Cb == '' || Cb.indexOf('.') == -1 ? '' :
 '; domain=' + Cb;
 this.loadCookies();
};

mboxCookieManager.prototype.isEnabled = function() {
 this.setCookie('check', 'true', 60);
 this.loadCookies();
 return this.getCookie('check') == 'true';
};


mboxCookieManager.prototype.setCookie = function(g, h, N) {
 if (typeof g != 'undefined' && typeof h != 'undefined' &&
 typeof N != 'undefined') {

 var cb = this.Db.length;
 for (var j = 0; j < this.Db.length; j++) {
 if (this.Db[j].name == g) {
 cb = j;
 break;
 }
 }
 var Eb = new Object();
 Eb.name = g;
 Eb.value = escape(h);
 
 Eb.expireOn = Math.ceil(N + new Date().getTime() / 1000);

 this.Db[cb] = Eb;
 this.saveCookies();
 }
};

mboxCookieManager.prototype.getCookie = function(g) {
 for (var j = 0; j < this.Db.length; j++) {
 var Eb = this.Db[j];
 if (Eb.name == g) {
 return unescape(Eb.value);
 }
 }
 return null;
};

mboxCookieManager.prototype.deleteCookie = function(g) {
 var Fb = new Array();
 for (var j = 0; j < this.Db.length; j++) {
 var Eb = this.Db[j];
 if (Eb.name != g) {
 Fb[Fb.length] = Eb;
 }
 }
 this.Db = Fb;
 this.saveCookies();
};

mboxCookieManager.prototype.getCookieNames = function(Gb) {
 var Hb = new Array();
 for (var j = 0; j < this.Db.length; j++) {
 var Eb = this.Db[j];
 if (Eb.name.indexOf(Gb) == 0) {
 Hb[Hb.length] = Eb.name;
 }
 }
 return Hb;
};

mboxCookieManager.prototype.saveCookies = function() {

 var Ib = new Array();
 var Jb = 0;
 for (var j = 0; j < this.Db.length; j++) {
 var Eb = this.Db[j];
 Ib[Ib.length] = Eb.name + '#' + Eb.value +
 '#' + Eb.expireOn;
 if (Jb < Eb.expireOn) {
 Jb = Eb.expireOn;
 }
 }
 var Kb = new Date(Jb * 1000);
 document.cookie = this.g + '=' + Ib.join('|') +
 
 '; expires=' + Kb.toGMTString() +
 '; path=/' + this.Cb;

};

mboxCookieManager.prototype.loadCookies = function() {
 this.Db = new Array();
 var Lb = document.cookie.indexOf(this.g + '=');
 if (Lb != -1) {
 var Mb = document.cookie.indexOf(';', Lb);
 if (Mb == -1) {
 Mb = document.cookie.indexOf(',', Lb);
 if (Mb == -1) {
 Mb = document.cookie.length;
 }
 }
 var Nb = document.cookie.substring(
 Lb + this.g.length + 1, Mb).split('|');

 var Ob = Math.ceil(new Date().getTime() / 1000);
 for (var j = 0; j < Nb.length; j++) {
 var Eb = Nb[j].split('#');
 if (Ob <= Eb[2]) {
 var Pb = new Object();
 Pb.name = Eb[0];
 Pb.value = Eb[1];
 Pb.expireOn = Eb[2];
 this.Db[this.Db.length] = Pb;
 }
 }
 }
};


mboxSession = function(Qb, Rb, Z, Sb) {
 this.Rb = Rb;
 this.Z = Z;
 this.Sb = Sb;

 this.Tb = false;

 this.db = typeof mboxForceSessionId != 'undefined' ?
 mboxForceSessionId : mboxGetPageParameter(this.Rb);

 if (this.db == null || this.db.length == 0) {
 this.db = mboxCookies.getCookie(Z);
 if (this.db == null || this.db.length == 0) {
 this.db = Qb;
 this.Tb = true;
 }
 }

 mboxCookies.setCookie(Z, this.db, Sb);
};


mboxSession.prototype.getId = function() {
 return this.db;
};

mboxSession.prototype.forceId = function(Ub) {
 this.db = Ub;

 mboxCookies.setCookie(this.Z, this.db, this.Sb);
};


mboxPC = function(Qb, Z, Sb) {
 this.Z = Z;
 this.Sb = Sb;

 this.db = typeof mboxForcePCId != 'undefined' ?
 mboxForcePCId : mboxCookies.getCookie(Z);
 if (this.db == null || this.db.length == 0) {
 this.db = Qb;
 }
 mboxCookies.setCookie(Z, this.db, Sb);
};


mboxPC.prototype.getId = function() {
 return this.db;
};


mboxPC.prototype.forceId = function(Ub) {
 if (this.db != Ub) {
 this.db = Ub;
 mboxCookies.setCookie(this.Z, this.db, this.Sb);
 return true;
 }
 return false;
};

mboxGetPageParameter = function(g) {
 var bb = null;
 var Vb = new RegExp(g + "=([^\&]*)");
 var Wb = Vb.exec(document.location);

 if (Wb != null && Wb.length >= 2) {
 bb = Wb[1];
 }
 return bb;
};

mboxSetCookie = function(g, h, N) {
 return mboxCookies.setCookie(g, h, N);
};

mboxGetCookie = function(g) {
 return mboxCookies.getCookie(g);
};

mboxCookiePageDomain = function() {
 var Cb = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1];
 var Xb = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;

 if (!Xb.exec(Cb)) {
 var Yb =
 (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(Cb);
 if (Yb) {
 Cb = Yb[0];
 }
 }

 return Cb ? Cb: "";
};

mboxShiftArray = function(Zb) {
 var bb = new Array();
 for (var j = 1; j < Zb.length; j++) {
 bb[bb.length] = Zb[j];
 }
 return bb;
};

mboxGenerateId = function() {
 return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);
};

if (typeof mboxVersion == 'undefined') {
 var mboxVersion = 28;
 var mboxCookies = new mboxCookieManager("mbox",
 (function() { return mboxCookiePageDomain(); })());
 var mboxFactoryDefault = new mboxFactory('mbox3.offermatica.com', 'mcafee');
};






mboxDisplayDebugInfo = function() {
 mboxDebugger.show();
};

mboxCookieIsEnabled = function() {
 mboxCookies.setCookie('check', "true", 60);
 return mboxCookies.getCookie('check') == "true"
};


mboxDebug = function(_b, ac, bc) {
 this.cc = _b;
 this.p = null;

 var dc = mboxGetPageParameter(ac);
 if (dc == null) {
 dc = mboxCookies.getCookie(this.cc);
 }

 if (dc != null) {
 if (dc.indexOf("x") == 0) {
 
 this.p = new mboxDebugActionNone();

 document.write('<' + 'scr' + 'ipt language="Javascript1.2" src='
 + '"http://admin3.offermatica.com/admin/mbox/mbox_debug_' + dc + '.jsp?mboxServerHost=mbox3.offermatica.com&clientCode=mcafee&'
 + 'session=' + mboxCookies.getCookie('session')
 + '"><' + '\/scr' + 'ipt>');
 }
 else if (dc.indexOf("log") == 0) {
 this.p = new mboxDebugActionLog(dc);
 }
 else if (dc == "reset") {
 dc = null;
 }
 else {
 this.p = new mboxDebugActionDefault();
 }
 }

 if (this.p != null) {
 if (bc.isSupported()) {
 bc.addOnLoad(mboxDisplayDebugInfo);
 }
 else {
 alert("mbox functionality is not supported on this browser");
 this.disable();
 }
 }

 if (dc != null) {
 mboxCookies.setCookie(this.cc, dc, 45 * 60);
 }
 else {
 this.disable()
 }
};

mboxDebug.prototype.isEnabled = function() {
 return this.p != null;
};


mboxDebug.prototype.disable = function() {
 mboxCookies.deleteCookie(this.cc);
};

mboxDebug.prototype.setShowAction = function(p) {
 this.p = p;
};

mboxDebug.prototype.show = function() {
 if (this.p != null) {
 this.p.show();
 }
};


mboxDebugActionLog = function(dc) {
 this.dc = dc;
 this.ec = (new Date()).getTime();
};

mboxDebugActionLog.prototype.show = function() {
 var fc = (new Date()).getTime();

 var gc = new mboxDebugWindow("Debug Log");

 gc.putPageStart();
 
 gc.put("<img sr" + "c='"
 + document.location.protocol + "//mbox3.offermatica.com/ima" + "ges/log.gif"
 + "?mboxDebug=" + this.dc
 + "&mboxClient=mcafee"
 + "&mboxPageLoadTime=" + (fc - this.ec) + "'/>");

 gc.put("<br />");

 gc.putCloseButton();
 gc.putPageEnd();
};



mboxDebugActionNone = function() {
};

mboxDebugActionNone.prototype.show = function() {
 alert("Debug mode not defined"
 + "\n('x-mode' not supported when debug is remote in mbox.js)");
};


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(" <ul>");

 if (mboxFactoryDefault.isEnabled()) {
 window.put("  <li>Enabled: true</li>");
 } else {
 window.put(
 '  <li>Enabled: <span style="color:red"><b>false</b></span></li>');
 }

 window.put("  <li>Cookies enabled: " + mboxCookieIsEnabled() + "</li>");
 window.put("  <li>Page URL: '" + document.location + "'</li>");
 window.put("  <li>Cookies: '" + document.cookie + "'</li>");


 mboxFactoryDefault.getMboxes().each(function(J) {
 var Q = J.getName();
 window.put("  <li>mbox: '" + Q + "'");
 window.put("   <ul>");

 if (J.message != '') {
 window.put('   <li><span style="color: red"><b>Error: '
 + J.message + '</b></span></li>');
 }

 var ub = document.getElementById(J.getMarkerName());
 if (ub == null) {
 window.put('    <li><span style="color: red">'
 + '<b>Error: can not find mbox in dom</b></span></li>');
 }

 window.put('    <li><a href="' + J.getURL() + '">'
 + J.getURL() + '</a></li>');

 window.put("   </ul>");
 window.put("  </li>");
 });

 window.put(" </ul>");

 window.putCloseButton();
 window.putPageEnd();
};

mboxDebugWindow = function(g) {
 this.g = g + " " + document.location.hostname;

 var hc = /\W/g;
 var ic = this.g.replace(hc, '_');

 this.gc = window.open("", "mboxDebugWindow" + ic,
 "width=600,height=300,resizable,scrollbars=yes,toolbar=yes");

 if (this.gc == null) {
 alert("Unable to open Offermatica's mboxDebugWindow Window.\n"
 + "Are you blocking popups?\n");
 }
};

mboxDebugWindow.prototype.put = function(kc) {
 if (this.gc == null) {
 return;
 }

 try {
 this.gc.document.writeln(kc);
 this.gc.scrollBy(0, 1000);
 } catch (e) {
 alert("Unable to write to the current mboxDebug window.\n"
 + "Please close any open debug window");
 this.gc = 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.gc != null) {
 this.gc.document.close();
 }
};

if (typeof mboxDebugger == 'undefined') {
 mboxDebugger = new mboxDebug("debug",
 "mboxDebug", mboxFactoryDefault);
}
mboxBuildURL = function(e, b) {
 var s = mboxServerURL;
 var p = "";
 var G = new RegExp('(\'|"|%22|%27)');
 s += "?" + b[0];
 for (var c = 1; c < b.length; c++) {
 s += "&" + b[c];
 var D = b[c].split('=');
 if (G.exec(D[0])) {
 throw "Mbox " + e +
 " has a parameter naming containing invalid characters: '" +
 b[c] + "'";
 }
 }
 if (document.location.protocol == "https:") {
 s = s.replace("http:", "https:")
 }
 if (typeof mboxServerIp != 'undefined') {
 if (mboxServerIp == '216.49.80.138' || mboxServerIp == '216.49.80.185' || mboxServerIp.indexOf('172.') == 0){
 p = "staging.";
 }
 }
 s += "&mboxHost=" + p + document.location.host;
 if (s.indexOf('mboxSession') == -1) {
 s += "&mboxSession=" + mboxSessionId.getId();
 }
 s += "&mboxPC=" + mboxPCId.getId();
 s += "&mboxPage=" + mboxPageId;
 s += "&mboxURL=" + escape(document.location);
 var H = escape(document.referrer);
 if (s.length + H.length < 2000) {
 s += "&mboxReferrer=" + H;
 }
 return s + "&mboxVersion=" + mboxVersion;
};