

var mboxCopyright = "Copyright 2003-2005 Offermatica Corporation. All Rights Reserved. This software is the proprietary information of Offermatica Corporation. Use is subject to license terms.";


if (typeof mboxIncluded == 'undefined') {
 var mboxIncluded = true;
 var mboxVersion = 17;

 var mboxClientCode = 'zalecorp';
 var mboxServerURL = 'http://mbox3.offermatica.com/m2/zalecorp/mbox/standard';

 var mboxTrafficDuration = 10368000;

 if (typeof mboxPCIdExpireTime == 'undefined') {
 
 
 var mboxPCIdExpireTime = 2 * 365 * 24 * 60 * 60;
 }
 
 
 function mboxCookiePageDomain() {
 var k0 = document.location.host;
 var c1 = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;
 if (!c1.exec(document.location.host)) {
 var k2 = /[^\.]+\.[^\.]+$/;
 var d3 = k2.exec(document.location.hostname);
 if (d3) {
 k0 = d3[0];
 }
 }
 return k0;
 }
 var mboxCookies = new mboxCookieManager("mbox", mboxCookiePageDomain());
 
 var mboxSessionIdCookie = "session";
 var mboxPCIdCookie = "PC";
 var mboxDisableCookie = "disable";
 var mboxCheckCookie = "check";
 var mboxDebugModeCookie = "debug";
 var mboxTrafficLevelCookie="level";
 var mboxTrafficStateCookie="traffic";

 var mboxXDomainArg = "mboxXDomain";

 var mboxNameArg = "mbox";
 var mboxClientCodeArg = "mboxClient";
 var mboxPCIdArg = "mboxPC";
 var mboxSessionIdArg = "mboxSession";
 var mboxFirstPageInVisitArg = "mboxFirstPageInVisit";
 var mboxPageIdArg = "mboxPage";
 var mboxHostArg = "mboxHost";
 var mboxURLArg = "mboxURL";
 var mboxReferrerArg = "mboxReferrer";
 var mboxVersionArg = "mboxVersion";
 var mboxCountArg = "mboxCount";
 var mboxEnvironmentArg = "envId";
 var mboxMarkerDivPrefix = "mboxMarker-";
 var mboxImportDivPrefix = "mboxImported-";
 var mboxDefaultDivClass = "mboxDefault";
 var mboxSignalPrefix = "signal-";

 var mboxPageId = mboxGenerateId();
 var mboxSessionId = new mboxSession(mboxPageId, mboxSessionIdArg,
 mboxSessionIdCookie, 31 * 60);
 var mboxPCId = new mboxPC(mboxPageId, mboxPCIdCookie, mboxPCIdExpireTime);

 var mboxs = new Object(); 
 var mboxGlobalArguments = "";
 var mboxCount = 0; 
 var mboxSignalCount = 0;

 var mboxCampaignsStateVersion = 0;
 var mboxCampaigns = new Array();

 var mboxEnv = new mboxEnvironment("mboxDisable");

 var pageLoadStartTime = new Date().getTime();
 var pageLoadEndTime = pageLoadStartTime;
 mboxEnv.getSafeBodyOnload().add(
 new Function("pageLoadEndTime = new Date().getTime()"));

 var mboxDebugInfo = new mboxDebug(mboxDebugModeCookie, "mboxDebug", mboxEnv);

 if (mboxEnv.platform.isSupported()) {
 mboxEnv.getSafeBodyOnload().add(mboxCheckAll);

 mboxEnv.limitTraffic(100, 10368000);

 if (mboxEnv.isEnabled()) {
 mboxSignal();
 mboxDefaultContentDisplayNone();
 }
 else {
 
 }
 } 
}



function mboxCreate(a4 ) {
 if (!mboxEnv.platform.isSupported()) {
 return;
 }
 mboxEnv.getSafeBodyOnload().setup();

 var y5 = new Array();
 y5[0] = mboxNameArg + '=' + a4;
 for (var i = 1; i < arguments.length; i++) {
 y5[i] = arguments[i];
 }

 var k6 = new mbox(a4, y5);
 k6.put();
}


