

if(BBC.adverts.checkWrite(bbc_adsense_slot) && typeof BBC.adverts.getZoneData().keyValues[bbc_adsense_slot] != 'undefined'  ) {

	

	 function google_ad_request_done(google_ads) {
		var s = '';
		var i;
	  
		if (google_ads.length == 0)
		  return;
		
	

		if (google_ads[0].type == "text") {
			
			s += '<div class="adsensetitle">Ads by Google</div>';

			if (google_ads.length == 1) {
			         
				s += '<div class="adsensead"><a href="' + google_ads[0].url + '" ' +
			         'onmouseout="window.status=\'\'" ' + 'onmouseover="window.status=\'go to ' +
			           google_ads[0].visible_url + '\';return true;" target="_blank">' +
			           '<b>' + google_ads[0].line1 + '</b><br></a>' + '<span>' +
			           google_ads[0].line2 + ' ' +'<a href="' + google_ads[0].url + '" ' +'onmouseout="window.status=\'\'" ' +
			           'onmouseover="window.status=\'go to ' +google_ads[0].visible_url + '\';return true;" target="_blank">' +google_ads[0].line3 + '<br></span>' +
			           google_ads[0].visible_url + '</a><br></div>';
			} else if (google_ads.length > 1) {
				
				for(i=0; i < google_ads.length; ++i) {
				    s += '<div class="adsensead"><a href="' + google_ads[i].url + '" ' +
				        'onmouseout="window.status=\'\'" ' + 'onmouseover="window.status=\'go to ' +
				        google_ads[i].visible_url + '\';return true;" target="_blank">' +
				        '<b>' + google_ads[i].line1 + '</b><br></a>' + 
				        '<span>' +google_ads[i].line2;
					if(bbc_adsense_slot == "adsense_mpu") {
							s+='<br>';
					}else{
							s+=' ';
					}
					s+= google_ads[i].line3 + '<br></span>' +'<a href="' + google_ads[i].url + '" ' +
				        'onmouseout="window.status=\'\'" ' + 'onmouseover="window.status=\'go to ' +
				        google_ads[i].visible_url + '\';return true;" target="_blank">' + google_ads[i].visible_url + '</a></div>';
				}
			}
	    }
		
		if(BBC.adverts.getZoneData().keyValues[bbc_adsense_slot].indexOf("weather") != -1){
			document.write('<div class="'+BBC.adverts.getZoneData().keyValues[bbc_adsense_slot]+'_top"></div><div class="'+BBC.adverts.getZoneData().keyValues[bbc_adsense_slot]+'">'+s+'</div><div class="'+BBC.adverts.getZoneData().keyValues[bbc_adsense_slot]+'_bottom"></div>');
		}else{
			document.write('<div class="'+BBC.adverts.getZoneData().keyValues[bbc_adsense_slot]+'">'+s+'</div>');
		}
		
	    return;
}

google_ad_client = 'ca-bbccom'; // substitute your client_id
google_ad_channel = bbc_adsense_country+"_"+BBC.adverts.getZoneData().zone;
google_ad_output = 'js';
google_max_num_ads = '3';
google_ad_type = 'text'; // type of ads to display
google_language = 'en';

//news homepage specific params
if(BBC.adverts.getZoneData().zone == "news_homepage_int"){
var bbc_adsense_ran = Math.ceil(Math.random() * 3);
bbc_adsense_ran == 1 ? google_page_url = "http://news.bbc.co.uk/2/hi/business/default.stm" :
bbc_adsense_ran == 2 ? google_page_url = "http://news.bbc.co.uk/2/hi/entertainment/default.stm" :
google_page_url = "http://news.bbc.co.uk/2/hi/technology/default.stm";
}


document.write('<script language="JavaScript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></scr'+'ipt>');
}
				