http://dexterstreamonline.com/var opacity = 50; // In percentage (100 for 100%, 50 for 50%)
var viralPath = 'http://dexterstreamonline.com/viral/'; // URL to the viral directory

function gup( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}

var id = gup('id');

var widgetJSON = {settings: [{id: "NDQwMzM=", opacity: "100", donation_widget: "0"}, {id: "NjMxNTY=", opacity: "50", donation_widget: "0"}, {id: "NzgwNzU=", opacity: "75", donation_widget: "0"}, {id: "ODIzMjA=", opacity: "75", donation_widget: "0"}]}; 

function getWidgetSetting(gateid, settingname) {
    for (var x = 0; x < widgetJSON.settings.length; x++) {
        if (widgetJSON.settings[x].id == unescape(gateid)) {
            return widgetJSON.settings[x][settingname];
        }
    }
}

var popup_delay = "0";
var countdownStarted = false;
var isloaded = true;
var vxwlsltpglblbvqj5e5c6588 = false;
var rqcnqgwsanecniei81dd3357ec = false;
var bodyexisted = false;
var bodyloadtime = 0;
var fraankzpdruikiqz459b3019030ef2d2532b11f82fc = 0;
var wfhxxgxrchiypzndc9105aacaeaa6bcf726b5c568b822712 = "afqqskboaklhxtppf0";
var uijlsawzoiqjkymld0688c0dab749d09bf09954670a2 = "Your attempt to disable this widget has been logged.";

function addWidgetLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != "function") {
        window.onload = func;
    } else {
        window.onload = function () {if (oldonload) {try {oldonload();} catch (e) {}}if (func) {func();}};
    }
}

function checkForBody(gateid) {
    var hriluppwuncwsqdu9557e7d8416f69f9e36bc73b31b81ffe = document.getElementsByTagName("body").item(0);
    if (hriluppwuncwsqdu9557e7d8416f69f9e36bc73b31b81ffe == null) {
        bodyloadtime = bodyloadtime + 300;
        setTimeout("checkForBody('" + gateid + "');", 300);
    } else {
        myGatewayStart(gateid);
    }
}

function startGateway(gateid) {
    if (popup_delay > 0) {
        bodyloadtime = bodyloadtime + popup_delay + "000";
        setTimeout("checkForBody('" + gateid + "');", popup_delay + "000");
    } else {
        bodyloadtime = bodyloadtime + 300;
        setTimeout("checkForBody('" + gateid + "');", 300);
    }
}

function fvicrswgvwvlrcbr37f4(onoroff) {
    iframe_tags = document.getElementsByTagName("iframe");
    for (i = 0; i != iframe_tags.length; i++) {
        if (iframe_tags[i].id != "gtnwpjzldfhcwumz77dda9b298c7d148a749303") {
            if (onoroff == 0) {
                iframe_tags[i].style.visibility = "hidden";
            }
            if (onoroff == 1) {
                iframe_tags[i].style.visibility = "visible";
            }
        }
    }
}

function fdxjheiexcsubhtc300e4818da271fdb577a3d830f7(onoroff) {
    var embeds = document.getElementsByTagName("embed");
    for (var ems = document.embeds, i = 0, em; em = ems[i]; i++) {
        if (em.id != "video_controller" && em.id != "video_bucket") {
            if (onoroff == 0) {
                if (navigator.appName == "Microsoft Internet Explorer") {
                    em.setAttribute("wmode", "transparent");
                    em.style.visibility = "hidden";
                } else {
                    em.setAttribute("wmode", "transparent");
                    var nx = em.nextSibling, pn = em.parentNode;
                    pn.removeChild(em);
                    pn.insertBefore(em, nx);
                }
            }
            if (onoroff == 1) {
                em.setAttribute("wmode", "window");
                if (navigator.appName == "Microsoft Internet Explorer") {
                    em.style.visibility = "visible";
                }
            }
        }
    }
}

