/*

------------ Google Adsense ---------------
-----------------start---------------------

*/


function google_ad_request_done(google_ads) {
	var s = '';
	var i;
	if (google_ads.length == 0) {
		return;
	}
	if (google_ads[0].type == "flash") {
		s += '<a href="' + google_info.feedback_url + '" style="color:000000">Ads by Google</a><br>' +
		'<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>';
	} else if (google_ads[0].type == "image") {
		s += '<a href=\"' + google_info.feedback_url + '\" style="color:000000">Ads by Google</a><br>' +
		'<a href="' + google_ads[0].url +
		'" target="_top" title="go to ' + google_ads[0].visible_url +
		'"><img border="0" src="' + google_ads[0].image_url +
		'"width="' + google_ads[0].image_width +
		'"height="' + google_ads[0].image_height + '"></a>';
	} else {
		if (google_ads.length == 1) {
			
			s += head.replace(/%FEEDBACKURL%/g, google_info.feedback_url);
			
			s += '<div style="font-size: small;">';

			text = template.replace(/%URL%/g, google_ads[0].url);
			text = text.replace(/%VISURL%/g, google_ads[0].visible_url);
			text = text.replace(/%LINE1%/g, google_ads[0].line1);
			text = text.replace(/%LINE2%/g, google_ads[0].line2);
			text = text.replace(/%LINE3%/g, google_ads[0].line3);
			
			s += text;
			
			s += '</div>';
 
			s += foot;
			
		} else if (google_ads.length > 1) {

			s += head.replace(/%FEEDBACKURL%/g, google_info.feedback_url);
			
			for(i = 0; i < google_ads.length; ++i) {	
			
				text = template.replace(/%URL%/g, google_ads[i].url);
				text = text.replace(/%VISURL%/g, google_ads[i].visible_url);
				text = text.replace(/%LINE1%/g, google_ads[i].line1);
				text = text.replace(/%LINE2%/g, google_ads[i].line2);
				text = text.replace(/%LINE3%/g, google_ads[i].line3);
				
				if(typeof switchBGcolor != "undefined"){
					if(switchBGcolor) {
						if(i % 2) {
							color = '#F0F1F3';
						}
						else {
							color = 'white';
						}
						
						text = text.replace(/%COLOR%/g, color);
					}
				}
				
				
				
				
				
				if((i + 1) < google_ads.length) {
					text += divider;
					text = text.replace(/%BORDER%/g, 'border-width: 0px 0px 1px 0px;');
				}
				else {
					text = text.replace(/%BORDER%/g, 'border-width: 0px 0px 0px 0px;');
				}

				if((i + 1) == google_ads.length) {
					text = text.replace(/%GGLAST%/g, ' class="last"');
				}
				else {
					text = text.replace(/%GGLAST%/g, '');
				}

				s+= text;
			} 
			s += foot;
		}
  }
  document.write(s);
  return;
}



function gg_adsense(teaserClass){
teaserClassName = (!teaserClass) ? ('google_teaser_big') : teaserClass;

addHeader = 'Google-Anzeigen';

template = '<li%GGLAST%>' +
				'<div class="text_block">' +
					'<p class="title">' +
						'<a href="%URL%" onmouseout="window.status=\'\';return true;" onmouseover="window.status=\'go to %VISURL%\';return true;" target="_blank">%LINE1%</a>' + 
					'</p>' + 
					'<span class="line2">%LINE2% </span>' + 
					'<span class="line3">%LINE3%</span>' +
					'<p class="linking">' + 
						'<a href="%URL%" onmouseout="window.status=\'\';return true;" onmouseover="window.status=\'go to %VISURL%\';return true;"  target="_blank">%VISURL%</a>' +
					'</p>' +
					'</div>' +
				'</li>';

head = '	<div class="' +teaserClassName+ '"><p class="advertisement"><a target=\"_blank\" style=\"color:#000;\" href=\"http://services.google.com/feedback/online_hws_feedback\">'+addHeader+'</a></p><div class="h1"><div class="h2"><div class="h3"></div></div></div>' +
				'<div class="content">' + 
					'<ul class="dashed">';

foot = '			</ul>' + 
				'</div>' +
				'<div class="b1"><div class="b2"><div class="b3"></div></div></div>' +
			'</div>';

divider = '';
}


function gg_article_bottom() {
	/* BACKUP  */
	gg_adsense();
}
function gg_article_top() {
	/* BACKUP  */
	gg_adsense();
}
function gg_right_column() {
	/* BACKUP  */
	gg_adsense('google_teaser_small');
}
function gg_index_large(){
	/* BACKUP  */
	gg_adsense();
}

/*

------------ Google Adsense ---------------
------------------end----------------------

*/

/*

------------ Google Adsense for Search ---------------
-----------------------start--------------------------

*/

