/* ADSENSE */
// Configuración AdSense 20minutos.es
google_ad_client = 'ca-scm-20minutos_js'; // Código de cliente
google_ad_type = 'text'; // Tipo de anuncios
google_ad_output = 'js'; // Tipo de respuesta (JS, para poder procesarla y pintarla a nuestro aire)
google_adtest = 'off'; // Modo de pruebas on/off
google_encoding = 'latin1';
google_language = 'es'; // Idioma de los anuncios
google_safe = 'medium';
google_section = 'default';

//Según el canal definimos la función que pinta los anuncios de una manera u otra
if (google_ad_channel == 'Photogallery_bottom')
{
	google_ad_request_done = function (google_ads)
	{
		if (google_ads.length < 1)
		{
		    return; // nada que pintar
		}
		if (google_ads[0].type == 'text')
		{
			var html = '<div class="publi_google estirar">';
			html += '<div class="cab_google estirar"><h2>Anuncios Google</h2></div>';

		    var clase = 'a33';
		    switch (google_ads.length)
		    {
		        case 1 : clase = 'a100'; break;
		        case 2 : clase = 'a50'; break;
		    }

			for (i = 0; i < google_ads.length; i++)
			{
				onmouse = 'onmouseover="window.status = \'' + google_ads[i].visible_url + '\'; return true;" onmouseout="window.status = \'\'; return true;"';
				html += '<div class="' + clase + '">';
				html += '<h3><a class="notrack" href="' + google_ads[i].url + '" target="_blank" ' + onmouse + ' title=" ' + google_ads[i].visible_url + '">' + google_ads[i].line1 + '</a></h3>';
				html += '<h4>' + google_ads[i].line2 + ' ' + google_ads[i].line3 + '</h4>';
				html += '<p><a class="notrack" href="' + google_ads[i].url + '" target="_blank" ' + onmouse + ' title=" ' + google_ads[i].visible_url + '">' + google_ads[i].visible_url + '</a></p>';
		        html += '</div>';
			}

			html += '</div>';
		}

		document.write(html);
	}
}
else
{
	google_ad_request_done = function (google_ads)
	{
		if (google_ads.length < 1)
		{
		    return; // nada que pintar
		}
		if (google_ads[0].type == 'text')
		{
			var html = '<div class="publi_google">';
			html += '<div class="cab_google estirar"><h2>Anuncios Google</h2></div>';

			html += '<ul>';
			for (i = 0; i < google_ads.length; i++)
			{
				onmouse = 'onmouseover="window.status = \'' + google_ads[i].visible_url + '\'; return true;" onmouseout="window.status = \'\'; return true;"';
				html += '<li>';
				html += '<h3><a class="notrack" href="' + google_ads[i].url + '" target="_blank" ' + onmouse + ' title=" ' + google_ads[i].visible_url + '">' + google_ads[i].line1 + '</a></h3>';
				html += '<h4>' + google_ads[i].line2 + ' ' + google_ads[i].line3 + '</h4>';
				html += '<p><a class="notrack" href="' + google_ads[i].url + '" target="_blank" ' + onmouse + ' title=" ' + google_ads[i].visible_url + '">' + google_ads[i].visible_url + '</a></p>';
		        html += '</li>';
			}
			html += '</ul>';

			html += '</div>';
		}

		document.write(html);
	}
}