﻿function writeZoneScript(zone) {
    var m3_u = (location.protocol == 'https:' ? 'https://d1.openx.org/ajs.php' : 'http://d1.openx.org/ajs.php');
    var m3_r = Math.floor(Math.random() * 99999999999);
    if (!document.MAX_used) document.MAX_used = ',';
    document.write("<scr" + "ipt type='text/javascript' src='" + m3_u);
    document.write("?zoneid=" + zone);
    document.write('&amp;cb=' + m3_r);
    if (document.MAX_used != ',') document.write("&amp;exclude=" + document.MAX_used);
    document.write(document.charset ? '&amp;charset=' + document.charset : (document.characterSet ? '&amp;charset=' + document.characterSet : ''));
    document.write("&amp;loc=" + escape(window.location));
    if (document.referrer) document.write("&amp;referer=" + escape(document.referrer));
    if (document.context) document.write("&context=" + escape(document.context));
    if (document.mmm_fo) document.write("&amp;mmm_fo=1");
    document.write("'><\/scr" + "ipt>");
}

function hidediv() {
    try {
        if (document.getElementById("adMegaBoardzone").offsetWidth < 70) {
            document.getElementById('adMegaBoard').style.visibility = 'hidden';
        } 
    }
    catch (err)
    { }
    try {
        if (document.getElementById('adWideSquarezone').offsetWidth < 70) {
            document.getElementById('adWideSquare').style.display = 'none';
        }
    } catch (err) { }
    try {
        if (document.getElementById('adTopExclusivezone').offsetWidth < 70) {
            document.getElementById('adTopExclusive').style.display = 'none';
        }
    } catch (err) { }
    try {
        if (document.getElementById('adSuper1zone').offsetWidth < 70) {
            document.getElementById('ctl00_adSuper1').style.display = 'none';
        }
    } catch (err) { }
    try {
        if (document.getElementById('adSuper2zone').offsetWidth < 70) {
            document.getElementById('ctl00_adSuper2').style.display = 'none';
        } 
    } catch (err) { }

    try {
        if (document.getElementById('adWide2Zone').offsetWidth < 70) {
            document.getElementById('ctl00_adWide2').style.display = 'none';
        }
    } catch (err) { }
}