



var mboxCopyright =
 + "Copyright 2003-2004 Fort Point Partners, Inc. All Rights Reserved."
 + ""
 + "This software is the proprietary information of Fort Point Partners, Inc."
 + "Use is subject to license terms.";



 


 
 


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

 var mboxSupportedPlatform = mboxIsSupportedPlatform();
 var mboxIsEnabled = mboxSupportedPlatform;
 var mboxIsSetup = false;

 if (typeof mboxTimeout == 'undefined') {
 
 var mboxTimeout = 15000;
 }

 var mboxVersion=5;

 
 
 var mboxClientCode = 'doyouzoom';
 

 
 
 var mboxServerURL = 'http://mbox.offermatica.com/boxserver/content.js';
 

 if (typeof mboxCookieDomain == 'undefined') {
 
 var mboxCookieDomain = ""; 
 }

 var mboxClickedCookie = "mboxClick";
 var mboxSessionIdCookie = "mboxSession";
 var mboxPCIdCookie = "mboxPC";
 var mboxDisableCookie = "mboxDisable";
 var mboxDisableCookieDuration = 60 * 60;
 var mboxCheckCookie = "mboxCheck";
 var mboxDebugModeCookie = "mboxDebug";

 var mboxNameArg="mbox";
 var mboxClientCodeArg="mboxClient";
 var mboxPCIdArg="mboxPC";
 var mboxSessionIdArg="mboxSession";
 var mboxPageIdArg="mboxPage";
 var mboxHostArg="mboxHost";
 var mboxURLArg="mboxURL";
 var mboxReferrerArg="mboxReferrer";
 var mboxVersionArg="mboxVersion";
 var mboxCountArg="mboxCount";

 var mboxMarkerDivPrefix = "mboxMarker-";
 var mboxImportDivPrefix = "mboxImported-";
 var mboxDefaultDivClass = "mboxDefault";

 var mboxPageId = mboxGenerateId();

 var mboxs = new Array(); 
 var mboxCount = 0; 
 var mboxGlobalArguments = "";

 if (mboxSupportedPlatform) {
 var mboxOnloadFunctions = new Array();

 mboxAddOnloadFunction(mboxCheckAll);
 if (mboxDebugMode()) {
 mboxAddOnloadFunction(mboxDebugInfo);
 }

 mboxSignalClicked();
 if (mboxEnabled()) {
 mboxDefaultContentDisplayNone();
 }
 else {
 
 }
 } else {
 if (mboxDebugMode()) {
 alert("mbox functionality is not supported on this browser");
 mboxDeleteCookie(mboxDebugModeCookie);
 }
 }
}



function mboxCreate(c0 ) {
 if (!mboxSupportedPlatform) {
 return;
 }

 var a1 = new Array();
 a1[0] = mboxNameArg + '=' + c0;
 for (var i = 1; i < arguments.length; i++) {
 a1[i] = arguments[i];
 }
 
 var f2 = new mbox(c0, a1);
 f2.put();
}


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


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

 this.put = mbox_put;
 this.show = mbox_show;
 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.clicked = mbox_clicked;
 this.finalize = mbox_finalize;

 this.activateAction = mbox_show;
 this.setActivateAction = mbox_setActivateAction;
 
 this.time = new Array();
 this.activateCount = 0;
 this.setEventTime = mbox_setEventTime;
 

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

function mbox(x4, a1) {
 this.base = mboxBase;

 a1[a1.length] = mboxCountArg + "=" + ++mboxCount;

 this.base(x4, mboxBuildURL(a1));
}