function mboxGlobalParameters() {
 for (var g7 = 0; g7 < arguments.length; g7++) {
 if (mboxGlobalArguments != "") {
 mboxGlobalArguments = mboxGlobalArguments + "&";
 } 
 mboxGlobalArguments = mboxGlobalArguments + arguments[g7];
 }
}


function mboxBase(c8, r9) {
 this.id = c8;
 this.url = r9;
 this.timeout = null;
 this.activated = 0;
 this.defaultDiv = null;

 this.offer = new mboxOfferContent();

 this.put = mbox_put;
 this.show = mbox_show;
 this.showContent = mbox_showContent;
 this.hide = mbox_hide;
 this.startTimeout = mbox_startTimeout;
 this.cancelTimeout = mbox_cancelTimeout;
 this.getDefaultDiv = mbox_getDefaultDiv;
 this.activate = mbox_activate;
 this.isActivated = mbox_isActivated;
 this.markerName = mbox_markerName;
 this.importName = mbox_importName;
 this.importDiv = mbox_getImportDiv;
 this.finalize = mbox_finalize;
 this.parameters = mbox_getParams;

 this.activateAction = mbox_show;
 this.setActivateAction = mbox_setActivateAction;
 this.setOffer = mbox_setOffer;

 this.time = new Object();
 this.activateCount = 0;
 this.setEventTime = mbox_setEventTime;


 this.error = null;

 if (mboxs[c8]) {
 this.error = "multiple mboxes with the id '" + c8 + "' exist on this page";
 this.put = mbox_putNothing;
 this.activateAction = mbox_hide;
 }

 mboxs[c8] = this;
}

function mbox(c8, y5) {
 this.base = mboxBase;
 y5[y5.length] = mboxCountArg + "=" + ++mboxCount;
 this.base(c8, mboxBuildURL(y5));
}

function mboxSignalMbox(c8, y5) {
 this.base = mboxBase;
 y5[y5.length] = mboxCountArg + "=" + --mboxSignalCount;
 this.base(c8, mboxBuildURL(y5));
}


function mbox_getParams() {
 return mboxGetParamsFromQueryString(this.url);
}

function mboxGetParamsFromQueryString(url) {
 var parameters = new Object();

 var position = url.indexOf("?");
 if (position == -1 || position == (url.length - 1)) {
 return parameters;
 }

 var queryString = url.substring(position + 1);
 var pairs = queryString.split("&");
 for (var i = 0; i < pairs.length; i++) {
 var pair = pairs[i].split("=");
 if (pair.length < 2 || pair[0] == "" || pair[1] == "") {
 continue;
 } else {
 parameters[pair[0]] = pair[1];
 }
 }

 return parameters;
}


function mbox_put() {
 if (mboxEnv.isEnabled()) {
 this.setEventTime("put.start");
 document.write(
 '<div id="' + this.markerName()
 + '" style="visibility:hidden;display:none">'
 + '<script language="JavaScript">'
 + 'mboxs["' + this.id + '"].startTimeout(15000);'
 + '<' + '\/script>'
 + '<script src="' + this.url + '" language="JavaScript"><'+ '\/script>'
 + '</div>');

 this.setEventTime("put.end");
 }
 else {
 document.write('<div id="' + this.markerName() + '"></div>');
 }
}

function mbox_putNothing() {
 document.write('<div id="' + this.markerName() + '"></div>');
}


function mbox_activate() {
 if (this.activated) {
 return this.activated;
 }
 this.setEventTime('activate' + ++this.activateCount + '.start');

 if (this.activateAction()) {
 this.cancelTimeout();
 this.activated = 1;
 }

 this.setEventTime('activate' + this.activateCount + '.end');
 return this.activated;
}


function mbox_isActivated() {
 return this.activated;
}


function mbox_setActivateAction(f10) {
 this.activateAction = f10;
}


