  function google_ad_request_done(google_ads) {
    /*
     * This function is required and is used to display
     * the ads that are returned from the JavaScript
     * request. You should modify the document.write
     * commands so that the HTML they write out fits
     * with your desired ad layout.
     */
    var s = '';
    var adsense_down = '';
    var adsense_right = '';
    
    var header = '<div class="sponsored"><a href="/content/view/adatvedelem">Szponzorált hirdetések</a></div>';
    
    if (google_ads.length > 0) {
        if (google_ads[0].type == "text") {
            for (var i=0; i<google_ads.length; i++) {
                s = '<a href="' + google_ads[i].url + '" ' +
                        'onmouseout="window.status=\'\'" ' +
                        'onmouseover="window.status=\'go to ' +
                        google_ads[i].visible_url + '\';return true;" rel="nofollow" target="_blank"' +
                        'style="text-decoration:none; color: #333333;">' +
                        '<br><span style="text-decoration:none; color: #3d71b8;">' +
                        '<b>' + google_ads[i].line1 + '</b><br></span></a>' + 
                        '<span style="color:#656565">' +
                        google_ads[i].line2 +
                        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;" rel="nofollow" target="_blank"' +
                        'style="text-decoration:none; color: #333333;">' +
                        '<span style="color:#3d71b8">' +
                        google_ads[i].visible_url + '</span></a><br>';
                if (i<5) {
                    adsense_down += s;
                }
                else {
                    s = "<div class='offeredAdverts'><table><tbody> \
    <tr><td class='offeredTitle' colspan='2'> \
        <a rel='nofollow' target='_blank' href='" + google_ads[i].url + "'>" + google_ads[i].line1 + "</a> \
    </td></tr> \
    <tr> \
        <td class='offeredImage'> \
            <div class='thumbnail'> \
                <a href='" + google_ads[i].url + "'><img title='advertisement' alt='advertisement' src='/themes/default/img/advertisement.jpg'> \
            </div> \
        </td> \
        <td class='offeredText'> \
            <div class='offeredDesc'>" + google_ads[i].line2 + google_ads[i].line3 + "</div> \
            <div class='offeredPrice'><a rel='nofollow' style='color:#3d71b8; font-weight: normal' target='_blank' href='" + google_ads[i].url + "'>" + google_ads[i].visible_url + "</a></div> \
        </td> \
    </tr> \
</tbody></table></div>";
                    adsense_right += s;
                }
            }
            if (adsense_down!='') { 
                if ($('.adsensemiddle').length>0) {
                    $(function() { $('.adsensemiddle').append(header + adsense_down); });
                } else {
                    $(function() { $('.adsensedown').append(header + adsense_down); });
                }
            }
            if (adsense_right!='') $(function() { $('.adsenseright').append(adsense_right); });
            $('.adsenseright').parent().find('.advertborder').removeClass('advertborder');
        } 
        else if (google_ads[0].type == "image") {
            for (var i=0; i<google_ads.length; i++) {
                var google_ad = google_ads[i];
                s += '<div class="google_ad google_ad_image">' +
                    '<a href="' + google_ad.url + '" ' +
                    'onmouseout="window.status=\'\'" ' +
                    'onmouseover="window.status=\'go to ' +
                    google_ad.visible_url + '\';return true;" rel="nofollow" target="_blank"' +
                    'style="text-decoration:none; color: #333333;">' +
                    '<img src="' + google_ad.image_url + '" width="' + google_ad.image_width + '" height="' + google_ad.image_height + '" />' +
                    '</a></div>';
            }
            
            document.write(s);
        }
        else if (google_ads[0].type == "flash") {
            for (var i=0; i<google_ads.length; i++) {
                var google_ad = google_ads[i];
                s += '<div class="google_ad google_ad_flash"><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="AllowScriptAccess" VALUE="never">' +
                    '<EMBED 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></div>';
            }
            
            document.write(s);
         }
         
         return;
    }
  }

