var how_many_ads = 22;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (location.href.indexOf("travel") != -1 || location.href.indexOf("photos") != -1 || location.href.indexOf("joke") != -1 || location.href.indexOf("docsql") != -1 || location.href.indexOf("vqlog") != -1 || location.href.indexOf("geo") != -1 || location.href.indexOf("hiking") != -1)
{
    ad=5;
}
else
	if (location.href.indexOf("/map.php") != -1 || location.href.indexOf("vhfdx.info/index_e.html") != -1)
		ad=0;

width="363";
height="77";
if (ad==1) {
url="/vqlog_e.html";
title="¡Importa tu libro de guardia actual en segundos!";
banner="/images/ban3vqlog_e.gif";
width="468";
height="60";
}
if (ad==2) {
url="/vqlog_e.html";
title="¿Quieres controlar tus cuadriculas trabajadas?";
banner="/images/ban1vqlog_e.gif";
}
if (ad==3) {
url="/vqlog_e.html";
title="¿Encaja tu libro de guardia con tu actividad en VHF?";
banner="/images/ban2vqlog_e.gif";
}
if (ad==4) {
url="/vqlog_e.html";
title="¡Es hora de actualizarte a un libro de guardia mas moderno!";
banner="/images/ban4vqlog_e.gif";
width="468";
height="60";
}

if (ad != 0)
{
document.write('<p align="center">');
if (ad >= 5 && ad <= 20)
	{	//AdSense para contenido 
	document.write('<script type=\"text/javascript\">');
	document.write('google_ad_client = \"pub-8909420404547261\";');
	document.write('google_ad_width = 728;');
	document.write('google_ad_height = 90;');
	document.write('google_ad_format = \"728x90_as\";');
	document.write('google_ad_type = \"text_image\";');
	if (location.href.indexOf("/callbook") != -1)
	  document.write('google_ad_channel =\"8890283567\";');
	else
	  document.write('google_ad_channel =\"4304152412\";');
	document.write('google_color_border = \"FFFFFF\";');
	document.write('google_color_bg = \"FFFFFF\";');
	document.write('google_color_link = \"0000FF\";');
	document.write('google_color_url = \"008000\";');
	document.write('google_color_text = \"000000\";');
	document.write('</script>');
	document.write('<script type=\"text/javascript\"');
	document.write('src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">');
	document.write('</script>');
	}
else
	if (ad == 21 || ad == 22)
	{	// Ticker
		if (ad == 21)
			document.write('<iframe name=\"dxsherlockeu_e\" src=\"http://www.vhfdx.info/spots/tickereu_e.html\"');
		else
			document.write('<iframe name=\"dxsherlockna_e\" src=\"http://www.vhfdx.info/spots/tickerna_e.html\"');
		document.write('marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" height=\"144\" align=\"middle\" width=\"804\">');
		document.write('El explorador de Internet no admite marcos flotantes o no está configurado para mostrarlos.</iframe>');	
	}
	else
	{	
	document.write('<center>');
	document.write('<a href=\"' + url + '\" target=\"_top\">');
	document.write('<img src=\"' + banner + '\" width=')
	document.write(width + ' height=' + height + ' ');
	document.write('title=\"' + title + '\" border=0><br></a>');
	document.write('</center>');
	}
document.write('</p>');
}
