if (!google_adnum) {
	var google_adnum = 0;
}

function google_ad_request_done(google_ads) {
	return true;
}

function displayGoogleBlock(start, end, google_anzeigen, google_style, google_tracking, lp_channel) {

    if (typeof lp_channel == 'undefined' || lp_channel == null) {
		lp_channel = '';
    }

	var i = 0;
	var gClass = '';
	var cycleClass = ' fstRow';
    var block = '<div class="gAds floatfix ' + google_style + '">' + google_anzeigen;

    if (google_ads.length == 0) {
		block = '';
		return;
	}
	start = 0;
	end = end - start;
    if (google_ads[0].type == "image") {
        block += '<a href="' + google_ads[0].url + '" target="_blank" title="' + google_ads[0].visible_url + '">' + '<img border="0" src="' + google_ads[0].image_url + '" alt="' + google_ads[0].visible_url + '" width="' + google_ads[0].image_width + '" height="' + google_ads[0].image_height + '">' + '<' + '/a><' + '/div>';
    } else {
		if (google_ads.length == 1) {
            block += '<a href="' + google_ads[0].url + '" class="fst end" target="_blank" ' + 'onmouseover="self.status=\'gehe zu ' + google_ads[0].visible_url + '\'; return true;" ' + 'onmousedown="logThisClick(\'' + google_tracking + '\',\'' + lp_channel + '); return true;" ' + 'onmouseout="self.status=\'\'; return true;">' + '<span class="ghead">' + google_ads[0].line1 + '<' + '/span>' + '<span class="gtext">' + google_ads[0].line2 + ' ' + google_ads[0].line3 + '<' + '/span>' + '<span class="gurl">' + google_ads[0].visible_url + '<' + '/span>' + '<' + '/a>' + '<' + '/div>';
        } else if (google_ads.length > 1) {
            for (i = start;
            (i <= end && i < google_ads.length); ++i) {
                if (google_style == 'gAdsOnSky') {
					var bwsr = navigator.userAgent.toLowerCase();
                    var separator = ((bwsr.indexOf("msie") > -1)) ? '-' : ' ';
					var txt = google_ads[i].visible_url;
                    if (txt.length > 22) {
                        google_ads[i].visible_url = google_ads[i].visible_url.substr(0, 21) + separator + google_ads[i].visible_url.substr(21);
				}
                }
                if (i == start) {
                    gClass = 'fst';
                }
                else if (i == end || i == google_ads.length - 1) {
                    gClass = 'end';
                }
                else {
                    gClass = '';
                }
                if (i % 2) {
					cycleClass = ' scdRow';
                } else {
					cycleClass = ' fstRow';
				}
                block += '<a href="' + google_ads[i].url + '" class="floatfix ' + gClass + cycleClass + '" target="_blank" ' + 'rel="nofollow"' + 'onmouseover="self.status=\'gehe zu ' + google_ads[i].visible_url + '\'; return true;" ' + 'onmousedown="logThisClick(\'' + google_tracking + '\',\'' + lp_channel + '\'); return true;" ' + 'onmouseout="self.status=\'\'; return true;">' + '<span class="ghead">' + google_ads[i].line1 + '<' + '/span>' + '<span class="gtext">' + google_ads[i].line2 + ' ' + google_ads[i].line3 + '</span>' + '<span class="gurl">' + google_ads[i].visible_url + '<' + '/span>' + '</a>';
			}
			if (google_ads[0].bidtype == "CPC") {
				google_adnum = google_adnum + google_ads.length;
		}
            block += '<' + '/div>';
	}
    }
	document.write(block);
	return;
}