function mbox_setOffer(y11) {
 this.offer = y11;
}


function mbox_show() {
 this.setEventTime('show.start');

 var result = this.offer.show(this);

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

 return result;
}


function mbox_showContent(n12) {
 
 if (n12 == null) {
 return 0;
 }

 var y13 = this.getDefaultDiv();

 if (mboxEnv.platform.supportsReplace()) {
 if (y13 != null) {
 y13.parentNode.replaceChild(n12, y13);
 }
 
 
 else {
 var m14 = document.getElementById(this.markerName());

 
 if (m14 == null) {
 return 0;
 }

 mboxMakeDivVisible(m14);
 }
 }
 
 
 else {
 var m14 = document.getElementById(this.markerName());

 
 if (m14 == null) {
 return 0;
 }

 if (y13 != null) {
 mboxMakeDivInvisible(y13);
 }

 mboxMakeDivVisible(m14);
 }

 mboxMakeDivVisible(n12);

 
 
 return 1;
}

function mboxMakeDivVisible(t15) {
 t15.style.visibility = "visible";
 t15.style.display = "block";
}

function mboxMakeDivInvisible(t15) {
 t15.style.visibility = "hidden";
 t15.style.display = "none";
}


function mbox_hide() {
 this.setEventTime('hide.start');

 var m14 = document.getElementById(this.markerName());
 if (m14 != null) {
 m14.style.visibility = "hidden";
 m14.style.display = "none";
 }

 var y13 = this.getDefaultDiv();

 if (y13 != null) {
 y13.style.visibility = "visible";
 y13.style.display = "block";

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

 return 1;
 }

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

 return 0;
}


