
pag_url=window.location;
//alert(pag_url);

google_ad_client = 'esmas'; 
google_ad_output = 'js';
google_max_num_ads = '3';
google_page_url = pag_url;
google_ad_type = 'text';
//google_image_size = '300x250';
google_language = 'es';
google_country = 'MX';
google_encoding = 'latin1';
google_safe = 'high';
google_adtest = 'off';
gcolor = '#FFFFFF';
gtitulo = 'Anuncios patrocinados';
gclase = 'ntgoogle';
 
var google_out = '';

  function google_ad_request_done(google_ads)
  {
    
    var i;
	
    if (google_ads.length == 0) 
	{
      return;
    }

    if (google_ads[0].type == "image") 
	{
      google_out+= '<a href="' + google_ads[0].url+'" target="_top" title="go to ' + google_ads[0].visible_url+'">';
	  google_out+= '<img border="0" src="' + google_ads[0].image_url+'"width="' + google_ads[0].image_width+'"height="' + google_ads[0].image_height + '"></a>';

    } 
	else if (google_ads[0].type="text") 
	{
        google_out+='<span class="tahoma_10_reg" style="padding-top:15px;padding-bottom:10px;"><strong>ANUNCIOS PATROCINADOS</strong><br></span>';
        if (google_ads.length == 1) 
		{
        
            google_out+='<br><a href="' + google_ads[0].url + '" target="_blank" onmouseout="window.status=\'\'" onmouseOver="window.status=\'ir a '+google_ads[0].visible_url+'\'; return true" class="tahoma_10_reg" style="padding-top:15px;padding-bottom:10px;">';
			google_out+='<span class="tahoma_10_reg" ><b>'+google_ads[0].line1+'</b><br></span>'; 
			google_out+='<span class="tahoma_10_reg" >'+google_ads[0].line2+'&nbsp;'+google_ads[0].line3 + '<br></span>';
			google_out+='<span class="tahoma_10_reg" >'+google_ads[0].visible_url+'</span></a><br>';
        } 
		else if (google_ads.length > 1) 
		{
           
            for(i=0; i < google_ads.length; ++i) 
			{
                google_out+='<br><a href="'+google_ads[i].url+'" target="_blank" onmouseout="window.status=\'\'" onmouseOver="window.status=\'ir a '+google_ads[i].visible_url+'\'; return true" class="tahoma_10_reg" style="padding-top:15px;padding-bottom:10px;">';
				google_out+='<span class="tahoma_10_reg"><b>'+google_ads[i].line1+'</b><br></span>'; 
				google_out+='<span class="tahoma_10_reg">'+google_ads[i].line2+'&nbsp;'+google_ads[i].line3 + '<br></span>';
				google_out+='<span class="tahoma_10_reg">'+google_ads[i].visible_url+'</span></a><br>';
            }
        }
    }

  }    

  function write_ads(canal,subcanal)
  {
  	var ch=canal;
	var sch=subcanal;
	
  	document.write(google_out);
  }






