function print_header(header){ 

document.write('<div style="width:180px;overflow:hidden;"><table class="toplinks_table" cellspacing="0" cellpadding="0"><tr><td class="toplinks_header">Mejores links<br>' + header+ '</td></tr>');

}

String.prototype.wordWrap = function(m, b, c){
    var i, j, l, s, r = this.split("\n");
    if(m > 0) for(i = -1, l = r.length; ++i < l;){
        for(s = r[i], r[i] = ""; s.length > m;
            j = c ? m : (j = s.substr(0, m).match(/\S*$/)).input.length - j[0].length
            || j.input.length + (j = s.substr(m).match(/^\S*/)).input.length + j[0].length,
            r[i] += s.substr(0, j) + ((s = s.substr(j)).length ? b : "")
        );
        r[i] += s;
    }
    return r.join("\n");
};

function google_ad_request_done(google_ads) {

    var s = '';
    var i = 0;

    if (google_ads.length == 0) {
      return;
    }

	if (google_ads.length == 1) {
	str = google_ads[i].line2 + ' ' + google_ads[i].line3;
	
	s += '<tr><td><span class="toplinks_product_name"><a class="toplinks_product_name" style="cursor:pointer;cursor:hand;" onclick="javascript:window.open(\'' + google_ads[i].url  + '\')" onmouseover="window.status=\'' + google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'">'+google_ads[i].line1+'</a></span><br>';
	s += '<span class="toplinks_product_link"><a class="overture_showurl_pg" style="cursor:pointer;cursor:hand;" onclick="javascript:window.open(\'' + google_ads[i].url  + '\')" onmouseover="window.status=\'' + google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'">';
	s += google_ads[i].visible_url.wordWrap(22, "<br/>", true);
	s += '</a></span><br/><span class="toplinks_product_desc"><a class="overture_desc_pg" style="cursor:pointer;cursor:hand;" onclick="javascript:window.open(\'' + google_ads[i].url  + '\')" onmouseover="this.style.color=\'#000\';window.status=\'' + google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'">'+str+'</a></span><br/></td></tr>';

      } else if (google_ads.length > 1) {

        for(i=0; i < google_ads.length; ++i) {
	str = google_ads[i].line2 + ' ' + google_ads[i].line3;

	s += '<tr><td><span class="toplinks_product_name"><a class="toplinks_product_name" style="cursor:pointer;cursor:hand;" onclick="javascript:window.open(\'' + google_ads[i].url  + '\')" onmouseover="window.status=\'' + google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'">'+google_ads[i].line1+'</a></span><br>';
	s += '<span class="toplinks_product_link"><a class="overture_showurl_pg" style="cursor:pointer;cursor:hand;" onclick="javascript:window.open(\'' + google_ads[i].url  + '\')" onmouseover="window.status=\'' + google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'">';
	s += google_ads[i].visible_url.wordWrap(22, "<br/>", true);
	s += '</a></span><br/><span class="toplinks_product_desc"><a class="overture_desc_pg" style="cursor:pointer;cursor:hand;" onclick="javascript:window.open(\'' + google_ads[i].url  + '\')" onmouseover="this.style.color=\'#000\';window.status=\'' + google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'">'+str+'</a></span><br/></td></tr>';

        } 

	s += '<tr><td><a href="javascript:void(0)" onclick="window.open(\'' + google_info.feedback_url + '\');" onmouseover="window.status=\'\'" onmouseout="window.status=\'\'">Ads by Google</a>';
	s += '</td></tr>';
      }
	
    document.write(s);
    return;
  }