function google_afs_request_done(google_ads) {
	
	if (google_ads.length < 1 ) {
	// Normaler Adsense Block mit circa drei Anzeigen?
              return;
	}
	
	
	if(typeof google_suche_typ != "undefined" && google_suche_typ == "dl") {
		
		google_suche_ergebnis = '<div class="google_afs">' +
								'<div class="content">' +
								'<div><a target=\"_blank\" style=\"color:#000;\" href=\"http://services.google.com/feedback/online_hws_feedback\">Google-Anzeigen</a></div>' +
								'</div>';
		
		kw += " ";
		Ergebnis = kw.match(/([^ ]*) /g);
		for(i = 0; i < anzahl; ++i) {
	//		if (google_ads[i].type == 'text/wide') {
				if (google_ads[i] && google_ads[i].line1 && google_ads[i].line2) {
					line1 = google_ads[i].line1;
					line2 = google_ads[i].line2;
					if (google_ads[i].line3)
						line3 = google_ads[i].line3;
					else
						line3 = '';
					if(i % 2) {
								var color = '#FFF';
							}
							else {
								var color = '#F0F1F3';
					}
					if(typeof google_suche_size != "undefined" && google_suche_size == "hoch") {
						var div_height = '54';
						var div_padding_top = '5';
					} else {
						var div_height = '45';
						var div_padding_top = '1';
					}

					google_suche_ergebnis +=	'<div style=\"width:785px; height:' + div_height + 'px; background-color:' + color + '; border-bottom: 1px solid #D9DDDE;\">' +
												'<div style=\"padding-left: 8px; padding-top: ' + div_padding_top + 'px; line-height:14px;\">' +
												'<a href=\"' + google_ads[i].url + '\" onmouseover=\"window.status=\'gehe zu ' + google_ads[i].visible_url + '\'\" onmouseout=\"window.status=\'\'\" target=\"_blank\" style=\"color:#03649B; font-weight: bold;line-height:14px; font-size: 11px;\">' + line1 + '</a><br />' +
												'<span style=\"font-size: 11px; line-height:14px;\">'+ line2 + '</span> <span style=\" line-height:14px; font-size: 11px\">' + line3 + '</span><br />' +
												'<a style=\"color:#03649B; font-weight:normal; line-height:14px; font-size: 11px\" href=\"' + google_ads[i].url + '\" target=\"_blank\">' + google_ads[i].visible_url + '</a>' +
												'</div></div>';
				}
	//		}
		}

		google_suche_ergebnis += '</div>';
		return;
	} else {
	google_suche_ergebnis = '<div class="google_afs"><p class="advertisement"><a target=\"_blank\" style=\"color:#000;\" href=\"http://services.google.com/feedback/online_hws_feedback\">Google-Anzeigen</a></p><div class="content"><ul class="dashed">';
	kw += " ";
	Ergebnis = kw.match(/([^ ]*) /g);
	for(i = 0; i < anzahl; ++i) {
//		if (google_ads[i].type == 'text/wide') {
			if (google_ads[i] && google_ads[i].line1 && google_ads[i].line2) {
				line1 = google_ads[i].line1;
				line2 = google_ads[i].line2;
				if (google_ads[i].line3)
					line3 = google_ads[i].line3;
				else
					line3 = '';
				if (Ergebnis)
					for (var j = 0; j < Ergebnis.length; ++j) {
						Ergebnis[j] = Ergebnis[j].replace(' ','');
						myregexp = new RegExp(Ergebnis[j],'ig');
						line1 = line1.replace(myregexp,'<b>'+Ergebnis[j]+'</b>');
						myregexp = new RegExp(Ergebnis[j],'ig');
						line2 = line2.replace(myregexp,'<b>'+Ergebnis[j]+'</b>');
						myregexp = new RegExp(Ergebnis[j],'ig');
						line3 = line3.replace(myregexp,'<b>'+Ergebnis[j]+'</b>');
					}
				google_suche_ergebnis += '<li%GGLAST%>' +
					'<p class="title"><a href="' + google_ads[i].url + '" onmouseover="window.status=\'gehe zu ' +
					google_ads[i].visible_url + '\'" onmouseout="window.status=\'\'" target="_blank">'+ line1 + '</a></p>' +
					'<p>'+ line2 + '&nbsp;' + line3 + '</p>' +
					'<p class="linking"><a href="' + google_ads[i].url + '" target="_blank">' + google_ads[i].visible_url + '</a></p>' +
					'</li>';

					if (((i + 1) == google_ads.length) || ((i + 1) == anzahl)) {
						google_suche_ergebnis = google_suche_ergebnis.replace(/%GGLAST%/g, ' class="last"');
					}
					else {
						google_suche_ergebnis = google_suche_ergebnis.replace(/%GGLAST%/g, '');
					}
					
					
			}
//		}
        }
	google_suche_ergebnis += '</ul></div></div>';
	return;
}
}
var google_afs_client = 'pub-4347119884249993';
var google_afs_adsafe = 'medium';
var googleAdNewWindow = 1;
var google_afs_hl = 'de';

/*

------------ Google Adsense for Search ---------------
-----------------------end----------------------------

*/