function mboxClick(f5) {
 this.base = mboxBase;

 var u6 = f5.indexOf(mboxNameArg + "=");
 if (u6 == -1) {
 document.write("<!-- mboxCreateClickedBox(" + f5 + ") - error -->");
 return
 }
 var u7 = f5.indexOf("&", u6)
 if (u7 == -1) {
 u7 = f5.length;
 }
 var a8 = f5.substring(u6 + mboxNameArg.length + 1, u7)
 + "-clicked";
 var f5 = f5.replace(f5.substring(u6, u7), mboxNameArg + "="
 + a8);

 var a9 = new RegExp(mboxCountArg + ".*?&");
 f5 = f5.replace(a9, mboxCountArg + "=0&");

 this.base(a8, f5);
}


function mbox_put() {
 if (mboxEnabled()) {
 this.setEventTime("put.start");
 document.write(
 '<div id="' + this.markerName() 
 + '" style="visibility:hidden;display:none">'
 + '<script language="JavaScript">'
 + 'mboxs["' + this.id + '"].startTimeout(' + mboxTimeout + ');'
 + '<' + '\/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(w10) {
 this.activateAction = w10;
}


function mbox_show() {
 var a11 = this.getDefaultDiv();
 var q12 = document.getElementById(this.importName());

 if (q12 != null) {
 this.setEventTime('show.start');

 if (a11 != null) {
 if (window.navigator.appVersion.indexOf("Mac") != -1) {
 var a13 = document.getElementById(this.markerName());
 if (a13 != null) {
 a13.style.visibility = "visible";
 a13.style.display = "block";
 }
 a11.style.visibility = "hidden";
 a11.style.display = "none";
 q12.style.visibility = "visible";
 q12.style.display = "block";
 }
 else {
 a11.parentNode.replaceChild(q12, a11);
 q12.style.visibility = "visible";
 q12.style.display = "block";
 }
 }
 else {
 q12.style.visibility = "visible";
 q12.style.display = "block";
 var a13 = document.getElementById(this.markerName());
 if (a13 != null) {
 a13.style.visibility = "visible";
 a13.style.display = "block";
 }
 }

 this.setEventTime('show.end');
 return 1;
 }

 return 0;
}


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

 var a11 = this.getDefaultDiv();
 if (a11 != null) {
 this.setEventTime('hide.start');
 a11.style.visibility = "visible";
 a11.style.display = "block";
 this.setEventTime('hide.end');
 return 1;
 }

 return 0;
}


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

 this.cancelTimeout();

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

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


function mbox_clicked() {
 mboxSetSessionCookie(mboxClickedCookie, this.url);
}

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

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

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 mboxBuildURL(a1) {
 var t15 = mboxServerURL;

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

 for (var t3 = 0; t3 < a1.length; t3++) {
 t15 = t15 + "&" + a1[t3];
 }

 t15 = t15 + mboxGlobalArguments;

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

 return t15 + "&" + mboxPCIdArg + "=" + mboxPCId()
 + "&" + mboxPageIdArg + "=" + mboxPageId
 + "&" + mboxURLArg + "=" + escape(document.location)
 + "&" + mboxReferrerArg + "=" + escape(document.referrer)
 + "&" + mboxVersionArg + "=" + mboxVersion;
}


function mboxEnabled() {
 if (mboxIsSetup) {
 return mboxIsEnabled;
 }
 mboxIsSetup = true;

 if (!mboxIsEnabled) {
 return false;
 }

 
 if (!mboxCookieIsEnabled()) {
 mboxIsEnabled = false;
 return false;
 }

 if (mboxTimedOut()) {
 mboxIsEnabled = false;
 return false;
 }

 return mboxIsEnabled;
}

function mboxTimedOut() {
 return mboxGetCookie(mboxDisableCookie) == "true";
}

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

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

function mboxCheckTimeoutById(id) {
 if (!mboxs[id].isActivated()) {
 
 mboxSetCookie(mboxDisableCookie, "true", mboxDisableCookieDuration);
 
 window.location.reload(false);
 }
}


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


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


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


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


function mboxClickedById(c0) {
 mboxs[c0].clicked();
 return false;
}
 

function mboxClicked(f5)
{
 mboxSetSessionCookie(mboxClickedCookie, f5);
 return false;
}


function mboxSignalClicked()
{
 var z16= mboxGetCookie(mboxClickedCookie);

 if (z16 != null && z16 != "") {
 mboxSetSessionCookie(mboxClickedCookie, "");
 mboxCreateClickedBox(z16);
 }

 return false;
}


function mboxCreateClickedBox(f5) {
 var b17 = new mboxClick(f5);

 document.write('<div style="visibility:hidden;display:none">');
 b17.put();
 document.write('</div>');
}


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


function mboxArg(g18, y19) {
 return g18 + "=" + escape(y19);
}


function mboxSessionId()
{
 var k20 = mboxGetCookie(mboxSessionIdCookie);
 
 if (k20 == null || k20.length == 0) {
 k20 = mboxGenerateId();
 mboxSetSessionCookie(mboxSessionIdCookie, k20);
 }
 
 return k20;
}

function mboxPCId() {
 var s21 = mboxGetCookie(mboxPCIdCookie);
 
 if (s21 == null || s21.length == 0) {
 s21 = mboxGenerateId();
 mboxSetCookie(mboxPCIdCookie, s21, 2 * 365 * 24 * 60 * 60);
 }

 return s21;
}

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


function mboxDebugMode() {
 var t15 = false;

 if (document.location.href.indexOf(mboxDebugModeCookie + '=') != -1) {
 t15 = true;
 mboxSetSessionCookie(mboxDebugModeCookie, "1")
 }

 return t15 || mboxGetCookie(mboxDebugModeCookie) == "1";
}

function mboxDebugInfo() {
 var w22 = new mboxDebugWindow();
 w22.put("<p>");
 w22.put(" <b>Page</b>: " + document.location);
 w22.put(" <ul>");
 if (mboxEnabled()) {
 w22.put("  <li>Enabled: true</li>");
 }
 else {
 w22.put(
 '  <li>Enabled: <span style="color:red"><b>false</b></span></li>');
 }
 w22.put("  <li>Cookies enabled: " + mboxCookieIsEnabled() + "</li>");
 w22.put("  <li>Global arguments: '" + mboxGlobalArguments + "'</li>");
 w22.put("  <li>Referring URL: '" + document.referrer + "'</li>");
 w22.put("  <li>Page URL: '" + document.location + "'</li>");
 w22.put("  <li>Cookies: '" + document.cookie + "'</li>");
 w22.put("  <li>Page Id: " + mboxPageId + "</li>");

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

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

 var a13 = document.getElementById(mboxMarkerName(mboxs[c0].id));
 if (a13 == null) {
 w22.put('    <li><span style="color: red">'
 + '<b>Error: can not find mbox in dom</b></span></li>');
 }
 else {
 w22.put("    <li>has default content: "
 + (mboxs[c0].getDefaultDiv() != null) + "</li>");
 }

 w22.put('    <li>times (ms):');
 w22.put('     <table>');
 var r23 = 0;
 for(i24 in mboxs[c0].time) {
 var w25 = '<tr>';

 w25 = w25 + '<td>' + i24 + '</td>' 
 + '<td>' + mboxs[c0].time[i24] + '</td>';

 if (r23) {
 w25 = w25 + '<td>-' + r23 + ':</td><td> ' 
 + (mboxs[c0].time[i24] - mboxs[c0].time[r23]) 
 + '</td>'
 }
 w25 = w25 + '</tr>';
 w22.put(w25);
 r23 = i24;
 }
 w22.put('     </table>');
 w22.put('    </li>');

 w22.put('    <li><a href="' + mboxs[c0].url + '">'
 + mboxs[c0].url + '</a></li>');
 w22.put("   </ul>");
 w22.put("  </li>");
 }
 w22.put(" </ul>");
 w22.putCloseButton()
 w22.put("</p>");
}