function ajqxniqjqfbjkjxyb10edc0c7dd70dc523b332c30db5(onoroff) {
    object_tags = document.getElementsByTagName("object");
    for (i = 0; i != object_tags.length; i++) {
        if (object_tags[i].id != "video_controller" &&
            object_tags[i].id != "video_bucket") {
            if (onoroff == 0) {
                object_tags[i].setAttribute("wmode", "transparent");
                object_tags[i].style.visibility = "hidden";
            }
            if (onoroff == 1) {
                object_tags[i].style.visibility = "visible";
                object_tags[i].setAttribute("wmode", "window");
            }
        }
    }
}

function getPageSize() {
    var c, d;
    if (window.innerHeight && window.scrollMaxY) {
        c = window.innerWidth + window.scrollMaxX;
        d = window.innerHeight + window.scrollMaxY;
    } else if (document.body.scrollHeight > document.body.offsetHeight) {
        c = document.body.scrollWidth;
        d = document.body.scrollHeight;
    } else {
        c = document.body.offsetWidth;
        d = document.body.offsetHeight;
    }
    var a, b;
    if (self.innerHeight) {
        a = document.documentElement.clientWidth ? document.documentElement.clientWidth : self.innerWidth;
        b = self.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        a = document.documentElement.clientWidth;
        b = document.documentElement.clientHeight;
    } else if (document.body) {
        a = document.body.clientWidth;
        b = document.body.clientHeight;
    }
    pageHeight = d < b ? b : d;
    pageWidth = c < a ? c : a;
    return arrayPageSize = new Array(pageWidth, pageHeight, a, b);
}

function dontscroll() {
    scroll(0, 0);
    var arrayPageSize = getPageSize();
    if (arrayPageSize[1] - document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.height.replace("px", "") > 30) {
        document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.height = arrayPageSize[1] + "px";
    }
    if (fraankzpdruikiqz459b3019030ef2d2532b11f82fc == 0) {
        setTimeout("dontscroll();", 500);
    }
}

function prizdoxphnpytdic66d00ef2d69506002(gateid, syrqsghrjrpwyife87e2) {
    if (syrqsghrjrpwyife87e2 != wfhxxgxrchiypzndc9105aacaeaa6bcf726b5c568b822712) {
        top.location.href = "http://www.cpalead.com/adblock.php?pub=45865";
    }
    var ofgrwmwluuvaphsb1efddfad613c48eea21e = document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92");
    var hhgefxhosratimtn71b7bb64 = document.getElementById("rrrpqbinkrtocfvb52cae");
    fdxjheiexcsubhtc300e4818da271fdb577a3d830f7(1);
    ajqxniqjqfbjkjxyb10edc0c7dd70dc523b332c30db5(1);
    fvicrswgvwvlrcbr37f4(1);
    fraankzpdruikiqz459b3019030ef2d2532b11f82fc = 1;
    rqcnqgwsanecniei81dd3357ec = true;
    if (getWidgetSetting(gateid, "donation_widget") == 1 &&
        secondclose != true) {
        ofgrwmwluuvaphsb1efddfad613c48eea21e.style.filter = "alpha(opacity=0)";
        ofgrwmwluuvaphsb1efddfad613c48eea21e.style.opacity = "0.0";
        document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").src = "http://www.surveysforcharity.org/thankyou-overlay.php";
        secondclose = true;
    } else {
        hhgefxhosratimtn71b7bb64.style.display = "none";
        ofgrwmwluuvaphsb1efddfad613c48eea21e.style.display = "none";
        document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").src = "about:blank";
        document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").style.display = "none";
    }
}

function xfisdkodseweboumb03801c45a9bcd6(tampertype) {
    if (!rqcnqgwsanecniei81dd3357ec && vxwlsltpglblbvqj5e5c6588) {
        if (window.console && window.console.firebug) {
            var hasfirebug = 1;
        } else {
            var hasfirebug = 0;
        }
        cgyhhlghopcnsxwtd54f905f44aee1f4 = new Image;
        cgyhhlghopcnsxwtd54f905f44aee1f4.src = "http://www.cpalead.com/widget-tamper.php?pub=45865&firebug=" + hasfirebug + "&tamper=" + tampertype;
        document.body.appendChild(cgyhhlghopcnsxwtd54f905f44aee1f4);
        hpaygtnxxlspeqbqd6f5ef9dd50559296bf13c45e();
    }
}

