/*var mboxCopyright = "Copyright 2003-2006 Offermatica Corporation. All Rights Reserved.";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) { this.f = mboxBuildURL(b); this.g = null; this.h = 0; this.i = null; this.j = new mboxOfferContent(); this.k = this.show; this.error = null; this.l = new Object(); this.m = 0; if (mboxs[e]) { var n = "multiple mboxes called: '" + e + '"'; this.setError(n); mboxs[e].setError(n); e = e + "-dup-" + Math.floor(Math.random() * 999999); } this.e = e; mboxs[e] = this;};mbox.prototype.getName = function() { return this.e;};mbox.prototype.parameters = function() { return mboxGetParamsFromQueryString(this.f);};mbox.prototype.setError = function(n) { this.error = n; this.o = this.putNothing; this.k = 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="' + this.f + '" 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.h) { return this.h; } this.setEventTime('activate' + ++this.m + '.start'); if (this.k()) { this.cancelTimeout(); this.h = 1; } this.setEventTime('activate' + this.m + '.end'); return this.h;};mbox.prototype.isActivated = function() { return this.h;};mbox.prototype.setActivateAction = function(p) { this.k = p;};mbox.prototype.setOffer = function(j) { this.j = j;};mbox.prototype.getOffer = function() { return this.j;};mbox.prototype.show = function() { this.setEventTime('show.start'); var q = this.j.show(this); this.setEventTime(q == 1 ? "show.end.ok" : "show.end"); return q;};mbox.prototype.showContent = function(r) { if (r == null) { return 0; } var s = this.getDefaultDiv(); if (s != null && s.parentNode.replaceChild) { s.parentNode.replaceChild(r, s); } else { var t = document.getElementById(this.getMarkerName()); if (t == null) { return 0; } if (s != null) { mboxMakeDivInvisible(s); } mboxMakeDivVisible(t); } mboxMakeDivVisible(r); return 1;};mbox.prototype.hide = function() { this.setEventTime('hide.start'); var t = document.getElementById(this.getMarkerName()); if (t != null) { t.style.visibility = "hidden"; t.style.display = "none"; } var s = this.getDefaultDiv(); if (s != null) { s.style.visibility = "visible"; s.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(u) { this.g = setTimeout('mboxCheckTimeoutById("' + this.e + '")', u);};mbox.prototype.cancelTimeout = function() { if (this.g != null) { clearTimeout(this.g); }};mbox.prototype.getImportDiv = function() { return document.getElementById(this.getImportName());};mbox.prototype.getDefaultDiv = function() { if (this.i != null) { return this.i; } var v = document.getElementById(this.getMarkerName()); while (v != null) { if ((v.nodeType == 1) && (v.nodeName == "DIV")) { if (v.className.indexOf('mboxMarker-') > 0) { return null; } else if (v.className == 'mboxDefault') { this.i = v; return v; } } v = v.previousSibling; } return null;};mbox.prototype.setActivateAction = function(action) { this.k = action;};mbox.prototype.getMarkerName = function() { return 'mboxMarker-' + this.e;};mbox.prototype.getImportName = function() { return 'mboxImported-' + this.e;};mbox.prototype.setEventTime = function(w) { this.l[w] = (new Date()).getTime();};mbox.prototype.getEventTimes = function() { return this.l;};mbox.prototype.getURL = function() { return this.f;};mboxMakeDivVisible = function(x) { x.style.visibility = "visible"; x.style.display = "block";};mboxMakeDivInvisible = function(x) { x.style.visibility = "hidden"; x.style.display = "none";};mboxGetParamsFromQueryString = function(url) { var y = new Object(); var z = url.indexOf("?"); if (z == -1 || z == (url.length - 1)) { return y; } var A = url.substring(z + 1); var B = A.split("&"); for (var c = 0; c < B.length; c++) { var C = B[c].split("="); if (C.length < 2 || C[0] == "" || C[1] == "") { continue; } else { y[C[0]] = C[1]; } } return y;};mboxOfferContent = function() {};mboxOfferContent.prototype.show = function(D) { var r = D.getImportDiv(); return D.showContent(r);};mboxOfferDefault = function() {};mboxOfferDefault.prototype.show = function(D) { return D.hide();};mboxParametersClient = function() { return "";};mboxBuildURL = function(b) { var q = mboxServerURL; q += "?" + b[0]; for (var c = 1; c < b.length; c++) { q += "&" + b[c]; } if (document.location.protocol == "https:") { q = q.replace("http:", "https:") } q += "&mboxHost=" + document.location.hostname; if (q.indexOf('mboxSession') == -1) { q += "&mboxSession=" + mboxSessionId.getId(); } q += "&mboxPC=" + mboxPCId.getId(); q += "&mboxPage=" + mboxPageId; q += "&mboxURL=" + escape(document.location); var E = escape(document.referrer); if (q.length + E.length < 2000) { q += "&mboxReferrer=" + E; } return q + "&mboxVersion=" + mboxVersion;};mboxIsSupported = function() { return true;};mboxEnvironment = function(F) { this.G = mboxIsSupported() && document.getElementById && (window.attachEvent || document.addEventListener || window.addEventListener); this.H = this.G; if (mboxGetPageParameter(F) != null) { this.H = false; } if (!mboxCookies.isEnabled()) { this.H = false; } if (mboxCookies.getCookie('disable') == "true") { this.H = false; } if (this.isAdmin()) { this.enable(); }};mboxEnvironment.prototype.isEnabled = function() { return this.H;};mboxEnvironment.prototype.isSupported= function() { return this.G;};mboxEnvironment.prototype.disable = function(u) { if (typeof duration == 'undefined') { u = 60 * 60; } if (!this.isAdmin()) { this.H = false; mboxCookies.setCookie('disable', "true", u); }};mboxEnvironment.prototype.enable = function() { this.H = true; mboxCookies.deleteCookie('disable');};mboxEnvironment.prototype.isAdmin = function() { return document.location.href.indexOf( 'mboxEnv') != -1;};mboxEnvironment.prototype.limitTraffic = function(I, u) { if (I == 100) { return; } var J = false; if (mboxCookies.getCookie('traffic') == 'true') { J = true; } if (this.isAdmin()) { J = true; mboxCookies.setCookie('level', I, u); mboxCookies.setCookie('traffic', J, u); } else if ( parseInt(mboxCookies.getCookie('level')) != I) { J = (Math.random() * 100) <= I; mboxCookies.setCookie('level', I, u); mboxCookies.setCookie('traffic', J, u); } if (J) { this.enable(); } else { this.disable(); }};mboxCookieManager = function mboxCookieManager(K, L) { this.K = K; if (L.indexOf(".") == -1) { L = ""; } this.L = L == "" ? "" : "; domain=" + L; this.loadCookies();};mboxCookieManager.prototype.isEnabled = function() { this.setCookie('check', "true", 60); this.loadCookies(); return this.getCookie('check') == "true";};mboxCookieManager.prototype.setCookie = function(K, M, u) { if (typeof K != 'undefined' && typeof M != 'undefined' && typeof u != 'undefined') { this.N[K] = { name:K, value:escape(M), expireOn:Math.ceil(u + new Date().getTime() / 1000) }; this.saveCookies(); }};mboxCookieManager.prototype.getCookie = function(K) { var O = this.N[K]; if (typeof O == 'undefined' || O == null) { return null; } return unescape(O.value);};mboxCookieManager.prototype.deleteCookie = function(K) { var P = new Object(); for (O in this.N) { if (O != K) { P[O] = this.N[O]; } } this.N = P; this.saveCookies();};mboxCookieManager.prototype.getCookieNames = function(Q) { var R = new Object(); for (O in this.N) { if (O.indexOf(Q) == 0) { R[R.length] = O; } } return R;};mboxCookieManager.prototype.saveCookies = function() { var S = new Array(); var T = 0; for (O in this.N) { if (this.N[O] != null) { S[S.length] = this.N[O].name + "#" + this.N[O].value + "#" + this.N[O].expireOn; if (T < this.N[O].expireOn) { T = this.N[O].expireOn; } } } var U = new Date(T * 1000); document.cookie = this.K + "=" + S.join("|") + "; expires=" + U.toGMTString() + "; path=/" + this.L;};mboxCookieManager.prototype.loadCookies = function() { this.N = new Object(); var V = document.cookie.indexOf(this.K + "="); if (V != -1) { var W = document.cookie.indexOf(";", V); if (W == -1) { W = document.cookie.indexOf(",", V); if (W == -1) { W = document.cookie.length; } } var X = document.cookie.substring( V + this.K.length + 1, W).split("|"); var Y = Math.ceil(new Date().getTime() / 1000); for (var c = 0; c < X.length; c++) { var O = X[c].split("#"); if (Y <= O[2]) { this.N[O[0]] = {name:O[0], value:O[1], expireOn:O[2]} } } }};mboxSetCookie = function(K, M, u) { mboxCookies.setCookie(K, M, u);};mboxGetCookie = function(K) { return mboxCookies.getCookie(K);};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 D in mboxs) { mboxs[D].finalize(); }}; mboxSetupSignal = function(Z, a ) { var b = new Array(); for (var c = 1; c < arguments.length; c++) { b[c - 1] = arguments[c]; } mboxCookies.setCookie("signal-" + Z, b.join("&"), 45 * 60);};mboxSignal = function() { var _ = mboxCookies.getCookieNames( "signal-"); for (ab in _) { var bb = mboxCookies.getCookie(_[ab]); var b = bb.split("&"); var a = b[0]; b[0] = 'mbox=' + a; b[b.length] = "mboxCount=" + --mboxSignalCount; var cb = new mbox(a, b); cb.put(); mboxCookies.deleteCookie(_[ab]); }}; mboxDefaultContentDisplayNone = function() { document.write("<style>." + 'mboxDefault' + " { visibility:hidden; }</style>");};mboxSession = function(db, eb, fb, gb) { this.eb = eb; this.fb = fb; this.gb = gb; this.hb = false; this.e = mboxGetPageParameter(this.eb); if (this.e == null || this.e.length == 0) { this.e = mboxCookies.getCookie('session'); if (this.e == null || this.e.length == 0) { this.e = db; this.hb = true; } } mboxCookies.setCookie( 'session', this.e, gb);};mboxSession.prototype.getId = function() { return this.e;};mboxSession.prototype.forceId = function(ib) { this.e = ib; mboxCookies.setCookie(this.fb, this.e, this.gb);};mboxPC = function(db, fb, gb) { this.fb = fb; this.gb = gb; this.e = mboxCookies.getCookie(this.fb); if (this.e == null || this.e.length == 0) { this.e = db; }};mboxPC.prototype.getId = function() { mboxCookies.setCookie('PC', this.e, this.gb); return this.e;};mboxPC.prototype.forceId = function(ib) { if (this.e != ib) { this.e = ib; mboxCookies.setCookie(this.fb, this.e, this.gb); return true; } return false;};mboxGenerateId = function() { return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);};mboxGetPageParameter = function(K) { var q = null; var jb = new RegExp(K + "=([^\&]*)"); var kb = jb.exec(document.location); if (kb != null && kb.length >=2) { q = kb[1]; } return q;};mboxCookieIsEnabled = function() { mboxCookies.setCookie('check', "true", 60); return mboxCookies.getCookie('check') == "true";};mboxSafeBodyOnload = 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); }};mboxCookiePageDomain = function() { var L = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1]; var lb = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/; if (!lb.exec(L)) { var mb = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(L); if (mb) { L = mb[0]; } } return L ? L: "";};mboxCookieDomain = function() { return mboxCookiePageDomain();};if (typeof mboxVersion == 'undefined') { var mboxVersion = 23; var mboxServerURL = "http://mbox3.offermatica.com/m2/ringcentral/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(nb, ob, pb) { this.qb = nb; this.p = null; var rb = mboxGetPageParameter(ob); if (rb == null) { rb = mboxCookies.getCookie(this.qb); } if (rb != null) { if (rb.indexOf("x") == 0) { this.p = new mboxDebugActionNone(); document.write('<' + 'scr' + 'ipt language="Javascript1.2" src=' + '"http://admin3.offermatica.com/admin/mbox/mbox_debug_' + rb + '.jsp"' + '><' + '\/scr' + 'ipt>'); } else if (rb.indexOf("log") == 0) { this.p = new mboxDebugActionLog(rb); } else if (rb == "reset") { rb = null; } else { this.p = new mboxDebugActionDefault(); } } if (this.p != null) { if (pb.isSupported()) { mboxSafeBodyOnload(mboxDisplayDebugInfo) } else { alert("mbox functionality is not supported on this browser"); this.disable(); } } if (rb != null) { mboxCookies.setCookie(this.qb, rb, 45 * 60); } else { this.disable() }};mboxDebug.prototype.isEnabled = function() { return this.p != null;};mboxDebug.prototype.disable = function() { mboxCookies.deleteCookie(this.qb);};mboxDebug.prototype.setShowAction = function(p) { this.p = p;};mboxDebug.prototype.show = function() { if (this.p != null) { this.p.show(); }};mboxDebugActionLog = function(rb) { this.rb = rb; this.sb = (new Date()).getTime();};mboxDebugActionLog.prototype.show = function() { var tb = (new Date()).getTime(); var ub = new mboxDebugWindow("Debug Log"); ub.putPageStart(); ub.put("<img src='http://mbox3.offermatica.com/admin/images/spacer.gif" + "?mboxDebug=" + this.rb + "&mboxClient=ringcentral" + "&mboxPageLoadTime=" + (tb - this.sb) + "&mboxCount=" + mboxCount + "&mboxSignalCount=" + mboxSignalCount + "'>"); ub.put("<br />"); ub.putCloseButton(); ub.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 t = document.getElementById(mboxs[a].getMarkerName()); if (t == 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(K) { this.K = K + " " + document.location.hostname; var vb = /\W/g; var wb = this.K.replace(vb, '_'); this.ub = window.open("", "mboxDebugWindow" + wb, "width=600,height=300,resizable,scrollbars=yes,toolbar=yes"); if (this.ub == null) { alert("Unable to open Offermatica's mboxDebugWindow Window.\n" + "Are you blocking popups?\n"); return; }};mboxDebugWindow.prototype.put = function(yb) { if (this.ub == null) { return; } try { this.ub.document.writeln(yb); this.ub.scrollBy(0, 1000); } catch (e) { alert("Unable to write to the current mboxDebug window.\n" + "Please close any open debug window"); this.ub = 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.K + "</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.ub != null) { this.ub.document.close(); }};if (typeof mboxDebugger == 'undefined') { mboxDebugger = new mboxDebug("debug", "mboxDebug", mboxEnv);} 
*/

