//produção

//Título do anúncio
afc_tit_texto = 'Links Patrocinados';

//Estilos

//DIV principal
afc_div = '\
background-color: #F9F7F8; \
width: 477px; \
font-size: 12px; \
padding: 10px; \
font-family: "Trebuchet MS"; \
';

//DIV anúncio
afc_div_anuncio = '\
margin-right: 20px; \
cursor: pointer; \
';

//Título
afc_tit = '\
font-weight: bold; \
margin: 0; \
background-image: none; \
font-size: 12px; \
';

//Linha 1
afc_lin1 = '\
margin: 10px 0 0 0; \
text-decoration:underline; \
font-weight: bold; \
line-height: 16px;\
';

//Linha 2
afc_lin2 = '\
line-height: 16px;\
';

//Linha 3
afc_lin3 = '\
line-height: 16px;\
';

//funções
moveContent = function(a, b) {
    var c = document.getElementById(a);
    var d = document.getElementById(b);
    if(d != null){
        d.appendChild(c);
        c.style.display='block';
    }
}
function styleById(id, estilo, valor) {
    var x = document.getElementById(id);
    x.style[estilo] = valor;
}
function google_ad_request_done(google_ads) {
    if (google_ads.length == 0) {
        return;
    }
    //Criação da DIV
    var s = '<div id="afc_links" style="'+afc_div+'">';

    if (google_ads[0].type == "text") {
        s += '<h3 style="'+afc_tit+';">'+afc_tit_texto+'</h3>';
        if (google_ads.length > 0) {
            for(i=0; i < google_ads.length; ++i) {
                s+=
				'<div style="'+afc_div_anuncio+'" onclick="window.location.href=\''+google_ads[i].url+'\'">'+ //Div dos anúncios
                '<p style="'+afc_lin1+'">'+google_ads[i].line1+'</p>'+ //Título do anúncio
                '<p style="'+afc_lin2+'">'+google_ads[i].line2+' '+ google_ads[i].line3+'</p>'+ //Texto do anúncio
                '<p style="'+afc_lin3+'">'+google_ads[i].visible_url+'</p>'+ //Link final do anúncio
                '</div>';
            }
        }
    }
    s += '</div>';
	
	
    document.write(s);

    //Tratamento das DIVs e apresentação 
    moveContent('afc_links','linksPatrocinados');
	 styleById('linksPatrocinados','display','block');
}

// Config Google Inicio
google_ad_client = 'ca-abril_js';
google_ad_channel = 'eda, mdemulher, mdemulher_tv';
google_ad_output = 'js';
google_max_num_ads = '3';
google_ad_type = 'text';
google_encoding = 'iso-8859-1';
google_safe = 'high';
google_adtest = 'off'; //produção
google_language = 'pt';
// Config Google Fim