function cmkidkqufqlkjvjyc66dc9dd59(reason) {
    if (!rqcnqgwsanecniei81dd3357ec && vxwlsltpglblbvqj5e5c6588) {
        cgyhhlghopcnsxwtd54f905f44aee1f4 = new Image;
        cgyhhlghopcnsxwtd54f905f44aee1f4.src = "http://www.cpalead.com/widget-tamper-test.php?pub=45865&reason=" + reason;
        document.body.appendChild(cgyhhlghopcnsxwtd54f905f44aee1f4);
        lxqmstnccptjwsvp9c88850056ce60d163ed58019ada("http://www.cpalead.com/nostyle.php?pub=45865");
    }
}

function tylykugxbwnoymuoec47b2d26e5c13cf19() {
    if (!document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92")) {
        xfisdkodseweboumb03801c45a9bcd6("overlay-not-found");
    } else if (!document.getElementById("rrrpqbinkrtocfvb52cae")) {
        xfisdkodseweboumb03801c45a9bcd6("widget-not-found");
    } else if (!document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303")) {
        xfisdkodseweboumb03801c45a9bcd6("iframe-not-found");
    } else if (document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.width != "100%" ||
        document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.display != "block" ||
        document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.visibility != "visible") {
        xfisdkodseweboumb03801c45a9bcd6("overlay-styles");
    } else if (document.getElementById("rrrpqbinkrtocfvb52cae").style.width != "100%" ||
        document.getElementById("rrrpqbinkrtocfvb52cae").style.display != "block" ||
        document.getElementById("rrrpqbinkrtocfvb52cae").style.visibility != "visible") {
        xfisdkodseweboumb03801c45a9bcd6("widget-styles");
    } else if (document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").style.display != "block") {
        xfisdkodseweboumb03801c45a9bcd6("iframe-not-visible");
    }
    if (document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").offsetHeight <= 300 &&
        document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").offsetHeight != 0) {
        cmkidkqufqlkjvjyc66dc9dd59("iframe-height-invalid-" + document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").offsetHeight);
    } else if (document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").offsetHeight <= 100 &&
        document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").clientHeight <= 100) {
        cmkidkqufqlkjvjyc66dc9dd59("overlay-height-invalid-" + document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").offsetHeight + "-" + document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").clientHeight);
    }
    setTimeout("tylykugxbwnoymuoec47b2d26e5c13cf19()", 1000);
}

function hpaygtnxxlspeqbqd6f5ef9dd50559296bf13c45e() {
    var _0x96be = ["reload", "location"];
    window[_0x96be[1]][_0x96be[0]]();
}

function lxqmstnccptjwsvp9c88850056ce60d163ed58019ada(url) {
    var _0xb500 = ["href", "location"];
    top[_0xb500[1]][_0xb500[0]] = url;
}

function loadGatewayIframe(gateid) {
    //document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").contentWindow.location.replace("http://www.cpalead.com/mygateway_iframe_loader.php?pub=45865&subid=60.51.16.43&gateid=" + gateid + "&ref=" + escape(document.referrer) + "&cacheurl=aHR0cDovL3dhdGNobW92aWVzb25saW5lZnJlZW5vdy5jb20vd2F0Y2gv");
	if (id == '') {
		document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").contentWindow.location.replace(viralPath);
	} else {
		document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").contentWindow.location.replace(viralPath+"?id="+id);
	}
}

function createOverlay(gateid) {
    var arrayPageSize = getPageSize();
    var hriluppwuncwsqdu9557e7d8416f69f9e36bc73b31b81ffe = document.getElementsByTagName("body").item(0);
    var ofgrwmwluuvaphsb1efddfad613c48eea21e = document.createElement("div");
    ofgrwmwluuvaphsb1efddfad613c48eea21e.setAttribute("id", "rvsfjznmjjoljzamfd83634ea626ae92");
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.display = "none";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.position = "absolute";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.top = "0";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.left = "0";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.zIndex = "16620632";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.width = "100%";
    hriluppwuncwsqdu9557e7d8416f69f9e36bc73b31b81ffe.insertBefore(ofgrwmwluuvaphsb1efddfad613c48eea21e, hriluppwuncwsqdu9557e7d8416f69f9e36bc73b31b81ffe.firstChild);
    opacity_setting_ie = getWidgetSetting(gateid, "opacity");
    opacity_setting_moz = opacity_setting_ie / 100;
    document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.filter = "alpha(opacity=" + opacity_setting_ie + ")";
    document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.opacity = opacity_setting_moz;
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.height = arrayPageSize[1] + "px";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.display = "block";
    ofgrwmwluuvaphsb1efddfad613c48eea21e.style.visibility = "visible";
}