function mbox_finalize() {
 this.setEventTime('finalize.start');

 this.cancelTimeout();

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

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

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

function mbox_startTimeout(e16) {
 this.timeout =
 setTimeout('mboxCheckTimeoutById("' + this.id + '")', e16);
}

function mbox_cancelTimeout() {
 if (this.timeout != null) {
 clearTimeout(this.timeout);
 }
}

function mbox_getImportDiv() {
 return document.getElementById(this.importName());
}

function mbox_getDefaultDiv() {
 if (this.defaultDiv != null) {
 return this.defaultDiv;
 }

 var node = document.getElementById(this.markerName());
 while (node != null) {
 
 if ((node.nodeType == 1) && (node.nodeName == "DIV")) {
 if (node.className.indexOf(mboxMarkerDivPrefix) > 0) {
 return null;
 } else if (node.className == mboxDefaultDivClass) {
 this.defaultDiv = node;

 return node;
 }
 }
 node = node.previousSibling;
 }

 return null;
}


function mbox_setActivateAction(action) {
 this.activateAction = action;
}

function mbox_markerName() {
 return mboxMarkerDivPrefix + this.id
}

function mbox_importName() {
 return mboxImportDivPrefix + this.id
}

function mbox_setEventTime(event) {
 this.time[event] = (new Date()).getTime();
}

function mboxOfferContent() {
 this.show = mboxOfferContent_show;
}

function mboxOfferContent_show(w17) {
 var n12 = w17.importDiv();

 return w17.showContent(n12);
}

function mboxOfferDefault() {
 this.show = mboxOfferDefault_show;
}

function mboxOfferDefault_show(w17) {
 return w17.hide();
}


function mboxBuildURL(y5) {
 var f18 = mboxServerURL;

 if (document.location.protocol == "https:") {
 f18 = f18.replace("http:", "https:")
 }
 f18 += "?" + mboxHostArg + "=" + document.location.hostname;

 for (var g7 = 0; g7 < y5.length; g7++) {
 f18 += "&" + y5[g7];
 }

 if (mboxGlobalArguments.length > 0) {
 f18 += "&" + mboxGlobalArguments;
 }

 if (f18.indexOf(mboxSessionIdArg) == -1) {
 f18 += "&" + mboxSessionIdArg + "=" + mboxSessionId.getId();
 }

 if (mboxSessionId.isNew()) {
 f18 += "&" + mboxFirstPageInVisitArg + "=" + true;
 }

 f18 = f18 + "&" + mboxPCIdArg + "=" + mboxPCId.getId()
 + "&" + mboxPageIdArg + "=" + mboxPageId
 
 + "&" + mboxURLArg + "=" + escape(document.location);

 var d19 = escape(document.referrer);
 if (f18.length + d19.length < 2000) {
 f18 += "&" + mboxReferrerArg + "=" + d19
 }

 return f18 + "&" + mboxVersionArg + "=" + mboxVersion;
}


function mboxEnvironment(j20) {
 this.platform = new mboxPlatform();
 this.d21 = null;

 this.p22 = this.platform.isSupported();

 if (mboxGetPageParameter(j20) != null) {
 this.p22 = false;
 }

 
 
 if (!mboxCookies.isEnabled()) {
 this.p22 = false;
 }
 if (mboxCookies.getCookie(mboxDisableCookie) == "true") {
 this.p22 = false;
 }
 

 this.isEnabled = mboxEnvironment_isEnabled;
 this.disable = mboxEnvironment_disable;
 this.enable = mboxEnvironment_enable;
 this.isAdmin = mboxEnvironment_isAdmin;
 this.limitTraffic = mboxEnvironment_limitTraffic;
 this.getSafeBodyOnload = mboxEnvironment_getSafeBodyOnload;

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

function mboxEnvironment_isEnabled() {
 return this.p22;
}

function mboxEnvironment_getSafeBodyOnload() {
 if (this.d21 == null) {
 this.d21 = new mboxSafeOnload(window);
 }

 return this.d21;
}

function mboxEnvironment_disable(duration) {
 if (typeof duration == 'undefined') {
 duration = 60 * 60;
 }
 if (!this.isAdmin()) {
 this.p22 = false;
 mboxCookies.setCookie(mboxDisableCookie, "true", duration);
 }
}

function mboxEnvironment_enable() {
 this.p22 = true;
 mboxCookies.deleteCookie(mboxDisableCookie);
}

function mboxEnvironment_isAdmin() {
 return document.location.href.indexOf(mboxEnvironmentArg) != -1;
}

function mboxEnvironment_limitTraffic(level, duration) {
 if (level == 100) {
 return;
 }

 var x23 = mboxCookies.getCookie(mboxTrafficStateCookie);

 if (this.isAdmin()) {
 x23 = true;
 mboxCookies.setCookie(mboxTrafficLevelCookie, level, duration);
 mboxCookies.setCookie(mboxTrafficStateCookie, x23, duration);
 }
 else if (x23 == null || mboxCookies.getCookie(mboxTrafficLevelCookie) != level) {
 x23 = (Math.random() * 100) <= level;
 mboxCookies.setCookie(mboxTrafficLevelCookie, level, duration);
 mboxCookies.setCookie(mboxTrafficStateCookie, x23, duration);
 }

 if (x23) {
 this.enable();
 }
 else {
 this.disable();
 }
}

function mboxCookieManager(d24, k0) {
 this.name = d24;

 if (k0.indexOf(".") == -1) {
 
 k0 = "";
 }

 this.domain = k0 == "" ? "" : "; domain=" + k0;

 this.isEnabled = mboxCookieManager_isEnabled;
 this.getCookie = mboxCookieManager_getCookie;
 this.setCookie = mboxCookieManager_setCookie;
 this.deleteCookie = mboxCookieManager_deleteCookie;
 this.getCookieNames = mboxCookieManager_getCookieNames;
 this.loadCookies = mboxCookieManager_loadCookies;
 this.saveCookies = mboxCookieManager_saveCookies;

 this.loadCookies();
}

function mboxCookieManager_isEnabled() {
 this.setCookie(mboxCheckCookie, "true", 60);
 this.loadCookies()
 return this.getCookie(mboxCheckCookie) == "true";
}



function mboxCookieManager_setCookie(d24, y25, e16) {
 if (typeof d24 != 'undefined' &&
 typeof y25 != 'undefined' &&
 typeof e16 != 'undefined') {

 this.cookies[d24] = {
 name:d24,
 value:escape(y25),
 
 expireOn:Math.ceil(e16 + new Date().getTime() / 1000)
 }
 this.saveCookies();
 }
}

function mboxCookieManager_getCookie(d24) {
 var b26 = this.cookies[d24];
 if (typeof b26 == 'undefined' || b26 == null) {
 return null;
 }
 return unescape(b26.value);
}

function mboxCookieManager_deleteCookie(d24) {
 var b27 = new Object();
 for (b26 in this.cookies) {
 if (b26 != d24) {
 b27[b26] = this.cookies[b26];
 }
 }
 this.cookies = b27;
 this.saveCookies();
}

function mboxCookieManager_getCookieNames(h28) {
 var w29 = new Object();
 for (b26 in this.cookies) {
 if (b26.indexOf(h28) == 0) {
 w29[w29.length] = b26;
 }
 }
 return w29;
}

function mboxCookieManager_loadCookies() {
 this.cookies = new Object();
 var y30 = document.cookie.indexOf(this.name + "=");
 if (y30 != -1) {
 var e31 = document.cookie.indexOf(";", y30);
 if (e31 == -1) {
 e31 = document.cookie.indexOf(",", y30);
 if (e31 == -1) {
 e31 = document.cookie.length;
 }
 }

 var y32 = document.cookie.substring(
 y30 + this.name.length + 1, e31).split("|");

 var x33 = Math.ceil(new Date().getTime() / 1000);
 for (var i = 0; i < y32.length; i++) {
 var b26 = y32[i].split("#");
 if (x33 <= b26[2]) {
 this.cookies[b26[0]] =
 {name:b26[0], value:b26[1], expireOn:b26[2]}
 }
 }
 }
}

function mboxCookieManager_saveCookies() {

 var x34 = new Array();
 var f35 = 0;
 for (b26 in this.cookies) {
 if (this.cookies[b26] != null) {
 x34[x34.length] = this.cookies[b26].name + "#" +
 this.cookies[b26].value + "#" + this.cookies[b26].expireOn;

 if (f35 < this.cookies[b26].expireOn) {
 f35 = this.cookies[b26].expireOn;
 }
 }
 }

 var z36 = new Date(f35 * 1000);
 document.cookie = this.name + "=" + x34.join("|")
 + "; expires=" + z36.toGMTString() + "; path=/" + this.domain;

}

function mboxTimedOut() {
 return mboxCookies.getCookie(mboxDisableCookie) == "true";
}

function mboxCancelTimeoutById(id) {
 mboxActivateById(id);
}

function mboxActivateById(id) {
 mboxs[id].activate();
}

function mboxCheckTimeoutById(id) {
 mboxActivateById(id);

 if (!mboxs[id].isActivated()) {
 mboxEnv.disable();
 
 window.location.reload(false);
 }
}


function mboxCheckAll() {
 for (var mbox in mboxs) {
 mboxs[mbox].finalize();
 }
}


function mboxGetDefaultDiv(a4) {
 return mboxs[a4].getDefaultDiv();
}


function mboxMarkerName(a4) {
 return mboxs[a4].markerName();
}


function mboxImportName(a4) {
 return mboxs[a4].importName();
}


function mboxSetupSignal(j37, a4 ) {
 var y5 = new Array();
 for (var i = 1; i < arguments.length; i++) {
 y5[i-1] = arguments[i];
 }
 mboxCookies.setCookie(mboxSignalPrefix + j37, y5.join("&"), 45 * 60);
}


function mboxSignal() {
 var k38 = mboxCookies.getCookieNames(mboxSignalPrefix);
 for (i39 in k38) {
 var w40 = mboxCookies.getCookie(k38[i39]);
 var y5 = w40.split("&");
 var a4 = y5[0];
 y5[0] = mboxNameArg + '=' + a4;
 var x41 = new mboxSignalMbox(a4, y5);
 x41.put();
 mboxCookies.deleteCookie(k38[i39]);
 }
}


function mboxDefaultContentDisplayNone() {
 document.write("<style>." + mboxDefaultDivClass
 + " { visibility:hidden; }</style>");
}


function mboxArg(l42, y25) {
 return l42 + "=" + escape(y25);
}


function mboxSession(q43, z44, z45, c46) {
 this.idArg = z44;
 this.cookieName = z45;
 this.expireTime = c46;

 this.newSession = false;

 this.id = mboxGetPageParameter(this.idArg);

 if (this.id == null || this.id.length == 0) {
 this.id = mboxCookies.getCookie(mboxSessionIdCookie);
 if (this.id == null || this.id.length == 0) {
 this.id = q43;
 this.newSession = true;
 }
 }

 mboxSetCookie(mboxSessionIdCookie, this.id, c46);

 this.getId = mboxSession_getId;
 this.isNew = mboxSession_isNew;
 this.reset = mboxSession_reset;
 this.forceId = mboxSession_forceId;
}


function mboxSession_getId() {
 return this.id;
}


function mboxSession_isNew() {
 return this.newSession;
}

function mboxSession_reset() {
 this.id = mboxGenerateId();

 mboxCookies.setCookie(this.cookieName, this.id, this.expireTime);
}

function mboxSession_forceId(forcedId, isNewSession) {
 this.id = forcedId;

 
 
 
 
 
 
 if (typeof isNewSession == 'undefined') {
 if (mboxCookies.getCookie(mboxSessionIdCookie) == forcedId) {
 this.newSession = false;
 } else {
 this.newSession = true;
 }
 } else {
 this.newSession = isNewSession;
 }

 mboxCookies.setCookie(this.cookieName, this.id, this.expireTime);
}


function mboxPC(q43, z45, c46) {
 this.cookieName = z45;
 this.expireTime = c46;

 this.id = mboxCookies.getCookie(this.cookieName);

 if (this.id == null || this.id.length == 0) {
 this.id = q43;
 }

 this.getId = mboxPC_getId;
 this.forceId = mboxPC_forceId;
}


function mboxPC_getId() {
 
 mboxCookies.setCookie(mboxPCIdCookie, this.id, this.expireTime);

 return this.id;
}


function mboxPC_forceId(forcedId) {
 if (this.id != forcedId) {
 this.id = forcedId;

 mboxCookies.setCookie(this.cookieName, this.id, this.expireTime);

 return true;
 }

 return false;
}

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

function mboxGetPageParameter(name) {
 var f18 = null;

 var q47 = new RegExp(name + "=([^\&]*)");
 var l48 = q47.exec(document.location);
 if (l48 != null && l48.length >=2) {
 f18 = l48[1];
 }

 return f18;
}

function mboxDisplayDebugInfo() {
 mboxDebugInfo.show();
}

function mboxDebug(h49, y50, b51) {
 this.debugCookie = h49;

 this.isEnabled = mboxDebug_isEnabled;
 this.disable = mboxDebug_disable;
 this.show = mboxDebug_show;
 this.setShowAction = mboxDebug_setShowAction;
 this.action = null;

 var w52 = mboxGetPageParameter(y50);
 if (w52 == null) {
 w52 = mboxCookies.getCookie(this.debugCookie);
 }

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

 document.write('<script language="Javascript1.2" src="'
 + 'http://admin3.offermatica.com/admin/mbox/mbox_debug_' + w52 + '.js'
 + '"><' + '\/script>');
 }
 else if (w52.indexOf("log") == 0) {
 this.action = new mboxDebugActionLog(w52);
 }
 else if (w52 == "reset") {
 w52 = null;
 }
 else {
 this.action = new mboxDebugActionDefault();
 }
 }

 if (this.action != null) {
 if (b51.platform.isSupported()) {
 b51.getSafeBodyOnload().sortedAdd(mboxDisplayDebugInfo,
 b51.getSafeBodyOnload().orderLast);
 }
 else {
 alert("mbox functionality is not supported on this browser");
 mboxDebugInfo.disable();
 }
 }

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

function mboxDebug_isEnabled() {
 return this.action != null;
}


function mboxDebug_disable() {
 mboxCookies.deleteCookie(this.debugCookie);
}

function mboxDebug_setShowAction(f10) {
 this.action = f10;
}

function mboxDebug_show() {
 if (this.action != null) {
 this.action.show();
 }
}

function mboxDebugActionLog(mode) {
 this.mode = mode;
 this.start = (new Date()).getTime();

 this.show = mboxDebugActionLog_show;
}

function mboxDebugActionLog_show() {
 var end = (new Date()).getTime();

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

 window.putPageStart();
 window.put("<img src='http://mbox3.offermatica.com/admin/images/spacer.gif"
 + "?mboxDebug=" + this.mode
 + "&mboxClient=" + mboxClientCode
 + "&pageLoadTime=" + (end - this.start)
 + "&mboxCount=" + mboxCount
 + "&mboxSignalCount=" + mboxSignalCount + "'>");

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

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


function mboxDebugActionNone() {
 this.show = mboxDebugActionDefault_show;
}

function mboxDebugActionNone_show() {
 alert("mboxDebugAction not defined");
}

function mboxDebugActionDefault() {
 this.show = mboxDebugActionDefault_show;
}

function mboxDebugActionDefault_show() {
 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>Global arguments: '" + mboxGlobalArguments + "'</li>");
 window.put("  <li>Referring URL: '" + document.referrer + "'</li>");
 window.put("  <li>Page URL: '" + document.location + "'</li>");
 window.put("  <li>Cookies: '" + document.cookie + "'</li>");
 window.put("  <li>Page Id: " + mboxPageId + "</li>");

 for (a4 in mboxs) {
 window.put("  <li>mbox: '" + mboxs[a4].id + "'");
 window.put("   <ul>");

 if (mboxs[a4].error) {
 window.put('   <li><span style="color: red"><b>Error: '
 + mboxs[a4].error + '</b></span></li>');
 }

 var m14 = document.getElementById(mboxMarkerName(mboxs[a4].id));
 if (m14 == 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[a4].defaultDiv != null) + "</li>");
 }

 window.put('    <li><a href="' + mboxs[a4].url + '">'
 + mboxs[a4].url + '</a></li>');

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

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

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

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

 var p53 = /\W/g;
 var k54 = this.d24.replace(p53, '_');

 this.put = mboxDebugWindow_put;
 this.putCloseButton = mboxDebugWindow_putCloseButton;
 this.putPageStart = mboxDebugWindow_putPageStart;
 this.putPageEnd = mboxDebugWindow_putPageEnd;

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

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


function mboxDebugWindow_put(k56) {
 if (this.window == null) {
 return;
 }
 this.window.document.writeln(k56);
 this.window.scrollBy(0, 1000);
}

function mboxDebugWindow_putCloseButton() {
 this.put("<a href=\"javascript:mboxDebugWindowClose()\">"
 + "click here to close debug window</a>");
}

function mboxDebugWindow_putPageStart() {
 this.put("<html><head>")
 this.put(" <title>" + this.d24 + "</title>");
 this.put("  <script>");
 this.put("   function mboxDebugWindowOnClose() {");
 this.put("       window.opener.mboxDebugInfo.disable();");
 this.put("   }");
 this.put("   ");
 this.put("   function mboxDebugWindowClose() {");
 this.put("     try {");
 this.put("       window.opener.mboxDebugInfo.disable();");
 this.put("     } catch(e) {");
 this.put("       alert('Could not disable debug mode.\\n'");
 this.put("         + 'Browse to a page containing an mbox and\\n'");
 this.put("         + 'click on close link.');");
 this.put("     }");
 this.put("     window.close();");
 this.put("   }");
 this.put("  </" + "script>");
 this.put(" </head>")
 this.put(" <body onunload='mboxDebugWindowOnClose()'>")
}

function mboxDebugWindow_putPageEnd() {
 this.put("</body></html>");

 this.window.document.close();
}

function mboxSafeOnload(element) {
 this.a57 = new Array()

 this.orderFirst = 0;
 this.orderMiddle = 500;
 this.orderLast = 1000;

 this.add = mboxSafeOnload_add;
 this.sortedAdd = mboxSafeOnload_sortedAdd;
 this.setup = mboxSafeOnload_setup;
 this.action = mboxSafeOnload_action;
 this.element = element;
 this.actionStarted = false;

 
 
 
 if (typeof mboxSafeOnloadFunctions == "undefined") {
 mboxSafeOnloadFunctions = new Array();
 }

 
 
 var offset = mboxSafeOnloadFunctions.length;
 mboxSafeOnloadFunctions[offset] = this;
 this.y58 = new Function("event",
 "mboxSafeOnloadFunctions[" + offset + "].action(event)");

 this.setup();
}

function mboxSafeOnload_setup() {
 if (this.element.onload != this.y58) {
 if (this.element.onload) {
 this.add(this.element.onload);
 }

 this.element.onload = this.y58;
 }
}

function mboxSafeOnload_add(r59) {
 this.sortedAdd(r59, this.orderMiddle)
}

function mboxSafeOnload_sortedAdd(r59, s60) {
 var y58 = new Array()
 y58.order = s60;
 y58.action = r59;
 this.a57[this.a57.length] = y58;
}


function mboxSafeOnload_action(z61) {
 if (this.actionStarted == true) {
 return;
 }
 this.actionStarted = true;

 this.a57.sort(mboxSafeOnload_orderSort);

 for (var g7 = 0; g7 < this.a57.length; g7++) {
 
 
 this.element.onload = this.a57[g7].action;
 this.element.onload(z61);
 }
 this.element.onload = this.y58
}

function mboxSafeOnload_orderSort(p62, c63) {
 return p62.order - c63.order;
}


function mboxSetCookie(d24, y25, e16) {
 mboxCookies.setCookie(d24, y25, e16);
}


function mboxGetCookie(d24) {
 return mboxCookies.getCookie(d24);
}


function mboxDeleteCookie(d24) {
 mboxCookies.deleteCookie(d24);
}


function mboxGetCookieNames(h28) {
 return mboxCookies.getCookieNames(h28);
}

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

function mboxIsSupported() {
 return true;
}

function mboxPlatform() {
 this.i64 = window.navigator.appVersion.indexOf("Mac") != -1;
 this.p65 = window.navigator.appVersion.indexOf("MSIE") != -1;

 var o66 = window.navigator.userAgent.indexOf("Opera") != -1;
 var d67 = window.navigator.userAgent.indexOf("Konqueror") != -1;
 var a68 = this.p65 &&
 (window.navigator.appVersion.indexOf("MSIE 4.") != -1);
 var p69 = (navigator.appName == 'Netscape') &&
 (parseInt(navigator.appVersion) == 4);

 this.supported = mboxIsSupported() &&
 !(p69 || a68 || o66 || d67);

 this.isSupported = mboxPlatform_isSupported;
 this.supportsReplace = mboxPlatform_supportsReplace;
}

function mboxPlatform_isSupported() {
 return this.supported;
}

function mboxPlatform_supportsReplace() {
 return !(this.p65 && this.i64)
}


function mboxForcePCId(forcedId) {
 if (mboxPCId.forceId(forcedId)) {
 mboxSessionId.reset();
 }
}


function mboxSetSessionId() {
 mboxSessionId.forceId(arguments[0],arguments[1]);
}


function mboxSafeBodyOnload() {
 if (arguments.length > 1) {
 mboxEnv.getSafeBodyOnload().add(arguments[0], arguments[1]);
 }
 else {
 mboxEnv.getSafeBodyOnload().add(arguments[0]);
 }
}

