function print_header(pt, it, links, hosturl, site) {
document.write('<div class ="i7leftBigColumn">');
document.write('<div class="i7v2_HeadSubNPH" style="border-bottom:1px solid #999;">');
document.write('<h4>Sponsored Links</h4>');
document.write('<a title="Websites" href="http://www.dooyoo.co.uk/cgi-bin/cya4co.uk.cgi?seg0=' + pt + '&amp;seg1=' + it + '&amp;seg2='+ links + '/&amp;host=' +hosturl+ '&amp;site=' + site + '" class="i7_HeadSubNPH_link">More sponsored links</a>');
document.write('</div>');
document.write('<div style="border-left:1px solid #999;border-right:1px solid #999;">');
document.write('<table cellspacing="0" cellpadding="0" border="0" class="i7_toplinks_table2">');
}

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 class="i7_toplinks_left"><span class="i7_toplinks_product_name"><a class="overture_title" 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" style="cursor:pointer;cursor:hand;text-decoration:underline" 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;
	s += '</a></span><br/><span class="i7_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>';
	s += '<td class="i7_toplinks_right">&nbsp;</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 class="i7_toplinks_left"><span class="i7_toplinks_product_name"><a class="overture_title" 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" style="cursor:pointer;cursor:hand;text-decoration:underline" 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;
	s += '</a></span><br/><span class="i7_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>';
	s += '<td class="i7_toplinks_right">&nbsp;</td></tr>';

        } 

	s += '<tr><td class="i7_toplinks_left" colspan="2" style="background:#fff;padding-top:7px;padding-bottom:7px"><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;
  }