function mboxDebugWindow() {
 var v26 = document.location.hostname;
 var u27 = /\W/g
 var h28 = v26.replace(u27, '_');
 
 this.put = mboxDebugWindow_put;
 this.putCloseButton = mboxDebugWindow_putCloseButton;
 this.window = window.open("", "mboxDebugWindow" + h28,
 "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;
 }

 if (this.window.document.getElementById("mboxDebugWindowSetup") == null) {
 this.put("<html><head>\n")
 this.put(" <title>Mbox Debug Window - " + v26 + "</title>\n");
 this.put("  <script>");
 this.put("   function mboxWindowClose() {");
 this.put("     document.cookie = \"" 
 + mboxDebugModeCookie + "=0;"
 + "expires=Thu, 01-Jan-70 00:00:01 GMT; path=/;"
 + mboxCookieDomain
 + "\"");
 this.put("     window.close();");
 this.put("   }");
 this.put("  </" + "script>");
 this.put(" </head>\n")
 this.put(" <body>\n")
 this.put("  <b>Mbox Debug Window (version:" + mboxVersion + ")</b></br>");
 this.put("  <div id=\"mboxDebugWindowSetup\"></div>\n");
 }
}

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

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


function mboxAddOnloadFunction(f31) {
 if (window.onload) {
 if (window.onload != mboxSafeOnload) {
 mboxOnloadFunctions[mboxOnloadFunctions.length] = window.onload;
 window.onload = mboxSafeOnload;
 }
 mboxOnloadFunctions[mboxOnloadFunctions.length] = f31;
 } else {
 window.onload = f31;
 }
}

