function google_afs_request_done(google_ads)
      {
          var google_num_ads = google_ads.length;
          if (google_num_ads <= 0)
          {
              return;
          }

          var wideAds = "";   // wide ad unit html text
          var narrowAds = "";   // narrow ad unit html text
		  var wideAdsTop = ""; // wide ad at the top
		  var wideAdsTopCounter = 0;

          for(i = 0; i < google_num_ads; i++)
          {
              if (google_ads[i].type=="text/wide")
              {
                  if(wideAdsTopCounter <1)
				  {
					  
					  wideAdsTopCounter++;
					// render a wide ad
					wideAdsTop+='<a style="text-decoration:none" onmouseover="javascript:window.status=\'' +
							google_ads[i].url + '\';return true;" ' +
							'onmouseout="javascript:window.status=\'\';return true;" ' +
							'href="' + google_ads[i].url + '">' +
							'<span class="ad_line1">' + google_ads[i].line1 + '</span></a>' +
							'<span class="ad_text">' + google_ads[i].line2 + '</span>' +
							'<a style="text-decoration:none" href="' + google_ads[i].url + '">' +
							'<div class="ad_url">' + google_ads[i].visible_url + '</div></a>';
				  }
				  else
				  {
					  wideAds+='<a style="text-decoration:none" onmouseover="javascript:window.status=\'' +
                          google_ads[i].url + '\';return true;" ' +
                          'onmouseout="javascript:window.status=\'\';return true;" ' +
                          'href="' + google_ads[i].url + '">' +
                          '<span class="ad_line1">' + google_ads[i].line1 + '</span></a>' +
                          '<span class="ad_text">' + google_ads[i].line2 + '</span>' +
						  '<a style="text-decoration:none" href="' + google_ads[i].url + '">' +
                          '<div class="ad_url">' + google_ads[i].visible_url + '</div></a>';
				  }
              }

              else
              {
                  // render a narrow ad
                  narrowAds+='<a style="text-decoration:none" onmouseover="javascript:window.status=\'' +
                          google_ads[i].url + '\';return true;" ' +
                          'onmouseout="javascript:window.status=\'\';return true;" ' +
                          'href="' + google_ads[i].url + '">' +
                          '<span class="ad_line1">' + google_ads[i].line1 + '</span></a><br>' +
                          '<span class="ad_text">' + google_ads[i].line2 + ' ' + google_ads[i].line3 + '</span><br>' +
                          '<a style="text-decoration:none" href="' + google_ads[i].url + '">' +
						  '<div class="ad_url">' + google_ads[i].visible_url + '</div></a>';
              }
          }

          if (narrowAds != "")
          {
              narrowAds = '<a style="text-decoration:none" ' +
                          'href="http://services.google.com/feedback/online_hws_feedback">' +
                          '<div class="ad_header" style="text-align:left">Ads by Google</div></a>' + narrowAds;
          }
		  else {
				narrowAds='<a target="_blank" href="http://clickatest.co.uk/" style="text-align:center; padding-left:10px;" title="Pre employment skills tests and psychometric assessment at ClickAtest"><img src="/v2/images/advertise/cat_banner.jpg" style="margin:38px 0 0;" alt="Pre employment skills tests and psychometric assessment at ClickAtest" /></a>'
			}
          if (wideAds != "")
          {
              wideAds = '<a style="text-decoration:none" ' +
                        'href="http://services.google.com/feedback/online_hws_feedback">' +
                        '<div class="ad_header" style="text-align:left">Ads by Google</div></a>' + wideAds;
          }
		  if (wideAdsTop != "")
          {
              wideAdsTop = '<a style="text-decoration:none" ' +
                        'href="http://services.google.com/feedback/online_hws_feedback">' +
                        '<div class="ad_header" style="text-align:left">Ads by Google</div></a>' + wideAdsTop;
          }

          document.getElementById("wide_ad_unit_top").innerHTML = wideAdsTop;
		  document.getElementById("wide_ad_unit").innerHTML = wideAds;
          document.getElementById("narrow_ad_unit").innerHTML = narrowAds;
      }
