function HandleAdUnitImpression(google_ads) {
    try {
        if (typeof(google_ads) != 'undefined') {
            AdImpression.push(google_ads);
        }
    }
    catch (e) {}
    return;
}

//google callback function
function google_ad_request_done(google_ads) {
    if (google_ads.length == 0) {
        try {
            HandleAdUnitImpression(google_ads);
        }
        catch (e) {}
        return;
    }

    //*************************************************************************
    //CREATIVE SECTION
    //*************************************************************************
    //*
    var apostrophe1 = /'/ig;
    var apostrophe2 = /&#39;/ig;
    var quote1 = /"/ig;
    var quote2 = /&#34;/ig;
    var s = '<div style="color: #a7a7a7; float:right;"><a class="ad_attribution" href="https://www.google.com/adsense/support/bin/request.py?contact=abg_afc&hideleadgen=1">Ads by Google</a></div><div class="clear"></div><ul>';
    for (i = 0; i < google_ads.length; i++) {
        s +=    '<li><a target="_blank" href="' + google_ads[i].url + '" class="adLink" title="' + google_ads[i].visible_url.replace(apostrophe1,"") + '">' + google_ads[i].line1.replace(apostrophe1,"").replace(apostrophe2,"") + '</a><br />';
        //s +=    '<a target="_blank" href="' + google_ads[i].url + '" class="descLink" title="' + google_ads[i].visible_url.replace(apostrophe1,"") + '">' + google_ads[i].line2.replace(apostrophe1,"").replace(apostrophe2,"") + ' ' + google_ads[i].line3.replace(apostrophe1,"").replace(apostrophe2,"") + '</a><br />';
        s +=    google_ads[i].line2.replace(apostrophe1,"").replace(apostrophe2,"") + ' ' + google_ads[i].line3.replace(apostrophe1,"").replace(apostrophe2,"") + '<br />';
        s +=    '<a target="_blank" href="' + google_ads[i].url + '" class="urlLink" title="' + google_ads[i].visible_url.replace(apostrophe1,"") + '">' + google_ads[i].visible_url.replace(apostrophe1,"").replace(apostrophe2,"") + '</a>';
        s +=    '</li>';
        if (i < (google_ads.length - 1)) {
            s += '';
        }
    }

    try {
        google_ads.push(new Object());
        google_ads[google_ads.length-1].markup = s;
        if (typeof(google_ad_div) != 'undefined') {
            if (google_ad_div != null && google_ad_div != '') {
                google_ads[google_ads.length-1].google_ad_div = google_ad_div;
            }
        }
    }
    catch (e) {}

    try {
        HandleAdUnitImpression(google_ads);
    }
    catch (e) {}

    document.write(s + '</ul>');
}

function google_afs_request_done(google_ads) {
    if (google_ads.length <= 0){return;}

    var apostrophe1 = /'/ig;
    var apostrophe2 = /&#39;/ig;
    var quote1 = /"/ig;
    var quote2 = /&#34;/ig;
    var s = '<div style="color: #a7a7a7; float:right;">Sponsored Links</div><div class="clear"></div><ul>';
    for (i = 0; i < google_ads.length; i++) {
        s +=    '<li><a target="_blank" href="' + google_ads[i].url + '" class="adLink" title="' + google_ads[i].visible_url.replace(apostrophe1,"") + '">' + google_ads[i].line1.replace(apostrophe1,"").replace(apostrophe2,"") + '</a><br />';
        //s +=    '<a target="_blank" href="' + google_ads[i].url + '" class="descLink" title="' + google_ads[i].visible_url.replace(apostrophe1,"") + '">' + google_ads[i].line2.replace(apostrophe1,"").replace(apostrophe2,"") + ' ' + google_ads[i].line3.replace(apostrophe1,"").replace(apostrophe2,"") + '</a><br />';
        s +=    google_ads[i].line2.replace(apostrophe1,"").replace(apostrophe2,"") + ' ' + google_ads[i].line3.replace(apostrophe1,"").replace(apostrophe2,"") + '<br />';
        s +=    '<a target="_blank" href="' + google_ads[i].url + '" class="urlLink" title="' + google_ads[i].visible_url.replace(apostrophe1,"") + '">' + google_ads[i].visible_url.replace(apostrophe1,"").replace(apostrophe2,"") + '</a>';
        s +=    '</li>';
        if (i < (google_ads.length - 1)) {
            s += '';
        }
    }
    document.write(s + '</ul>');
}