function mboxSafeOnload() {
 for (var t3 = 0; t3 < mboxOnloadFunctions.length; t3++) {
 mboxOnloadFunctions[t3]();
 }
}


function mboxSetCookie(v26, y19, v14) {
 var y32 = new Date();
 y32.setTime(y32.getTime() + v14 * 1000);
 document.cookie = v26 + "=" + escape(y19) + "; expires="
 + y32.toGMTString() + "; path=/" + mboxCookieDomain;
;
}


function mboxSetSessionCookie(v26, y19)
{
 document.cookie = v26 + "=" + escape(y19) 
 + "; path=/" + mboxCookieDomain;
}


function mboxGetCookie(v26)
{
 var y19 = null;

 var m33 = document.cookie.indexOf(v26 + "=");
 if (m33 == -1) {
 return null;
 }
 var s34 = m33 + v26.length + 1;

 var n35 = document.cookie.indexOf(";" , s34);
 if (n35 == -1) {
 n35 = document.cookie.indexOf("," , s34);
 if (n35 == -1) {
 n35 = document.cookie.length;
 }
 }

 return unescape(document.cookie.substring(s34, n35));
}


function mboxDeleteCookie(v26) {
 var y32 = new Date();
 var h36 = y32.getTime() - 365 * 24 * 60 * 60 * 1000;
 if (h36 < 0) {
 h36 = 0;
 }
 y32.setTime(h36);
 document.cookie = v26 + "=; expires=" + y32.toGMTString()
 + "; path=/" + mboxCookieDomain;
 document.cookie = v26 + "; expires=" + y32.toGMTString()
 + "; path=/" + mboxCookieDomain;
}

function mboxCookieIsEnabled() {
 mboxSetSessionCookie(mboxCheckCookie, "true");
 return mboxGetCookie(mboxCheckCookie) == "true";
}

function mboxIsSupportedPlatform() {
 var z37 = window.navigator.appVersion.indexOf("Mac") != -1
 var r38 = document.all && z37
 var q39 = document.all &&
 (window.navigator.appVersion.indexOf("MSIE 4.") != -1)
 var z40 = (navigator.appName == 'Netscape') &&
 (parseInt(navigator.appVersion) == 4);
 
 var h41 = true;
 if (z40 || q39) {
 return false;
 }
 
 return true;
}