/*var mboxCopyright = "Copyright 2004-2007 Offermatica (tm) 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 = false; this.A = new mboxList(); this.B = 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.C = this.B; if (mboxGetPageParameter('mboxDisable') != null) { this.C = false; } if (!mboxCookies.isEnabled()) { this.C = false; } if (mboxCookies.getCookie('disable') == 'true') { this.C = false; } if (this.isAdmin()) { this.enable(); } this.D = mboxGenerateId(); this.E = new mboxSession(this.D, 'mboxSession', 'session', 31 * 60); this.F = new mboxPC(this.D, 'PC', 63072000); this.w = new mboxUrlBuilder(y, b); this.G(); this.H = new Date().getTime(); this.I = this.H; var J = this; this.addOnLoad(function() { J.I = new Date().getTime(); }); if (this.B) { this.addOnLoad(function() { J.z = true; J.getMboxes().each(function(K) { K.setFetcher(new mboxAjaxFetcher()), K.finalize(); }); }); this.limitTraffic(100, 10368000); if (this.C) { this.L(); this.M = new mboxSignaler(function(N, c) { return J.create(N, c); }); } }};mboxFactory.prototype.isEnabled = function() { return this.C;};mboxFactory.prototype.isSupported = function() { return this.B;};mboxFactory.prototype.disable = function(O) { if (typeof duration == 'undefined') { O = 60 * 60; } if (!this.isAdmin()) { this.C = false; mboxCookies.setCookie('disable', 'true', O); }};mboxFactory.prototype.enable = function() { this.C = true; mboxCookies.deleteCookie('disable');};mboxFactory.prototype.isAdmin = function() { return document.location.href.indexOf( 'mboxEnv') != -1;};mboxFactory.prototype.limitTraffic = function(P, O) {};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.I - this.H;};mboxFactory.prototype.getEllapsedTimeUntil = function(Q) { return Q - this.H;};mboxFactory.prototype.getMboxes = function() { return this.A;};mboxFactory.prototype.get = function(N, R) { return this.A.get(N).getById(R || 0);};mboxFactory.prototype.update = function(N, c) { if (!this.isEnabled()) { return; } if (this.A.get(N).length() == 0) { throw "Mbox " + N + " is not defined"; } this.A.get(N).each(function(K) { K.getUrlBuilder() .addParameter('mboxRandomRequestId', mboxGenerateId()); K.load(c); });};mboxFactory.prototype.create = function(N, c, S) { if (!this.isSupported()) { return null; } var e = this.w.clone(); e.addParameter("mboxCount", this.A.length() + 1); e.addParameters(c); var R = this.A.get(N).length(); var T; if (S) { if (typeof S == 'string') { T = new mboxLocatorNamed(S); } else { T = new mboxLocatorNode(S); } } else { T = new mboxLocatorDefault(N + '-' + R); } try { var J = this; var K = new mbox(N, R, e, T); if (this.C) { K.setFetcher(this.z ? new mboxAjaxFetcher() : new mboxStandardFetcher()); } K.setOnError(function(U, n) { K.setMessage(U); if (n == 'standard') { K.activate(); if (!K.isActivated()) { J.disable(); window.location.reload(false); } } else { throw U; } }); this.A.add(K); } catch (V) { this.disable(); throw 'Failed creating mbox, the error was: ' + V; } return K;};mboxFactory.prototype.getPageId = function() { return this.D;};mboxFactory.prototype.getPCId = function() { return this.F;};mboxFactory.prototype.getSessionId = function() { return this.E;};mboxFactory.prototype.getSignaler = function() { return this.M;};mboxFactory.prototype.getUrlBuilder = function() { return this.w;};mboxFactory.prototype.G = function() { var e = this.w; e.addParameter('mboxHost', document.location.hostname) .addParameter('mboxSession', this.E.getId()); if (this.F.getId() != null) { e.addParameter('mboxPC', this.F.getId()); } e.addParameter('mboxPage', this.D); var W = mboxCookies.getCookie('edge'); if (W != null) { e.addParameter('edge', W); } e.setUrlProcessAction(function(e) { e += '&mboxURL=' + escape(document.location); var X = escape(document.referrer); if (e.length + X.length < 2000) { e += '&mboxReferrer=' + X; } e += '&mboxVersion=' + mboxVersion; return e; });};mboxFactory.prototype.Y = function() { return "";};mboxFactory.prototype.L = function() { document.write('<style>.' + 'mboxDefault' + ' { visibility:hidden; }</style>');};mboxSignaler = function(Z) { var _ = mboxCookies.getCookieNames('signal-'); for (var j = 0; j < _.length; j++) { var ab = _[j]; var bb = mboxCookies.getCookie(ab).split('&'); var K = Z(bb[0], bb); K.load(); mboxCookies.deleteCookie(ab); }};mboxSignaler.prototype.signal = function(cb, N ) { mboxCookies.setCookie('signal-' + cb, mboxShiftArray(arguments).join('&'), 45 * 60);};mboxList = function() { this.A = new Array();};mboxList.prototype.add = function(K) { if (K != null) { this.A[this.A.length] = K; }};mboxList.prototype.get = function(N) { var db = new mboxList(); for (var j = 0; j < this.A.length; j++) { var K = this.A[j]; if (K.getName() == N) { db.add(K); } } return db;};mboxList.prototype.getById = function(eb) { return this.A[eb];};mboxList.prototype.length = function() { return this.A.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.A.length; j++) { p(this.A[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 fb = document.getElementById(this.g); while (fb != null) { if (fb.nodeType == 1) { if (fb.className == 'mboxDefault') { return fb; } } fb = fb.previousSibling; } return null;};mboxLocatorDefault.prototype.force = function() { var gb = document.createElement('div'); gb.className = 'mboxDefault'; var hb = document.getElementById(this.g); hb.parentNode.insertBefore(gb, hb); return gb;};mboxLocatorNamed = function(ib) { this.jb = ib;};mboxLocatorNamed.prototype.locate = function() { return document.getElementById(this.jb);};mboxLocatorNamed.prototype.force = function() { return null;};mboxLocatorNode = function(kb) { this.fb = kb;};mboxLocatorNode.prototype.locate = function() { return this.fb;};mboxLocatorNode.prototype.force = function() { return null;};mboxCreate = function(N ) { var K = mboxFactoryDefault.create(N, mboxShiftArray(arguments)); if (K) { K.load(); } return K;};mboxDefine = function(S, N ) { var K = mboxFactoryDefault.create(N, mboxShiftArray(mboxShiftArray(arguments)), S); return K;};mboxUpdate = function(N ) { mboxFactoryDefault.update(N, mboxShiftArray(arguments));};mbox = function(g, jb, w, lb) { this.mb = null; this.nb = 0; this.ob = null; this.T = lb; this.pb = null; this.qb = new mboxOfferContent(); this.gb = this.getDefaultDiv(); this.w = w; this.message = ''; this.rb = new Object(); this.sb = 0; this.jb = jb; this.g = g; this.tb(); w.addParameter('mbox', g) .addParameter('mboxId', jb); this.ub = function() {}; this.vb = function() {};};mbox.prototype.getId = function() { return this.jb;};mbox.prototype.tb = 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.vb = p; return this;};mbox.prototype.setMessage = function(U) { this.message = U; return this;};mbox.prototype.setOnError = function(ub) { this.ub = ub; return this;};mbox.prototype.setFetcher = function(wb) { if (this.pb) { this.pb.cancel(); } this.pb = wb; return this;};mbox.prototype.getFetcher = function() { return this.pb;};mbox.prototype.load = function(c) { if (this.pb == null) { return this; } this.setEventTime("load.start"); this.cancelTimeout(); var w = (c && c.length > 0) ? this.w.clone().addParameters(c) : this.w; this.pb.fetch(w); var J = this; this.xb = setTimeout(function() { J.ub('Fetch of mbox timed out', J.pb.getType()); }, 15000); this.setEventTime("load.end"); return this;};mbox.prototype.loaded = function(c) { this.cancelTimeout(); if (!this.activate()) { var J = this; setTimeout(function() { J.loaded(); }, 100); }};mbox.prototype.activate = function() { if (this.nb) { return this.nb; } this.setEventTime('activate' + ++this.sb + '.start'); if (this.show()) { this.cancelTimeout(); this.nb = 1; } this.setEventTime('activate' + this.sb + '.end'); return this.nb;};mbox.prototype.isActivated = function() { return this.nb;};mbox.prototype.setOffer = function(qb) { if (qb && qb.show && qb.setOnLoad) { this.qb = qb; } else { throw 'Invalid offer'; } return this;};mbox.prototype.getOffer = function() { return this.qb;};mbox.prototype.show = function() { this.setEventTime('show.start'); var db = this.qb.show(this); this.setEventTime(db == 1 ? "show.end.ok" : "show.end"); return db;};mbox.prototype.showContent = function(yb) { if (yb == null) { return 0; } if (this.gb == null) { this.gb = this.getDefaultDiv(); if (this.gb == null) { return 0; } } if (this.gb != yb) { this.zb(this.gb); this.gb.parentNode.replaceChild(yb, this.gb); this.gb = yb; } this.Ab(yb); this.vb(); return 1;};mbox.prototype.hide = function() { this.setEventTime('hide.start'); var db = this.showContent(this.getDefaultDiv()); this.setEventTime(db == 1 ? 'hide.end.ok' : 'hide.end.fail'); return db;};mbox.prototype.finalize = function() { this.setEventTime('finalize.start'); this.cancelTimeout(); if (this.getDefaultDiv() == null) { if (this.T == null) { this.setMessage('No locator specified'); } else { if (this.T.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.xb) { clearTimeout(this.xb); } if (this.pb != null) { this.pb.cancel(); }};mbox.prototype.getDiv = function() { return this.gb;};mbox.prototype.getDefaultDiv = function() { if (this.ob != null) { return this.ob; } if (this.T == null) { return null; } this.ob = this.T.locate(); return this.ob;};mbox.prototype.setEventTime = function(Bb) { this.rb[Bb] = (new Date()).getTime();};mbox.prototype.getEventTimes = function() { return this.rb;};mbox.prototype.getURL = function() { return this.w.buildUrl();};mbox.prototype.getUrlBuilder = function() { return this.w;};mbox.prototype.Cb = function(gb) { return gb.style.display != 'none';};mbox.prototype.Ab = function(gb) { this.Db(gb, true);};mbox.prototype.zb = function(gb) { this.Db(gb, false);};mbox.prototype.Db = function(gb, Eb) { gb.style.visibility = Eb ? "visible" : "hidden"; gb.style.display = Eb ? "block" : "none";};mboxOfferContent = function() { this.vb = function() {};};mboxOfferContent.prototype.show = function(K) { var db = K.showContent(document.getElementById( this.Fb(K))); if (db == 1) { this.vb(); } return db;};mboxOfferContent.prototype.setOnLoad = function(vb) { this.vb = vb;};mboxOfferContent.prototype.Fb = function(K) { return 'mboxImported-' + K.getName() + '-' + K.getId();};mboxOfferAjax = function(yb) { this.yb = yb; this.vb = function() {};};mboxOfferAjax.prototype.setOnLoad = function(vb) { this.vb = vb;};mboxOfferAjax.prototype.show = function(K) { var Gb = document.createElement('div'); Gb.id = 'mboxImported-' + K.getName() + '-' + K.getId(); Gb.innerHTML = this.yb; var db = K.showContent(Gb); if (db == 1) { this.vb(); } return db;};mboxOfferDefault = function() { this.vb = function() {};};mboxOfferDefault.prototype.setOnLoad = function(vb) { this.vb = vb;};mboxOfferDefault.prototype.show = function(K) { var db = K.hide(); if (db == 1) { this.vb(); } return db;};mboxCookieManager = function mboxCookieManager(g, Hb) { this.g = g; this.Hb = Hb == '' || Hb.indexOf('.') == -1 ? '' : '; domain=' + Hb; this.loadCookies();};mboxCookieManager.prototype.isEnabled = function() { this.setCookie('check', 'true', 60); this.loadCookies(); return this.getCookie('check') == 'true';};mboxCookieManager.prototype.setCookie = function(g, h, O) { if (typeof g != 'undefined' && typeof h != 'undefined' && typeof O != 'undefined') { var eb = this.Ib.length; for (var j = 0; j < this.Ib.length; j++) { if (this.Ib[j].name == g) { eb = j; break; } } var Jb = new Object(); Jb.name = g; Jb.value = escape(h); Jb.expireOn = Math.ceil(O + new Date().getTime() / 1000); this.Ib[eb] = Jb; this.saveCookies(); }};mboxCookieManager.prototype.getCookie = function(g) { for (var j = 0; j < this.Ib.length; j++) { var Jb = this.Ib[j]; if (Jb.name == g) { return unescape(Jb.value); } } return null;};mboxCookieManager.prototype.deleteCookie = function(g) { var Kb = new Array(); for (var j = 0; j < this.Ib.length; j++) { var Jb = this.Ib[j]; if (Jb.name != g) { Kb[Kb.length] = Jb; } } this.Ib = Kb; this.saveCookies();};mboxCookieManager.prototype.getCookieNames = function(Lb) { var Mb = new Array(); for (var j = 0; j < this.Ib.length; j++) { var Jb = this.Ib[j]; if (Jb.name.indexOf(Lb) == 0) { Mb[Mb.length] = Jb.name; } } return Mb;};mboxCookieManager.prototype.saveCookies = function() { var Nb = new Array(); var Ob = 0; for (var j = 0; j < this.Ib.length; j++) { var Jb = this.Ib[j]; Nb[Nb.length] = Jb.name + '#' + Jb.value + '#' + Jb.expireOn; if (Ob < Jb.expireOn) { Ob = Jb.expireOn; } } var Pb = new Date(Ob * 1000); document.cookie = this.g + '=' + Nb.join('|') + '; expires=' + Pb.toGMTString() + '; path=/' + this.Hb;};mboxCookieManager.prototype.loadCookies = function() { this.Ib = new Array(); var Qb = document.cookie.indexOf(this.g + '='); if (Qb != -1) { var Rb = document.cookie.indexOf(';', Qb); if (Rb == -1) { Rb = document.cookie.indexOf(',', Qb); if (Rb == -1) { Rb = document.cookie.length; } } var Sb = document.cookie.substring( Qb + this.g.length + 1, Rb).split('|'); var Tb = Math.ceil(new Date().getTime() / 1000); for (var j = 0; j < Sb.length; j++) { var Jb = Sb[j].split('#'); if (Tb <= Jb[2]) { var Ub = new Object(); Ub.name = Jb[0]; Ub.value = Jb[1]; Ub.expireOn = Jb[2]; this.Ib[this.Ib.length] = Ub; } } }};mboxSession = function(Vb, Wb, ab, Xb) { this.Wb = Wb; this.ab = ab; this.Xb = Xb; this.Yb = false; this.jb = typeof mboxForceSessionId != 'undefined' ? mboxForceSessionId : mboxGetPageParameter(this.Wb); if (this.jb == null || this.jb.length == 0) { this.jb = mboxCookies.getCookie(ab); if (this.jb == null || this.jb.length == 0) { this.jb = Vb; this.Yb = true; } } mboxCookies.setCookie(ab, this.jb, Xb);};mboxSession.prototype.getId = function() { return this.jb;};mboxSession.prototype.forceId = function(Zb) { this.jb = Zb; mboxCookies.setCookie(this.ab, this.jb, this.Xb);};mboxPC = function(Vb, ab, Xb) { this.ab = ab; this.Xb = Xb; this.jb = typeof mboxForcePCId != 'undefined' ? mboxForcePCId : mboxCookies.getCookie(ab); if (this.jb != null) { mboxCookies.setCookie(ab, this.jb, Xb); }};mboxPC.prototype.getId = function() { return this.jb;};mboxPC.prototype.forceId = function(Zb) { if (this.jb != Zb) { this.jb = Zb; mboxCookies.setCookie(this.ab, this.jb, this.Xb); return true; } return false;};mboxGetPageParameter = function(g) { var db = null; var _b = new RegExp(g + "=([^\&]*)"); var ac = _b.exec(document.location); if (ac != null && ac.length >= 2) { db = ac[1]; } return db;};mboxSetCookie = function(g, h, O) { return mboxCookies.setCookie(g, h, O);};mboxGetCookie = function(g) { return mboxCookies.getCookie(g);};mboxCookiePageDomain = function() { var Hb = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1]; var bc = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/; if (!bc.exec(Hb)) { var cc = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(Hb); if (cc) { Hb = cc[0]; } } return Hb ? Hb: "";};mboxShiftArray = function(dc) { var db = new Array(); for (var j = 1; j < dc.length; j++) { db[db.length] = dc[j]; } return db;};mboxGenerateId = function() { return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);};if (typeof mboxVersion == 'undefined') { var mboxVersion = 32; var mboxCookies = new mboxCookieManager("mbox", (function() { return mboxCookiePageDomain(); })()); var mboxFactoryDefault = new mboxFactory('mbox3.offermatica.com', 'ringcentral');};mboxDisplayDebugInfo = function() { mboxDebugger.show();};mboxCookieIsEnabled = function() { mboxCookies.setCookie('check', "true", 60); return mboxCookies.getCookie('check') == "true"};mboxDebug = function(ec, fc, gc) { this.hc = ec; this.p = null; var ic = mboxGetPageParameter(fc); if (ic == null) { ic = mboxCookies.getCookie(this.hc); } if (ic != null) { if (ic.indexOf("x") == 0) { this.p = new mboxDebugActionNone(); document.write('<' + 'scr' + 'ipt language="Javascript1.2" src=' + '"http://admin3.offermatica.com/admin/mbox/mbox_debug_' + ic + '.jsp?mboxServerHost=mbox3.offermatica.com&clientCode=ringcentral&' + 'session=' + mboxCookies.getCookie('session') + '"><' + '\/scr' + 'ipt>'); } else if (ic.indexOf("log") == 0) { this.p = new mboxDebugActionLog(ic); } else if (ic == "reset") { ic = null; } else { this.p = new mboxDebugActionDefault(); } } if (this.p != null) { if (gc.isSupported()) { gc.addOnLoad(mboxDisplayDebugInfo); } else { alert("mbox functionality is not supported on this browser"); this.disable(); } } if (ic != null) { mboxCookies.setCookie(this.hc, ic, 45 * 60); } else { this.disable() }};mboxDebug.prototype.isEnabled = function() { return this.p != null;};mboxDebug.prototype.disable = function() { mboxCookies.deleteCookie(this.hc);};mboxDebug.prototype.setShowAction = function(p) { this.p = p;};mboxDebug.prototype.show = function() { if (this.p != null) { this.p.show(); }};mboxDebugActionLog = function(ic) { this.ic = ic; this.jc = (new Date()).getTime();};mboxDebugActionLog.prototype.show = function() { var kc = (new Date()).getTime(); var lc = new mboxDebugWindow("Debug Log"); lc.putPageStart(); lc.put("<img sr" + "c='" + document.location.protocol + "//mbox3.offermatica.com/ima" + "ges/log.gif" + "?mboxDebug=" + this.ic + "&mboxClient=ringcentral" + "&mboxPageLoadTime=" + (kc - this.jc) + "'/>"); lc.put("<br />"); lc.putCloseButton(); lc.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(K) { var R = K.getName(); window.put("  <li>mbox: '" + R + "'"); window.put("   <ul>"); if (K.message != '') { window.put('   <li><span style="color: red"><b>Error: ' + K.message + '</b></span></li>'); } if (K.getDefaultDiv() == null) { window.put('    <li><span style="color: red">' + '<b>Error: cannot find mbox in dom</b></span></li>'); } window.put('    <li><a href="' + K.getURL() + '">' + K.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 mc = /\W/g; var nc = this.g.replace(mc, '_'); this.lc = window.open("", "mboxDebugWindow" + nc, "width=600,height=300,resizable,scrollbars=yes,toolbar=yes"); if (this.lc == null) { alert("Unable to open Offermatica's mboxDebugWindow Window.\n" + "Are you blocking popups?\n"); }};mboxDebugWindow.prototype.put = function(pc) { if (this.lc == null) { return; } try { this.lc.document.writeln(pc); this.lc.scrollBy(0, 1000); } catch (e) { alert("Unable to write to the current mboxDebug window.\n" + "Please close any open debug window"); this.lc = 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.lc != null) { this.lc.document.close(); }};if (typeof mboxDebugger == 'undefined') { mboxDebugger = new mboxDebug("debug", "mboxDebug", mboxFactoryDefault);}
*/
 
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') != 'true'; 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', 63072000, 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.isSupported = function() { return this.F;};mboxFactory.prototype.disable = function(U) { if (typeof U == 'undefined') { U = 60 * 60; } if (!this.isAdmin()) { this.G = false; this.I.setCookie('disable', 'true', 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(V, 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(W) { return W - this.N;};mboxFactory.prototype.getMboxes = function() { return this.E;};mboxFactory.prototype.get = function(T, X) { return this.E.get(T).getById(X || 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, Y) { if (!this.isSupported()) { return null; } var e = this.w.clone(); e.addParameter('mboxCount', this.E.length() + 1); e.addParameters(c); var X = this.E.get(T).length(); var Z = this.C + '-' + T + '-' + X; var _; if (Y) { _ = new mboxLocatorNode(Y); } else { if (this.D) { throw 'The page has already been loaded, can\'t write marker'; } _ = new mboxLocatorDefault(Z); } try { var P = this; var ab = 'mboxImported-' + Z; var Q = new mbox(T, X, e, _, ab); if (this.G) { Q.setFetcher(this.D ? new mboxAjaxFetcher() : new mboxStandardFetcher()); } Q.setOnError(function(bb, n) { Q.setMessage(bb); if (n == 'standard') { Q.activate(); if (!Q.isActivated()) { P.disable(); window.location.reload(false); } } else { throw bb; } }); this.E.add(Q); } catch (cb) { this.disable(); throw 'Failed creating mbox "' + T + '", the error was: ' + cb; } 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 db = this.I.getCookie('edge'); if (db != null) { e.addParameter('edge', db); } e.setUrlProcessAction(function(e) { e += '&mboxURL=' + escape(document.location); var eb = escape(document.referrer); if (e.length + eb.length < 2000) { e += '&mboxReferrer=' + eb; } e += '&mboxVersion=' + mboxVersion; return e; });};mboxFactory.prototype.fb = function() { return "";};mboxFactory.prototype.R = function() { document.write('<style>.' + 'mboxDefault' + ' { visibility:hidden; }</style>');};mboxSignaler = function(gb, I) { this.I = I; var hb = I.getCookieNames('signal-'); for (var j = 0; j < hb.length; j++) { var ib = hb[j]; var jb = I.getCookie(ib).split('&'); var Q = gb(jb[0], jb); Q.load(); I.deleteCookie(ib); }};mboxSignaler.prototype.signal = function(kb, T ) { this.I.setCookie('signal-' + kb, 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 lb = new mboxList(); for (var j = 0; j < this.E.length; j++) { var Q = this.E[j]; if (Q.getName() == T) { lb.add(Q); } } return lb;};mboxList.prototype.getById = function(mb) { return this.E[mb];};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 nb = document.getElementById(this.g); while (nb != null) { if (nb.nodeType == 1) { if (nb.className == 'mboxDefault') { return nb; } } nb = nb.previousSibling; } return null;};mboxLocatorDefault.prototype.force = function() { var ob = document.createElement('div'); ob.className = 'mboxDefault'; var pb = document.getElementById(this.g); pb.parentNode.insertBefore(ob, pb); return ob;};mboxLocatorNode = function(qb) { this.nb = qb;};mboxLocatorNode.prototype.locate = function() { return typeof this.nb == 'string' ? document.getElementById(this.nb) : this.nb;};mboxLocatorNode.prototype.force = function() { return null;};mboxCreate = function(T ) { var Q = mboxFactoryDefault.create(T, mboxShiftArray(arguments)); if (Q) { Q.load(); } return Q;};mboxDefine = function(Y, T ) { var Q = mboxFactoryDefault.create(T, mboxShiftArray(mboxShiftArray(arguments)), Y); return Q;};mboxUpdate = function(T ) { mboxFactoryDefault.update(T, mboxShiftArray(arguments));};mbox = function(g, rb, w, sb, ab) { this.tb = null; this.ub = 0; this.vb = null; this._ = sb; this.ab = ab; this.wb = null; this.xb = new mboxOfferContent(); this.ob = this.getDefaultDiv(); this.w = w; this.message = ''; this.yb = new Object(); this.zb = 0; this.rb = rb; this.g = g; this.Ab(); w.addParameter('mbox', g) .addParameter('mboxId', rb); this.Bb = function() {}; this.Cb = function() {};};mbox.prototype.getId = function() { return this.rb;};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 lb = new Array(); for (var j = 0; j < c.length; j++) { if (c[j].name.indexOf('mbox') != 0) { lb[lb.length] = c[j].name + '=' + c[j].value; } } return lb;};mbox.prototype.setOnLoad = function(p) { this.Cb = p; return this;};mbox.prototype.setMessage = function(bb) { this.message = bb; 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(); 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(c) { this.cancelTimeout(); if (!this.activate()) { var P = this; setTimeout(function() { P.loaded(); }, 100); }};mbox.prototype.activate = function() { if (this.ub) { return this.ub; } this.setEventTime('activate' + ++this.zb + '.start'); if (this.show()) { this.cancelTimeout(); this.ub = 1; } this.setEventTime('activate' + this.zb + '.end'); return this.ub;};mbox.prototype.isActivated = function() { return this.ub;};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 lb = this.xb.show(this); this.setEventTime(lb == 1 ? "show.end.ok" : "show.end"); return lb;};mbox.prototype.showContent = function(Fb) { if (Fb == null) { return 0; } if (this.ob == null) { this.ob = this.getDefaultDiv(); if (this.ob == null) { return 0; } } if (this.ob != Fb) { this.Gb(this.ob); this.ob.parentNode.replaceChild(Fb, this.ob); this.ob = Fb; } this.Hb(Fb); this.Cb(); return 1;};mbox.prototype.hide = function() { this.setEventTime('hide.start'); var lb = this.showContent(this.getDefaultDiv()); this.setEventTime(lb == 1 ? 'hide.end.ok' : 'hide.end.fail'); return lb;};mbox.prototype.finalize = function() { this.setEventTime('finalize.start'); this.cancelTimeout(); if (this.getDefaultDiv() == null) { if (this._ == null) { this.setMessage('No locator specified'); } else { if (this._.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.ob;};mbox.prototype.getDefaultDiv = function() { if (this.vb != null) { return this.vb; } if (this._ == null) { return null; } this.vb = this._.locate(); return this.vb;};mbox.prototype.setEventTime = function(Ib) { this.yb[Ib] = (new Date()).getTime();};mbox.prototype.getEventTimes = function() { return this.yb;};mbox.prototype.getImportName = function() { return this.ab;};mbox.prototype.getURL = function() { return this.w.buildUrl();};mbox.prototype.getUrlBuilder = function() { return this.w;};mbox.prototype.Jb = function(ob) { return ob.style.display != 'none';};mbox.prototype.Hb = function(ob) { this.Kb(ob, true);};mbox.prototype.Gb = function(ob) { this.Kb(ob, false);};mbox.prototype.Kb = function(ob, Lb) { ob.style.visibility = Lb ? "visible" : "hidden"; ob.style.display = Lb ? "block" : "none";};mboxOfferContent = function() { this.Cb = function() {};};mboxOfferContent.prototype.show = function(Q) { var lb = Q.showContent(document.getElementById(Q.getImportName())); if (lb == 1) { this.Cb(); } return lb;};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 Mb = document.createElement('div'); Mb.id = Q.getImportName(); Mb.innerHTML = this.Fb; var lb = Q.showContent(Mb); if (lb == 1) { this.Cb(); } return lb;};mboxOfferDefault = function() { this.Cb = function() {};};mboxOfferDefault.prototype.setOnLoad = function(Cb) { this.Cb = Cb;};mboxOfferDefault.prototype.show = function(Q) { var lb = Q.hide(); if (lb == 1) { this.Cb(); } return lb;};mboxCookieManager = function mboxCookieManager(g, Nb) { this.g = g; this.Nb = Nb == '' || Nb.indexOf('.') == -1 ? '' : '; domain=' + Nb; this.Ob = 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 Pb = new Object(); Pb.name = g; Pb.value = escape(h); Pb.expireOn = Math.ceil(U + new Date().getTime() / 1000); this.Ob.put(g, Pb); this.saveCookies(); }};mboxCookieManager.prototype.getCookie = function(g) { var Pb = this.Ob.get(g); return Pb ? unescape(Pb.value) : null;};mboxCookieManager.prototype.deleteCookie = function(g) { this.Ob.remove(g); this.saveCookies();};mboxCookieManager.prototype.getCookieNames = function(Qb) { var Rb = new Array(); this.Ob.each(function(g, Pb) { if (g.indexOf(Qb) == 0) { Rb[Rb.length] = g; } }); return Rb;};mboxCookieManager.prototype.saveCookies = function() { var Sb = new Array(); var Tb = 0; this.Ob.each(function(g, Pb) { Sb[Sb.length] = g + '#' + Pb.value + '#' + Pb.expireOn; if (Tb < Pb.expireOn) { Tb = Pb.expireOn; } }); var Ub = new Date(Tb * 1000); document.cookie = this.g + '=' + Sb.join('|') + '; expires=' + Ub.toGMTString() + '; path=/' + this.Nb;};mboxCookieManager.prototype.loadCookies = function() { this.Ob = new mboxMap(); var Vb = document.cookie.indexOf(this.g + '='); if (Vb != -1) { var Wb = document.cookie.indexOf(';', Vb); if (Wb == -1) { Wb = document.cookie.indexOf(',', Vb); if (Wb == -1) { Wb = document.cookie.length; } } var Xb = document.cookie.substring( Vb + this.g.length + 1, Wb).split('|'); var Yb = Math.ceil(new Date().getTime() / 1000); for (var j = 0; j < Xb.length; j++) { var Pb = Xb[j].split('#'); if (Yb <= Pb[2]) { var Zb = new Object(); Zb.name = Pb[0]; Zb.value = Pb[1]; Zb.expireOn = Pb[2]; this.Ob.put(Zb.name, Zb); } } }};mboxSession = function(_b, ac, ib, bc, I) { this.ac = ac; this.ib = ib; this.bc = bc; this.I = I; this.cc = false; this.rb = typeof mboxForceSessionId != 'undefined' ? mboxForceSessionId : mboxGetPageParameter(this.ac); if (this.rb == null || this.rb.length == 0) { this.rb = I.getCookie(ib); if (this.rb == null || this.rb.length == 0) { this.rb = _b; this.cc = true; } } I.setCookie(ib, this.rb, bc);};mboxSession.prototype.getId = function() { return this.rb;};mboxSession.prototype.forceId = function(dc) { this.rb = dc; this.I.setCookie(this.ib, this.rb, this.bc);};mboxPC = function(ib, bc, I) { this.ib = ib; this.bc = bc; this.I = I; this.rb = typeof mboxForcePCId != 'undefined' ? mboxForcePCId : I.getCookie(ib); if (this.rb != null) { I.setCookie(ib, this.rb, bc); }};mboxPC.prototype.getId = function() { return this.rb;};mboxPC.prototype.forceId = function(dc) { if (this.rb != dc) { this.rb = dc; this.I.setCookie(this.ib, this.rb, this.bc); return true; } return false;};mboxGetPageParameter = function(g) { var lb = null; var ec = new RegExp(g + "=([^\&]*)"); var fc = ec.exec(document.location); if (fc != null && fc.length >= 2) { lb = fc[1]; } return lb;};mboxSetCookie = function(g, h, U) { return mboxFactoryDefault.getCookieManager().setCookie(g, h, U);};mboxGetCookie = function(g) { return mboxFactoryDefault.getCookieManager().getCookie(g);};mboxCookiePageDomain = function() { var Nb = (/([^:]*)(:[0-9]{0,5})?/).exec(document.location.host)[1]; var gc = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/; if (!gc.exec(Nb)) { var hc = (/([^\.]+\.[^\.]{3}|[^\.]+\.[^\.]+\.[^\.]{2})$/).exec(Nb); if (hc) { Nb = hc[0]; } } return Nb ? Nb: "";};mboxShiftArray = function(ic) { var lb = new Array(); for (var j = 1; j < ic.length; j++) { lb[lb.length] = ic[j]; } return lb;};mboxGenerateId = function() { return (new Date()).getTime() + "-" + Math.floor(Math.random() * 999999);};if (typeof mboxVersion == 'undefined') { var mboxVersion = 33; var mboxFactories = new mboxMap(); var mboxFactoryDefault = new mboxFactory('mbox3.offermatica.com', 'ringcentral', 'default'); };mboxDebugActionsProto = function() { this.jc = new Object(); this.kc = new function() { this.show = function() {} };};mboxDebugActionsProto.prototype.register = function(g, p) { this.jc[g] = p;};mboxDebugActionsProto.prototype.registerDefault = function(p) { this.kc = p;};mboxDebugActionsProto.prototype.show = function(g) { var p = this.jc[g] ? this.jc[g] : this.kc; (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, lc) { var mc = 1; window.put("<hr/><ul><li><b>Factory</b>: <i>'" + g + "'</i></li><ul>"); window.put("<li><i>pageId</i>: " + lc.getPageId() + "</li>"); window.put("<li><i>mboxPC</i>: " + lc.getPCId().getId() + "</li>"); window.put("<li><i>sessionId</i>: " + lc.getSessionId().getId() + "</li>"); window.put("<hr/>"); lc.getMboxes().each(function(Q) { window.put("  <li>" + mc++ + ". '<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(nc, oc, lc) { this.pc = nc; this.p = null; this.I = lc.getCookieManager(); var qc = mboxGetPageParameter(oc); if (qc == null) { qc = this.I.getCookie(this.pc); } if (qc != null) { if (qc.indexOf("x") == 0) { document.write('<' + 'scr' + 'ipt language="Javascript1.2" src="' + 'http://admin3.offermatica.com/admin/mbox/mbox_debug_' + qc + '.jsp?clientCode=ringcentral' + '&mboxServerHost=mbox3.offermatica.com"><' + '\/scr' + 'ipt>'); } if (!lc.isSupported()) { alert("mbox functionality is not supported on this browser"); this.disable(); } lc.addOnLoad(function() { mboxDebugActions.show(qc); }); this.I.setCookie(this.pc, qc, 45 * 60); } else { this.disable(); }};mboxDebug.prototype.disable = function() { this.I.deleteCookie(this.pc);};mboxDebugWindow = function(g) { this.g = g + " " + document.location.hostname; var rc = /\W/g; var sc = this.g.replace(rc, '_'); this.uc = window.open("", "mboxDebugWindow" + sc, "width=600,height=300,resizable,scrollbars=yes,toolbar=yes"); if (this.uc == null) { alert("Unable to open debug window.\nAre you blocking popups?\n"); }};mboxDebugWindow.prototype.put = function(vc) { if (this.uc == null) { return; } try { this.uc.document.writeln(vc); this.uc.scrollBy(0, 1000); } catch (e) { alert("Unable to write to the current mboxDebug window.\n" + "Please close any open debug window"); this.uc = 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.uc != null) { this.uc.document.close(); }};if (typeof mboxDebugger == 'undefined') { mboxDebugger = new mboxDebug("debug", "mboxDebug", mboxFactoryDefault);}


/*function locationWithMBoxId(url_){
	url_=url_.replace(/&$/,'');
	if(url_.match(/\?.+$/))
		url_+='&mboxSession='+self.mboxSessionId.getId();
	if(url_.match(/\?$/))
		url_+='mboxSession='+self.mboxSessionId.getId();
	if(!url_.match(/\?/))
		url_+='/?mboxSession='+self.mboxSessionId.getId();
	window.location=url_;
}

function getSearchWithMBoxId(url_){
	url_=url_.replace(/&$/,'');
	url_+='&mboxSession='+self.mboxSessionId.getId();
	return url_;
}*/

function locationWithMBoxId(url_){
	url_=url_.replace(/&$/,'');
	if(url_.match(/\?.+$/))
		url_+='&mboxSession='+self.mboxFactoryDefault.getSessionId().getId();
	if(url_.match(/\?$/))
		url_+='mboxSession='+self.mboxFactoryDefault.getSessionId().getId();
	if(!url_.match(/\?/))
		url_+='/?mboxSession='+self.mboxFactoryDefault.getSessionId().getId();
	url_ = CookiesManager.attachCookie('oid', url_);
	window.location=url_;
}

function getSearchWithMBoxId(url_){
	url_=url_.replace(/&$/,'');
	url_+='&mboxSession='+self.mboxFactoryDefault.getSessionId().getId();
	url_ = CookiesManager.attachCookie('oid', url_);
	return url_;
}