/*
 * Include styling & HTML output for Google Ads
 */
function google_ad_request_done(google_ads) {
	var s = '';
	var i;
	
	if (google_ads.length == 0) {
		return;
	}
	
	if (google_ads.length > 1) {
		
		s += '<div class="pub-google"><div class="titlebar">Annonces Google</div><ul>'
	
		/*
		 * For text ads, append each ad to the string.
		 */
		/*
		for(i = 0; i < google_ads.length; ++i) {	
			s += '<li><a target="_blank" rel="nofollow" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'\';return true"><h5>' +
				google_ads[i].line1 + '</h5><p>' +
				google_ads[i].line2 + ' ' + google_ads[i].line3 + '</p><span class=\"g_url\">' +
				google_ads[i].visible_url + '</span></a></li>';
		}
		*/

		for(i = 0; i < google_ads.length; ++i) {	
			s += '<li><h5><a target="_blank" rel="nofollow" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'\';return true">' + 
				google_ads[i].line1 + '</a></h5><p>' +
				google_ads[i].line2 + ' ' + google_ads[i].line3 + '</p><span class=\"g_url\"><a target="_blank" rel="nofollow" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'\';return true">' +
				google_ads[i].visible_url + '</a></span></li>';
		}

		s += '</ul></div>';
	}

	document.write(s);
	return;
}
