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 += '
Ads by Google
';
if (google_ads.length == 1) {
s += '';
} else if (google_ads.length > 1) {
for(i=0; i < google_ads.length; ++i) {
s += '';
}
}
}
if(BBC.adverts.getZoneData().keyValues[bbc_adsense_slot].indexOf("weather") != -1){
document.write(''+s+'
');
}else{
document.write(''+s+'
');
}
return;
}
google_ad_client = 'ca-bbccom';
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';
// % of impressions to serve with the test option B instead of control option A
var test_percent = 20;
// randomly determine whether to serve a test impression
isTestImpression=(Math.random()>=(test_percent/100)?true:false);
// Static ad request values - move into if-block below if desired
if (isTestImpression) {
// Test option B parameters
google_ad_channel = bbc_adsense_country+"_"+BBC.adverts.getZoneData().zone+" channel_b";
// Modifies styling for option_B(otherwise defaults to option_A).
if (document.getElementById('bbccom_adsense_middle_inner')) {
document.getElementById('bbccom_adsense_middle_inner').className='adsense_optionB';
}
if (document.getElementById('bbccom_adsense_mpu_inner')) {
document.getElementById('bbccom_adsense_mpu_inner').className='adsense_optionB';
}
} else {
// Control option A parameters
google_ad_channel = bbc_adsense_country+"_"+BBC.adverts.getZoneData().zone+" channel_a";
}
//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('