﻿function showBranch(branch) {
    var objBranch = document.getElementById(branch);

    if (objBranch != null) {
        if (objBranch.style.display == 'block')
            objBranch.style.display = 'none';
        else
            objBranch.style.display = 'block';
    }
}

function subtract(minuend, subtrahend) {
    var position = minuend.indexOf(subtrahend);
    if (position == -1) {
        return minuend;
    }
    return minuend.substr(0, position) + subtrahend.substr(position);
}

document.avp_ready = 1;
function avp_zone(a) { avp_single('zone?zid=' + a["zid"], a) } function avp_campaign(a) { avp_single('campaign?cid=' + a["cid"], a) } function avp_media(a) { avp_single('media?mid=' + a["mid"], a) } function avp_single(a, b) { var c = (window.location.protocol != 'https:') ? "http" : "https"; var d = c + "://" + b["base"]; var e = ''; if (b["refresh"]) { e += '&refresh=' + b["refresh"] } if (b["refresh_limit"]) { e += '&refresh_limit=' + b["refresh_limit"] } if (b["click"]) { e += '&click=' + b["click"] } if (b["exit"]) { e += '&exit=' + b["exit"] } if (b["include"]) { e += '&include=' + b["include"] } if (b["exclude"]) { e += '&exclude=' + b["exclude"] } if (b["timeout"]) { e += '&timeout=' + b["timeout"] } e = avp_opts(b, e); if (b["iframe"]) { document.write('<iframe src="' + d + '/servlet/view/' + b["type"] + '/javascript/html/' + a + '&pid=' + b["pid"] + e + '" height="' + b["height"] + '" width="' + b["width"] + '" hspace="0" vspace="0" frameborder="0" marginwidth="0" marginheight="0" scrolling="no">' + '<a href="' + d + '/servlet/click/' + a + '&pid=' + b["pid"] + '&lookup=true' + e + '" rel="nofollow" target="_blank">' + '<img src="' + d + '/servlet/view/' + b["type"] + '/javascript/image/' + a + '&pid=' + b["pid"] + e + '" height="' + b["height"] + '" width="' + b["width"] + '" hspace="0" vspace="0" border="0" alt="Click Here!">' + '</a>' + '</iframe>') } else { document.write('<scr' + 'ipt src="' + d + '/servlet/view/' + b["type"] + '/javascript/' + a + '&pid=' + b["pid"] + e + '" type="text/javascript"></scr' + 'ipt>') } } function avp_multiple(a) { var b = (window.location.protocol != 'https:') ? "http" : "https"; var c = b + "://" + a["base"]; var d = (a["renderer"] != "grid") ? '&layout=' + a["layout"] : '&columns=' + a["columns"]; d = avp_opts(a, d); document.write('<scr' + 'ipt src="' + c + '/servlet/view/' + a["type"] + '/unique/javascript/' + a["renderer"] + '?zid=' + a["zid"] + '&pid=' + a["pid"] + '&total=' + a["total"] + '&padding=' + parseInt(a["padding"] || 0) + '&margin=' + parseInt(a["margin"] || 0) + d + '" type="text/javascript"></scr' + 'ipt>') } function avp_escape(a) { return (a.indexOf('+') == -1 && a.indexOf('%') == -1) ? escape(a) : a } function avp_opts(a, b) { if (a["contextual"]) { b += '&contextual=' + a["contextual"] } for (var i = 1; i <= 10; i++) { if (a["custom" + i]) { b += '&custom' + i + '=' + avp_escape(a["custom" + i]) } } if (a["keywords"]) { b += '&keywords=' + avp_escape(a["keywords"]) } b += '&random=' + Math.floor(89999999 * Math.random() + 10000000); b += '&millis=' + new Date().getTime(); if (a["cturl"]) { b += '&encode=' + parseInt(a["encode"] || 0) } b += '&referrer=' + escape(document.location); if (a["cturl"]) { b += '&cturl=' + escape(a["cturl"]) } return b }