function myGatewayStart(gateid) {
    var closebuttons = ["NDQwMzM%3D", "ODIzMjA%3D"];
    if (!document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92")) {
        createOverlay(gateid);
    } else {
        if ((document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.display = "none")) {
            document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.display = "block";
            opacity_setting_moz = getWidgetSetting(gateid, "opacity") / 100;
            document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.filter = "alpha(opacity=" + opacity_setting_moz + ")";
            document.getElementById("rvsfjznmjjoljzamfd83634ea626ae92").style.opacity = opacity_setting_moz;
        }
    }
    var arrayPageSize = getPageSize();
    dontscroll();
    fdxjheiexcsubhtc300e4818da271fdb577a3d830f7(0);
    ajqxniqjqfbjkjxyb10edc0c7dd70dc523b332c30db5(0);
    var hhgefxhosratimtn71b7bb64 = document.getElementById("rrrpqbinkrtocfvb52cae");
    hhgefxhosratimtn71b7bb64.style.display = "block";
    hhgefxhosratimtn71b7bb64.style.visibility = "visible";
    hhgefxhosratimtn71b7bb64.style.position = "absolute";
    hhgefxhosratimtn71b7bb64.style.top = "0";
    hhgefxhosratimtn71b7bb64.style.left = "0";
    hhgefxhosratimtn71b7bb64.style.zIndex = "16620642";
    hhgefxhosratimtn71b7bb64.style.width = "100%";
    var has_closebtn = 0;
    for (var i = 0; i < closebuttons.length; i++) {
        if (closebuttons[i] == gateid || closebuttons[i] == escape(gateid)) {
            var is_donation = getWidgetSetting(gateid, "donation_widget");
            if (is_donation == 1) {
                document.getElementById("woghluwbimtyktvwaae8896f8eb4166e0").innerHTML = "<div style=\"position: relative; width: 72px; top: 158px; right: -225px; text-align: center; z-index: 16620662; font-size: 12px; background-color: transparent;\"><a onclick=\"prizdoxphnpytdic66d00ef2d69506002('" + gateid + "', 'afqqskboaklhxtppf0');\" style=\"cursor: pointer;\"><img src=\"http://static.cpalead.com/images/rice-widget/rice-skin-close-button.png\" border=\"0\" alt=\"Close Widget\"></a></div>";
                document.getElementById("repgocswoewietaeffd163ac01fa53ddcaf9c76e53ddcb8a").innerHTML = "<div style=\"position: relative; width: 72px; top: 158px; right: -225px; text-align: center; z-index: 16620732; font-size: 12px; background-color: transparent;\"><a onclick=\"prizdoxphnpytdic66d00ef2d69506002('" + gateid + "', 'afqqskboaklhxtppf0');\" id=\"closebtn\" style=\"cursor: pointer;\"><img width=\"135\" height=\"40\" src=\"http://static.cpalead.com/images/blank7.gif\" border=\"0\" alt=\"Close Widget\"></a></div>";
            } else {
                document.getElementById("woghluwbimtyktvwaae8896f8eb4166e0").innerHTML = "<div style=\"position: relative; width: 135px; top: 452px; right: 172px; text-align: center; z-index: 16620662; font-size: 12px; background-color: transparent;\"><a onclick=\"prizdoxphnpytdic66d00ef2d69506002('" + gateid + "', 'afqqskboaklhxtppf0');\" style=\"cursor: pointer;\"><img src=\"http://static.cpalead.com/images/help/close_btn.png\" border=\"0\" alt=\"Close Widget\"></a></div>";
                document.getElementById("repgocswoewietaeffd163ac01fa53ddcaf9c76e53ddcb8a").innerHTML = "<div style=\"position: relative; width: 135px; top: 452px; right: 172px; text-align: center; z-index: 16620732; font-size: 12px; background-color: transparent;\"><a onclick=\"prizdoxphnpytdic66d00ef2d69506002('" + gateid + "', 'afqqskboaklhxtppf0');\" id=\"closebtn\" style=\"cursor: pointer;\"><img width=\"135\" height=\"40\" src=\"http://static.cpalead.com/images/blank7.gif\" border=\"0\" alt=\"Close Widget\"></a></div>";
            }
            var has_closebtn = 1;
            found = i;
            break;
        }
    }
    if (has_closebtn == 0) {
        document.getElementById("woghluwbimtyktvwaae8896f8eb4166e0").innerHTML = "";
        document.getElementById("repgocswoewietaeffd163ac01fa53ddcaf9c76e53ddcb8a").innerHTML = "";
    }
	
	document.getElementById("repgocswoewietaeffd163ac01fa53ddcaf9c76e53ddcb8a").innerHTML = "<div style=\"position: relative; width: 500px; top: 452px; margin: 0 auto; text-align: center; z-index: 16620732; font-size: 16px; background-color: transparent;\"><a onclick=\"prizdoxphnpytdic66d00ef2d69506002('" + gateid + "', 'afqqskboaklhxtppf0');\" id=\"closebtn\" style=\"cursor: pointer;\">Click to Unlock Content</a></div>";
	
    hhgefxhosratimtn71b7bb64.style.height = arrayPageSize[1] + "px";
    setTimeout("loadGatewayIframe('" + gateid + "');", 500);
    document.getElementById("gtnwpjzldfhcwumz77dda9b298c7d148a749303").style.display = "block";
    vxwlsltpglblbvqj5e5c6588 = true;
    setTimeout("tylykugxbwnoymuoec47b2d26e5c13cf19();", 5000);
}

