

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 = 'carrotink';
 var mboxServerURL = 'http://mbox3.offermatica.com/m2/carrotink/mbox/standard';

 var mboxTrafficDuration = 10368000;

 if (typeof mboxPCIdExpireTime == 'undefined') {
 
 
 var mboxPCIdExpireTime = 2 * 365 * 24 * 60 * 60;
 }
 
 
 function mboxCookiePageDomain() {
 var q0 = document.location.host;
 var z1 = /[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/;
 if (!z1.exec(document.location.host)) {
 var s2 = /[^\.]+\.[^\.]+$/;
 var e3 = s2.exec(document.location.hostname);
 if (e3) {
 q0 = e3[0];
 }
 }
 return q0;
 }
 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(y4 ) {
 if (!mboxEnv.platform.isSupported()) {
 return;
 }
 mboxEnv.getSafeBodyOnload().setup();

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

 var x6 = new mbox(y4, k5);
 x6.put();
}


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


function mboxBase(n8, r9) {
 this.id = n8;
 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[n8]) {
 this.error = "multiple mboxes with the id '" + n8 + "' exist on this page";
 this.put = mbox_putNothing;
 this.activateAction = mbox_hide;
 }

 mboxs[n8] = this;
}

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

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


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(i10) {
 this.activateAction = i10;
}


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


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(d12) {
 
 if (d12 == null) {
 return 0;
 }

 var g13 = this.getDefaultDiv();

 if (mboxEnv.platform.supportsReplace()) {
 if (g13 != null) {
 g13.parentNode.replaceChild(d12, g13);
 }
 
 
 else {
 var o14 = document.getElementById(this.markerName());

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

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

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

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

 mboxMakeDivVisible(o14);
 }

 mboxMakeDivVisible(d12);

 
 
 return 1;
}

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

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


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

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

 var g13 = this.getDefaultDiv();

 if (g13 != null) {
 g13.style.visibility = "visible";
 g13.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(n16) {
 this.timeout =
 setTimeout('mboxCheckTimeoutById("' + this.id + '")', n16);
}

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(c17) {
 var d12 = c17.importDiv();

 return c17.showContent(d12);
}

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

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


function mboxBuildURL(k5) {
 var s18 = mboxServerURL;

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

 for (var e7 = 0; e7 < k5.length; e7++) {
 s18 += "&" + k5[e7];
 }

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

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

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

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

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

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


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

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

 if (mboxGetPageParameter(z20) != null) {
 this.w22 = false;
 }

 
 
 if (!mboxCookies.isEnabled()) {
 this.w22 = false;
 }
 if (mboxCookies.getCookie(mboxDisableCookie) == "true") {
 this.w22 = 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.w22;
}

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.w22 = false;
 mboxCookies.setCookie(mboxDisableCookie, "true", duration);
 }
}

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

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

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

 var q23 = mboxCookies.getCookie(mboxTrafficStateCookie);

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

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

function mboxCookieManager(a24, q0) {
 this.name = a24;

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

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

 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(a24, o25, n16) {
 if (typeof a24 != 'undefined' &&
 typeof o25 != 'undefined' &&
 typeof n16 != 'undefined') {

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

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

function mboxCookieManager_deleteCookie(a24) {
 var x27 = new Object();
 for (w26 in this.cookies) {
 if (w26 != a24) {
 x27[w26] = this.cookies[w26];
 }
 }
 this.cookies = x27;
 this.saveCookies();
}

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

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

 var k32 = document.cookie.substring(
 v30 + this.name.length + 1, y31).split("|");

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

function mboxCookieManager_saveCookies() {

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

 if (j35 < this.cookies[w26].expireOn) {
 j35 = this.cookies[w26].expireOn;
 }
 }
 }

 var g36 = new Date(j35 * 1000);
 document.cookie = this.name + "=" + k34.join("|")
 + "; expires=" + g36.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(y4) {
 return mboxs[y4].getDefaultDiv();
}


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


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


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


function mboxSignal() {
 var a38 = mboxCookies.getCookieNames(mboxSignalPrefix);
 for (o39 in a38) {
 var i40 = mboxCookies.getCookie(a38[o39]);
 var k5 = i40.split("&");
 var y4 = k5[0];
 k5[0] = mboxNameArg + '=' + y4;
 var h41 = new mboxSignalMbox(y4, k5);
 h41.put();
 mboxCookies.deleteCookie(a38[o39]);
 }
}


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


function mboxArg(r42, o25) {
 return r42 + "=" + escape(o25);
}


function mboxSession(e43, f44, j45, g46) {
 this.idArg = f44;
 this.cookieName = j45;
 this.expireTime = g46;

 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 = e43;
 this.newSession = true;
 }
 }

 mboxSetCookie(mboxSessionIdCookie, this.id, g46);

 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(e43, j45, g46) {
 this.cookieName = j45;
 this.expireTime = g46;

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

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

 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 s18 = null;

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

 return s18;
}

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

function mboxDebug(v49, d50, n51) {
 this.debugCookie = v49;

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

 var u52 = mboxGetPageParameter(d50);
 if (u52 == null) {
 u52 = mboxCookies.getCookie(this.debugCookie);
 }

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

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

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

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

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


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

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

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 (y4 in mboxs) {
 window.put("  <li>mbox: '" + mboxs[y4].id + "'");
 window.put("   <ul>");

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

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

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

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

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

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

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

 var j53 = /\W/g;
 var v54 = this.a24.replace(j53, '_');

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

 this.window = window.open("", "mboxDebugWindow" + v54,
 "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(z56) {
 if (this.window == null) {
 return;
 }
 this.window.document.writeln(z56);
 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.a24 + "</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.i58 = new Function("event",
 "mboxSafeOnloadFunctions[" + offset + "].action(event)");

 this.setup();
}

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

 this.element.onload = this.i58;
 }
}

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

function mboxSafeOnload_sortedAdd(d59, g60) {
 var i58 = new Array()
 i58.order = g60;
 i58.action = d59;
 this.a57[this.a57.length] = i58;
}


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

 this.a57.sort(mboxSafeOnload_orderSort);

 for (var e7 = 0; e7 < this.a57.length; e7++) {
 
 
 this.element.onload = this.a57[e7].action;
 this.element.onload(v61);
 }
 this.element.onload = this.i58
}

function mboxSafeOnload_orderSort(v62, l63) {
 return v62.order - l63.order;
}


function mboxSetCookie(a24, o25, n16) {
 mboxCookies.setCookie(a24, o25, n16);
}


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


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


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.y64 = window.navigator.appVersion.indexOf("Mac") != -1;
 this.p65 = window.navigator.appVersion.indexOf("MSIE") != -1;

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

 this.supported = mboxIsSupported() &&
 !(h69 || v68 || l66 || d67);

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

function mboxPlatform_isSupported() {
 return this.supported;
}

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


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]);
 }
}

