function google_afs_request_done(adlist) {
  var adlength = adlist.length;
  var adSenseDivName; 
  if (document.getElementById('GoogleAdSenseSlim')) {
    adSenseDivName='GoogleAdSenseSlim';
  } else if (document.getElementById('GoogleAdSenseWide')) {
    adSenseDivName='GoogleAdSenseWide';
  } else {
    // if we don't have these div's, were done
    return;
  }
    
  // if we don't hav any adds, lets not do anything 
  if (adlength <= 0) {
    document.getElementById(adSenseDivName).style.value = 'display:none';
    document.getElementById(adSenseDivName).style.visibility = 'hidden';
    return;
  }

  // ok, now lets populate the box
  var googleBigBox = "";
  var googleAdBox = "";
  var googleAd = "" ;
  var googleText = "";
  var googleUrl = "" ;
  for (i = 0; i < adlength; i++) {
    googleAd = '<div class="GoogleAd"> <a href="' + adlist[i].url + '" target="_blank" > ' + adlist[i].line1 + '</a></div>';
    googleText = '<div class="GoogleText"> <a href="' + adlist[i].url + '" target="_blank" > ' + adlist[i].line2 + '</a></div>';
    googleUrl = '<div class="GoogleURL"> <a href="' + adlist[i].url + '" target="_blank" > ' + adlist[i].visible_url + '</a></div>';
    googleAdBox = '<div class="GoogleAdBox">' + googleAd + googleText + googleUrl + '</div>';
    googleBigBox = googleBigBox + googleAdBox;
    googleAd = '';
    googleText = '';
    googleUrl = '';
    googleAdBox = '';
  }
  if (googleBigBox != "") {
    document.getElementById(adSenseDivName).innerHTML = googleBigBox;
  }
}
