// Using \n breaks the lines and use \' for single quotes
var myMessage = '***************************************\n\n- HELP! The Marketing Team Needs Your Input Today! \n\n Get $1,000 For Your Choice, but - Today Only - \n\n Type in just your "valid email" to qualify and simply say which Tax Service You\'re Most Likely To Use This Year... That\'s It.  \n\nClick On The \'Cancel\'  Button To Take Advantage Of - This ONE DAY ONLY - Special FREE Offer  \n\n***************************************';
var specialOffer = 'http://www.mb01.com/lnk.asp?o=2047&c=30240&a=64593';

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}
function addClickEvent(a, i, func) {
    if (typeof a[i].onclick != 'function') {
        a[i].onclick = func;
    }
}
var theDiv = '<div style="display:block; width:100%; height:100%; position:absolute; background:#FFFFFF; margin-top:0px; margin-left:0px;" align="center">';
theDiv = theDiv + '<iframe src="' + specialOffer + '" width="100%" height="100%" align="middle" frameborder="0"></iframe>';
theDiv = theDiv + '</div>';
theBody = document.body;
if (!theBody) {
    theBody = document.getElementById("body");
    if (!theBody) {
        theBody = document.getElementsByTagName("body")[0];
    }
}
var StopExit = false;
function UnPopIt() { };
function DisplayPop() {
    if (StopExit == false) {
        window.scrollTo(0, 0);
        StopExit = true;
		window.onbeforeunload = UnPopIt;
        divtag = document.createElement("div");
        divtag.style.position = "absolute";
        divtag.style.width = "100%";
        divtag.style.height = "100%";
        divtag.style.zIndex = "99";
        divtag.style.left = "0px";
        divtag.style.top = "0px";
        divtag.innerHTML = theDiv;
        theBody.innerHTML = "";
        theBody.topMargin = "0px";
        theBody.rightMargin = "0px";
        theBody.bottomMargin = "0px";
        theBody.leftMargin = "0px";
        theBody.style.overflow = "hidden";
        theBody.appendChild(divtag);
        return myMessage;
    }
}
var a = document.getElementsByTagName('A');
for (var i = 0; i < a.length; i++) {
    if (a[i].target !== '_blank') {
        addClickEvent(a, i,
        function() {
            StopExit = true;
        });
    } else {
        addClickEvent(a, i,
        function() {
            StopExit = false;
        });
    }
}
disablelinksfunc = function() {
    var a = document.getElementsByTagName('A');
    for (var i = 0; i < a.length; i++) {
        if (a[i].target !== '_blank') {
            addClickEvent(a, i,
            function() {
                StopExit = true;
            });
        } else {
            addClickEvent(a, i,
            function() {
                StopExit = false;
            });
        }
    }
}
addLoadEvent(disablelinksfunc);
disableformsfunc = function() {
    var f = document.getElementsByTagName('FORM');
    for (var i = 0; i < f.length; i++) {
        if (!f[i].onclick) {
            f[i].onclick = function() {
                StopExit = true;
            }
        } else if (!f[i].onsubmit) {
            f[i].onsubmit = function() {
                StopExit = true;
            }
        }
    }
}
addLoadEvent(disableformsfunc);
window.onbeforeunload = DisplayPop;
