function google_ad_request_done(google_ads) {
  var s = '';
  var i;
  
  if (google_ads.length == 0) {
    return;
  }
  
  s = showAd();
  document.getElementById(cur_google_id).innerHTML = s;
  return;
}

function showAd() {
  var s = '';
  if(google_ads[0].type!="html") {
    if(cur_google_direction=="vertical") s += '<h2 class="boxheading" style="border-top:solid 10px #fff"><a href="' + google_info.feedback_url + '" style="border-bottom:none">Google-Anzeigen</a></h2>';
    else {
      s += '<h3 class="boxheading" style="height:28px;padding:0 0 0 15px"><a href="' + google_info.feedback_url + '" style="font-size:14px">Google-Anzeigen</a></h3>';
      if(google_ads[0].type=="text") s += '<div class="beitragsbox" style="border-top:none">';
    }
  }
  
  if (google_ads[0].type == "flash") {
    s += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' +
          ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + 
          google_ad.image_width + '" HEIGHT="' + 
          google_ad.image_height + '"> <PARAM NAME="movie" VALUE="' + 
          google_ad.image_url + '">' + 
          '<PARAM NAME="quality" VALUE="high" /><param name="wmode" value="opaque" />' + 
          '<PARAM NAME="AllowScriptAccess" VALUE="never" />' + 
          '<EMBED wmode="opaque" src="' + 
          google_ad.image_url + '" WIDTH="' + 
          google_ad.image_width + '" HEIGHT="' + 
          google_ad.image_height + 
          '" TYPE="application/x-shockwave-flash"' + 
          ' AllowScriptAccess="never" ' + 
          ' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';
    
  } else if (google_ads[0].type == "image") {
     s += '<a href="' + 
          google_ads[0].url + '" target="_top" title="' + 
          google_ads[0].visible_url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'' +
          google_ads[0].visible_url + '\';return true"><img border="0" src="' + 
          google_ads[0].image_url + '"width="' + 
          google_ads[0].image_width + '"height="' + 
          google_ads[0].image_height + '" style="display:block"></a>';
  } else if (google_ads[0].type == "html") {
    s += google_ads[0].snippet;
  } else {
    if (google_ads[0].bidtype == "CPC") {
      google_num += google_ads.length;
    }
    
    if(cur_google_direction=="horizontal") {
      for(var i = 0; i < google_ads.length; ++i) {
        if(i>=google_ads.length) break;
        s += '<div';
        //s += ' onmouseover="this.style.background=\'#fff\';this.style.border=\'inset 1px #555\'" onmouseout="this.style.background=\'transparent\';this.style.border=\'none\'"';
        s += ' style="';
        
        if(google_ads.length==1) s += 'font-size:16px;';
  
        s += 'padding:4px 6px"><a href="' + 
            google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'' +
            google_ads[i].visible_url + '\';return true" style="font-family:\'Century Gothic\',Arial,sans-serif;font-size:18px">' + 
            google_ads[i].line1 + '</a><br>' +
            google_ads[i].line2 + ' ' +
            google_ads[i].line3 + ' <a style="text-decoration:none;color:#333" href="' + 
            google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'' +
            google_ads[i].visible_url + '\';return true">' + 
            google_ads[i].visible_url + '</a></div>';
      }
      s += '</div>';
    } else if(cur_google_direction=="vertical") {
      s += '<ul class="boxcontent">';
      for(i = 0; i < google_ads.length; ++i) {
        s += '<li><div class="featured_desc_content" style="height:auto"><h3 style="line-height:1.8;height:auto"><a href="' + 
              google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'' +
              google_ads[i].visible_url + '\';return true">' + 
              google_ads[i].line1 + '</a></h3>' +
              google_ads[i].line2 + ' ' +
              google_ads[i].line3 + ' <a href="' + 
              google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'' +
              google_ads[i].visible_url + '\';return true">' + 
              google_ads[i].visible_url + '</a></div></li>';
      }
      s += '</ul>';
    }
  }
  return s;
}

var google_num = 0;