function secondpass() {
    countdown = countdown - 1;
    document.getElementById("closelink").innerHTML = countdown;
    if (countdown <= 0) {
        jcqzhqmgiuqjhzew334d37184();
    } else {
        setTimeout("secondpass()", 1000);
    }
}

document.write("<style type=\"text/css\">#rvsfjznmjjoljzamfd83634ea626ae92{background-color: #000; filter:alpha(opacity="+opacity+"); opacity: "+opacity/100+"; -moz-opacity: "+opacity/100+";}");
document.write("#rrrpqbinkrtocfvb52cae a {background:none;font-weight:normal;color:#fff;text-decoration:none}");
document.write("#rrrpqbinkrtocfvb52cae img {border: 0px;}");
document.write("#rrrpqbinkrtocfvb52cae a:hover {background:none;font-weight:normal;color:#fff;text-decoration:underline}</style>");
document.write("<div id=\"rrrpqbinkrtocfvb52cae\" style=\"display:none; text-align: center; line-height: normal; \">");
document.write("<div id=\"woghluwbimtyktvwaae8896f8eb4166e0\" align=\"center\" style=\"position: absolute; width: 100%; z-index: 16620662;\">");
document.write("<div style=\"position: relative; width: 135px; top: 452px; right: 172px; text-align: center; z-index: 16620662; font-size: 12px; background-color: transparent;\">");
document.write("</div>");
document.write("</div>");
document.write("<div id=\"repgocswoewietaeffd163ac01fa53ddcaf9c76e53ddcb8a\" align=\"center\" style=\"position: absolute; width: 100%; z-index: 16620732; display: none;\">");
document.write("<div style=\"position: relative; width: 135px; top: 452px; right: 172px; text-align: center; z-index: 16620732; font-size: 12px; background-color: transparent;\">");
document.write("</div>");
document.write("</div>");
document.write("<div style=\"margin: 72px auto 0px; background: transparent; height: 482px; z-index: 16620677;\">");
document.write("<iframe width=\"100%\" height=\"640\" id=\"gtnwpjzldfhcwumz77dda9b298c7d148a749303\" src=\"\" allowtransparency=\"true\" frameborder=\"0\" style=\"position: relative; height: 640px; overflow-x: hidden; overflow-y: hidden; background-color: transparent; z-index: 16620682; \" scrollbars=\"NO\"></iframe>");
document.write("</div></div>");
var number_of_surveys = 0;
addWidgetLoadEvent(startGateway("NjMxNTY%3D"));