var google_adnum = 0;

function google_ad_request_done(google_ads) {
	var s = '';
	var i=0;

  if(google_ads.length == 0){
    return;
  }
  
  if(google_ads[0].type == "flash"){
    s += '<div class="publiAdsense flash"><a class="anunciosGoogle" href=\"' + google_info.feedback_url + '\" style color:000000">Anuncios Google</a><br>' +
    '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"' +
    ' codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\"' +
    ' width=\"' + google_ad.image_width + '\" height=\"' + google_ad.image_height + '\"> <param name=\"movie\" value=\"' + 
    google_ad.image_url + '\">' + 
    '<param name=\"quality\" value=\"high\">' + 
    '<param name=\"AllowScriptAccess\" value=\"never\">' + 
    '<embed src=\"' + 
    google_ad.image_url + '\" width=\"' + 
    google_ad.image_width + '\" height=\"' + 
    google_ad.image_height + 
    '\" type=\"application/x-shockwave-flash\"' + 
    ' AllowScriptAccess=\"never\" ' + 
    ' pluginspace=\"http://www.macromedia.com/go/getflashplayer\"></embed></object></div>';

  }else if(google_ads[0].type == 'image'){
    s += '<div class="publiAdsense image"><a class="anunciosGoogle" href=\"' +
    google_info.feedback_url + '\" style="color:000000">Anuncios Google</a><br> <a href="' + 
    google_ads[0].url + '" target="_top" title="vaya a ' + 
    google_ads[0].visible_url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'vaya a ' +
    google_ads[0].visible_url + '\';return true"><img border="0" src="' + 
    google_ads[0].image_url + '"width="' + 
    google_ads[0].image_width + '"height="' + 
    google_ads[0].image_height + '"></a></div>';

  }else if (google_ads[0].type == "html") {
    s += '<div class="publiAdsense html">' + google_ads[0].snippet + '</div>';

  }else{
    if(google_ads.length == 1){
      s = '<div class="publiAdsense texto"><h3><a target="_blank" href=\"' + google_info.feedback_url + '\">Anuncios Google</a></h3>';
      s += '<p style="display:none;">Anuncio Único</p>';
      s += '<ul class="unico">';
      s += '<li><h4><a target="_blank" href="' +
        google_ads[i].url + '">' +
        google_ads[i].line1 + '</a></h4><p>' +
        google_ads[i].line2 + ' ' +
        google_ads[i].line3 + '</p><a target="_blank" href="' +
        google_ads[i].url + '" class="link">' +
        google_ads[i].visible_url + '</a></li></ul></div>';
    }
  
    if (google_ads.length > 1) {
      s = '<div class="publiAdsense texto"><h3><a target="_blank" href=\"' + google_info.feedback_url + '\">Anuncios Google</a></h3>';
      s += '<p style="display:none;">Entre uno y tres: ' + google_ads.length + '</p>';
      s += '<ul>';
      for(i = 0; i < google_ads.length; ++i) {
        s += '<li><h4><a target="_blank" href="' +
          google_ads[i].url + '">' +
          google_ads[i].line1 + '</a></h4><p>' +
          google_ads[i].line2 + ' ' +
          google_ads[i].line3 + '</p><a target="_blank" href="' +
          google_ads[i].url + '" class="link">' +
          google_ads[i].visible_url + '</a></li>';
      }
      s += '</ul></div>';
    }
  }

	if((google_ads.length > 0) && (google_ads[0].bidtype == "CPC")) {  /* introduzca este fragmento para cada llamada de anuncio */
		google_adnum = google_adnum + google_ads.length;
	}
  document.write(s);
	return;
}

google_analytics_domain_name = "publico.es";
google_ad_client = 'ca-pub-5898552818181536';
google_ad_output = 'js';
google_max_num_ads = '3';
google_feedback = 'on';
google_adtest = 'off';
google_language = 'es';
google_skip = google_adnum;

