var do_status_bar_url = false;

function google_afs_request_done(google_ads)
{
	var google_num_ads = google_ads.length;
	
	if (google_num_ads <= 0)
	{
		return;
	}

	// check if we can change the statusbar
	var old_wnd_status = window.status;
	window.status = '$$$AFS_STATUSBAR_TEST$$$';
	if (window.status == '$$$AFS_STATUSBAR_TEST$$$')
	{
		window.status = old_wnd_status;
		do_status_bar_url = true;
	}

	ads_top = ads_bottom = '';

	for (i = 0; i < google_num_ads; i++)
	{
		if (i < 5)
		{
			ads_top += '<div class="alt1" style="padding: 4px" onmouseover="this.className=\'alt2\'; if (do_status_bar_url) { window.status=\'' + google_ads[i].visible_url + '\'; return true; } else { return false; }" onmouseout="this.className=\'alt1\'; if (do_status_bar_url) { window.status=\'\'; } return true;"><a style="font-weight: bold" href="' + google_ads[i].url + '">' +
				google_ads[i].line1 + '</a>&nbsp;&nbsp;' +
				google_ads[i].line2 + '&nbsp;&nbsp;' + 
				'<a style="text-decoration:none" href="' + google_ads[i].url + '">' + google_ads[i].visible_url + '</a></div>';
		}
		else
		{
			ads_bottom += '<div class="alt1" style="padding: 4px" onmouseover="this.className=\'alt2\'; if (do_status_bar_url) { window.status=\'' + google_ads[i].visible_url + '\'; return true; } else { return false; }" onmouseout="this.className=\'alt1\'; if (do_status_bar_url) { window.status=\'\'; } return true;"><a style="font-weight: bold" href="' + google_ads[i].url + '">' +
				google_ads[i].line1 + '</a>&nbsp;&nbsp;' +
				google_ads[i].line2 + '&nbsp;&nbsp;' + 
				'<a style="text-decoration:none" href="' + google_ads[i].url + '">' + google_ads[i].visible_url + '</a></div>';
		}
	}

	if (ads_top != '')
	{
		document.getElementById('afs_ads_top_content').innerHTML = ads_top;
		document.getElementById('afs_ads_top').style.display = 'block';
	}

	if (ads_bottom != '')
	{
		document.getElementById('afs_ads_bottom_content').innerHTML = ads_bottom;
		document.getElementById('afs_ads_bottom').style.display = 'block';
	}
}

google_afs_adsafe = 'high';
google_afs_hl = 'de';
google_afs_ie = 'utf-8';
google_afs_oe = 'iso-8859-1';

