var mboxCopyright = "&copy; 2004-2007 Offermatica &trade; Corporation";mboxCreate = function(a ) { if (!mboxEnv.isSupported()) { return; } var b = new Array(); b[0] = 'mbox=' + a; for (var c = 1; c < arguments.length; c++) { b[c] = arguments[c]; } b[b.length] = "mboxCount=" + ++mboxCount; var d = new mbox(a, b); d.put(); return d;};mbox = function mbox(e, b) { try { this.f = null; this.g = 0; this.h = null; this.i = new mboxOfferContent(); this.j = this.show; this.error = null; this.k = new Object(); this.l = 0; if (mboxs[e]) { this.hide(); var m = "Mbox name used multiple times: '" + e + '"'; throw m; } this.e = e; mboxs[e] = this; this.n = mboxBuildURL(e, b); this.o(); } catch (p) { mboxs[e].setError(p); this.hide(); throw p; }}; mbox.prototype.o = function() { if (new RegExp('(\'|"|%22|%27)').exec(this.e)) { throw "Mbox Name " + this.e + " contains invalid characters."; } if (this.e.length > 250) { throw "Mbox Name " + this.e + " exceeds max length of " + "250 characters."; }}; mbox.prototype.getName = function() { return this.e;};mbox.prototype.parameters = function() { return mboxGetParamsFromQueryString(this.n);};mbox.prototype.setError = function(m) { this.error = m; this.q = this.putNothing; this.j = this.hide;};mbox.prototype.put = function() { if (mboxEnv.isEnabled()) { this.setEventTime("put.start"); document.write( '<div id="' + this.getMarkerName() + '" style="visibility:hidden;display:none">' + '<' + 'scr' + 'ipt language="JavaScript">' + 'mboxs["' + this.e + '"].startTimeout(15000);' + '<' + '\/scr' + 'ipt>' + '<' + 'scr' + 'ipt src="' + mboxEscapeQuote(this.n) + '" language="JavaScript"><' + '\/scr' + 'ipt>' + '</div>'); this.setEventTime("put.end"); } else { document.write('<div id="' + this.getMarkerName() + '"></div>'); }};mbox.prototype.putNothing = function() { document.write('<div id="' + this.getMarkerName() + '"></div>');};mbox.prototype.activate = function() { if (this.g) { return this.g; } this.setEventTime('activate' + ++this.l + '.start'); if (this.j()) { this.cancelTimeout(); this.g = 1; } this.setEventTime('activate' + this.l + '.end'); return this.g;};mbox.prototype.isActivated = function() { return this.g;};mbox.prototype.setActivateAction = function(r) { this.j = r;};mbox.prototype.setOffer = function(i) { this.i = i;};mbox.prototype.getOffer = function() { return this.i;};mbox.prototype.show = function() { this.setEventTime('show.start'); var s = this.i.show(this); this.setEventTime(s == 1 ? "show.end.ok" : "show.end"); return s;};mbox.prototype.showContent = function(t) { if (t == null) { return 0; } var u = this.getDefaultDiv(); if (u != null && u.parentNode.replaceChild) { u.parentNode.replaceChild(t, u); } else { var v = document.getElementById(this.getMarkerName()); if (v == null) { return 0; } if (u != null) { mboxMakeDivInvisible(u); } mboxMakeDivVisible(v); } mboxMakeDivVisible(t); return 1;};mbox.prototype.hide = function() { this.setEventTime('hide.start'); var v = document.getElementById(this.getMarkerName()); if (v != null) { v.style.visibility = "hidden"; v.style.display = "none"; } var u = this.getDefaultDiv(); if (u != null) { u.style.visibility = "visible"; u.style.display = "block"; this.setEventTime('hide.end.ok'); return 1; } this.setEventTime('hide.end.fail'); return 0;};mbox.prototype.finalize = function() { this.setEventTime('finalize.start'); this.cancelTimeout(); if (!this.activate()) { this.hide(); this.setEventTime('finalize.end.hide'); } this.setEventTime('finalize.end.ok');};mbox.prototype.startTimeout = function(w) { this.f = setTimeout('mboxCheckTimeoutById("' + this.e + '")', w);};mbox.prototype.cancelTimeout = function() { if (this.f != null) { clearTimeout(this.f); }};mbox.prototype.getImportDiv = function() { return document.getElementById(this.getImportName());};mbox.prototype.getDefaultDiv = function() { if (this.h != null) { return this.h; } var x = document.getElementById(this.getMarkerName()); while (x != null) { if ((x.nodeType == 1) && (x.nodeName == "DIV")) { if (x.className.indexOf('mboxMarker-') > 0) { return null; } else if (x.className == 'mboxDefault') { this.h = x; return x; } } x = x.previousSibling; } return null;};mbox.prototype.setActivateAction = function(action) { this.j = action;};mbox.prototype.getMarkerName = function() { return 'mboxMarker-' + this.e;};mbox.prototype.getImportName = function() { return 'mboxImported-' + this.e;};mbox.prototype.setEventTime = function(y) { this.k[y] = (new Date()).getTime();};mbox.prototype.getEventTimes = function() { return this.k;};mbox.prototype.getURL = function() { return this.n;};mboxMakeDivVisible = function(z) { z.style.visibility = "visible"; z.style.display = "block";};mboxMakeDivInvisible = function(z) { z.style.visibility = "hidden"; z.style.display = "none";};mboxGetParamsFromQueryString = function(url) { var A = new Object(); var B = url.indexOf("?"); if (B == -1 || B == (url.length - 1)) { return A; } var C = url.substring(B + 1); var D = C.split("&"); for (var c = 0; c < D.length; c++) { var E = D[c].split("="); if (E.length < 2 || E[0] == "" || E[1] == "") { continue; } else { A[E[0]] = E[1]; } } return A;};mboxEscapeQuote = function(text) { return text.replace(/\"/g, '&quot;').replace(/>/g, '&gt;');};mboxOfferContent = function() {};mboxOfferContent.prototype.show = function(F) { var t = F.getImportDiv(); return F.showContent(t);};mboxOfferDefault = function() {};mboxOfferDefault.prototype.show = function(F) { return F.hide();};mboxParametersClient = function() { return "";};mboxBuildURL = function(e, b) { var s = mboxServerURL; 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:") } s += "&mboxHost=" + document.location.hostname; 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;};mboxIsSupported = function() { return true;};mboxEnvironment = function(I) { this.J = mboxIsSupported() && document.getElementById && (window.attachEvent || document.addEventListener || window.addEventListener); this.K = this.J; if (mboxGetPageParameter(I) != null) { this.K = false; } if (!mboxCookies.isEnabled()) { this.K = false; } if (mboxCookies.getCookie('disable') == "true") { this.K = false; } if (this.isAdmin()) { this.enable(); }};mboxEnvironment.prototype.isEnabled = function() { return this.K;};mboxEnvironment.prototype.isSupported= function() { return this.J;};mboxEnvironment.prototype.disable = function(w) { if (typeof duration == 'undefined') { w = 60 * 60; } if (!this.isAdmin()) { this.K = false; mboxCookies.setCookie('disable', "true", w); }};mboxEnvironment.prototype.enable = function() { this.K = true; mboxCookies.deleteCookie('disable');};mboxEnvironment.prototype.isAdmin = function() { return document.location.href.indexOf( 'mboxEnv') != -1;};mboxEnvironment.prototype.limitTraffic = function(L, w) { if (L == 100) { return; } var M = false; if (mboxCookies.getCookie('traffic') == 'true') { M = true; } if (this.isAdmin()) { M = true; mboxCookies.setCookie('level', L, w); mboxCookies.setCookie('traffic', M, w); } else if ( parseInt(mboxCookies.getCookie('level')) != L) { M = (Math.random() * 100) <= L; mboxCookies.setCookie('level', L, w); mboxCookies.setCookie('traffic', M, w); } if (M) { this.enable(); } else { this.disable(); }};mboxCookieManager = function mboxCookieManager(N, O) { this.N = N; if (O.indexOf(".") == -1) { O = ""; } this.O = O == "" ? "" : "; domain=" + O; this.loadCookies();};mboxCookieManager.prototype.isEnabled = function() { this.setCookie('check', "true", 60); this.loadCookies(); return this.getCookie('check') == "true";};mboxCookieManager.prototype.setCookie = function(N, P, w) { if (typeof N != 'undefined' && typeof P != 'undefined' && typeof w != 'undefined') { this.Q[N] = { name:N, value:escape(P), expireOn:Math.ceil(w + new Date().getTime() / 1000) }; this.saveCookies(); }};mboxCookieManager.prototype.getCookie = function(N) { var R = this.Q[N]; if (typeof R == 'undefined' || R == null) { return null; } return unescape(R.value);};mboxCookieManager.prototype.deleteCookie = function(N) { var S = new Object(); for (R in this.Q) { if (R != N) { S[R] = this.Q[R]; } } this.Q = S; this.saveCookies();};mboxCookieManager.prototype.getCookieNames = function(T) { var U = new Object(); for (R in this.Q) { if (R.indexOf(T) == 0) { U[U.length] = R; } } return U;};mboxCookieManager.prototype.saveCookies = function() { var V = new Array(); var W = 0; for (R in this.Q) { if (this.Q[R] != null) { V[V.length] = this.Q[R].name + "#" + this.Q[R].value + "#" + this.Q[R].expireOn; if (W < this.Q[R].expireOn) { W = this.Q[R].expireOn; } } } var X = new Date(W * 1000); document.cookie = this.N + "=" + V.join("|") + "; expires=" + X.toGMTString() + "; path=/" + this.O;};mboxCookieManager.prototype.loadCookies = function() { this.Q = new Object(); var Y = document.cookie.indexOf(this.N + "="); if (Y != -1) { var Z = document.cookie.indexOf(";", Y); if (Z == -1) { Z = document.cookie.indexOf(",", Y); if (Z == -1) { Z = document.cookie.length; } } var _ = document.cookie.substring( Y + this.N.length + 1, Z).split("|"); var ab = Math.ceil(new Date().getTime() / 1000); for (var c = 0; c < _.length; c++) { var R = _[c].split("#"); if (ab <= R[2]) { this.Q[R[0]] = {name:R[0], value:R[1], expireOn:R[2]} } } }};mboxSetCookie = function(N, P, w) { mboxCookies.setCookie(N, P, w);};mboxGetCookie = function(N) { return mboxCookies.getCookie(N);};mboxActivateById = function(e) { mboxs[e].activate();};mboxCheckTimeoutById = function(e) { mboxs[e].activate(); if (!mboxs[e].isActivated()) { mboxEnv.disable(); window.location.reload(false); }};mboxCheckAll = function() { for (var F in mboxs) { mboxs[F].finalize(); }};mboxSetupSignal = function(bb, a ) { var b = new Array(); for (var c = 1; c < arguments.length; c++) { b[c - 1] = arguments[c]; } mboxCookies.setCookie("signal-" + bb, b.join("&"), 45 * 60);};mboxSignal = function() { var cb = mboxCookies.getCookieNames( "signal-"); for (db in cb) { var eb = mboxCookies.getCookie(cb[db]); var b = eb.split("&"); var a = b[0]; b[0] = 'mbox=' + a; b[b.length] = "mboxCount=" + --mboxSignalCount; var fb = new mbox(a, b); fb.put(); mboxCookies.deleteCookie(cb[db]); }}; mboxDefaultContentDisplayNone = function() { document.write("<style>." + 'mboxDefault' + " { visibility:hidden; }</style>");};mboxSession = function(gb, hb, ib, jb) { this.hb = hb; this.ib = ib; this.jb = jb; this.kb = false; this.e = mboxGetPageParameter(this.hb); if (this.e == null || this.e.length == 0) { this.e = mboxCookies.getCookie('session'); if (this.e == null || this.e.length == 0) { this.e = gb; this.kb = true; } } mboxCookies.setCookie( 'session', this.e, jb);};mboxSession.prototype.getId = function() { return this.e;};mboxSession.prototype.forceId = function(lb) { this.e = lb; mboxCookies.setCookie(this.ib, this.e, this.jb);};mboxPC = function(gb, ib, jb) { this.ib = ib; this.jb = jb; this.e = mboxCookies.getCookie(this.ib); if (this.e == null || this.e.length == 0) { this.e = gb; }};mboxPC.prototype.getId = function() { mboxCookies.setCookie('PC', this.e, this.jb); return this.e;};mboxPC.prototype.forceId = function(lb) { if (this.e != lb) { this.e = lb; mboxCookies.setCookie(this.ib, this.e, this.jb); return true; } return false;};mboxGenerateId = function() { return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);};mboxGetPageParameter = function(N) { var s = null; var mb = new RegExp(N + "=([^\&]*)"); var nb = mb.exec(document.location); if (nb != null && nb.length >=2) { s = nb[1]; } return s;};mboxCookieIsEnabled = function() { mboxCookies.setCookie('check', "true", 60); return mboxCookies.getCookie('check') == "true";};mboxSafeBodyOnload = function(r) { if (window.addEventListener) { window.addEventListener('load', r, false); } else if (document.addEventListener) { document.addEventListener('load', r, false); } else if (document.attachEvent) { window.attachEvent('onload', r); }};mboxCookiePageDomain = function() { var O = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1]; var ob = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/; if (!ob.exec(O)) { var pb = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(O); if (pb) { O = pb[0]; } } return O ? O: "";};mboxCookieDomain = function() { return mboxCookiePageDomain();};if (typeof mboxVersion == 'undefined') { var mboxVersion = 23; var mboxServerURL = "http://mbox3.offermatica.com/m2/skype/mbox/standard"; var mboxCookies = new mboxCookieManager("mbox", mboxCookieDomain()); var mboxPageId = mboxGenerateId(); var mboxSessionId = new mboxSession(mboxPageId, 'mboxSession', 'session', 31 * 60); var mboxPCId = new mboxPC(mboxPageId, 'PC', 63072000); var mboxs = new Object(); var mboxCount = 0; var mboxSignalCount = 0; var mboxEnv = new mboxEnvironment('mboxDisable'); var mboxPageStartTime = new Date().getTime(); var mboxPageEndTime = mboxPageStartTime; mboxSafeBodyOnload(new Function("mboxPageEndTime = new Date().getTime()")); if (mboxEnv.isSupported()) { mboxSafeBodyOnload(mboxCheckAll); mboxEnv.limitTraffic(100, 10368000); if (mboxEnv.isEnabled()) { mboxSignal(); mboxDefaultContentDisplayNone(); } } };mboxDisplayDebugInfo = function() { mboxDebugger.show();};mboxDebug = function(qb, rb, sb) { this.tb = qb; this.r = null; var ub = mboxGetPageParameter(rb); if (ub == null) { ub = mboxCookies.getCookie(this.tb); } if (ub != null) { if (ub.indexOf("x") == 0) { this.r = new mboxDebugActionNone(); document.write('<' + 'scr' + 'ipt language="Javascript1.2" src=' + '"http://admin3.offermatica.com/admin/mbox/mbox_debug_' + ub + '.jsp"' + '><' + '\/scr' + 'ipt>'); } else if (ub.indexOf("log") == 0) { this.r = new mboxDebugActionLog(ub); } else if (ub == "reset") { ub = null; } else { this.r = new mboxDebugActionDefault(); } } if (this.r != null) { if (sb.isSupported()) { mboxSafeBodyOnload(mboxDisplayDebugInfo) } else { alert("mbox functionality is not supported on this browser"); this.disable(); } } if (ub != null) { mboxCookies.setCookie(this.tb, ub, 45 * 60); } else { this.disable() }};mboxDebug.prototype.isEnabled = function() { return this.r != null;};mboxDebug.prototype.disable = function() { mboxCookies.deleteCookie(this.tb);};mboxDebug.prototype.setShowAction = function(r) { this.r = r;};mboxDebug.prototype.show = function() { if (this.r != null) { this.r.show(); }};mboxDebugActionLog = function(ub) { this.ub = ub; this.vb = (new Date()).getTime();};mboxDebugActionLog.prototype.show = function() { var wb = (new Date()).getTime(); var xb = new mboxDebugWindow("Debug Log"); xb.putPageStart(); xb.put("<img src='http://mbox3.offermatica.com/admin/images/spacer.gif" + "?mboxDebug=" + this.ub + "&mboxClient=signalup" + "&mboxPageLoadTime=" + (wb - this.vb) + "&mboxCount=" + mboxCount + "&mboxSignalCount=" + mboxSignalCount + "'>"); xb.put("<br />"); xb.putCloseButton(); xb.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 (mboxEnv.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>"); for (a in mboxs) { window.put("  <li>mbox: '" + a + "'"); window.put("   <ul>"); if (mboxs[a].error != null) { window.put('   <li><span style="color: red"><b>Error: ' + mboxs[a].error + '</b></span></li>'); } var v = document.getElementById(mboxs[a].getMarkerName()); if (v == null) { window.put('    <li><span style="color: red">' + '<b>Error: can not find mbox in dom</b></span></li>'); } else { window.put("    <li>has mboxDefault content div tags: " + (mboxs[a].getDefaultDiv() != null) + "</li>"); } window.put('    <li><a href="' + mboxs[a].getURL() + '">' + mboxs[a].getURL() + '</a></li>'); window.put("   </ul>"); window.put("  </li>"); } window.put(" </ul>"); window.putCloseButton(); window.putPageEnd();};mboxDebugWindow = function(N) { this.N = N + " " + document.location.hostname; var yb = /\W/g; var zb = this.N.replace(yb, '_'); this.xb = window.open("", "mboxDebugWindow" + zb, "width=600,height=300,resizable,scrollbars=yes,toolbar=yes"); if (this.xb == null) { alert("Unable to open Offermatica's mboxDebugWindow Window.\n" + "Are you blocking popups?\n"); }};mboxDebugWindow.prototype.put = function(Bb) { if (this.xb == null) { return; } try { this.xb.document.writeln(Bb); this.xb.scrollBy(0, 1000); } catch (e) { alert("Unable to write to the current mboxDebug window.\n" + "Please close any open debug window"); this.xb = 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.N + "</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.xb != null) { this.xb.document.close(); }};if (typeof mboxDebugger == 'undefined') { mboxDebugger = new mboxDebug("debug", "mboxDebug", mboxEnv);}