google_ad_client="pub-4260727147522571";
google_ad_output="js";
google_feedback="on";
if(typeof(google_adnum)=="undefined") google_adnum=0;

function google_ad_request_done(google_ads) {
	var s='';
	var i;
	if (google_ads.length==0) {
		return;
	}

	switch (afc_slot){
		case "content_guest":

	if(document.getElementById('toc')&&!document.getElementById('afc_content_guest')) {
		var guestElement = document.createElement('div');
		guestElement.id = 'afc_content_guest';
		guestElement.innerHTML = '!';
   	document.getElementById('toc').parentNode.insertBefore(guestElement,document.getElementById('toc').nextSibling); 	
   	s+='<h2><span class="mw-headline"><a href="'+google_info.feedback_url +'" style="color:black;">Ads by Google</a></span></h2>';
	}
	
		case "content":
		
	//s+='<div style="float:right"><a href="'+google_info.feedback_url +'" style="font-size:10px;color:gray;">Ads by Google</a></div>';
	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="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><br/>';
	} else if (google_ads[0].type=="image") {
		s+='<a href="'+
		google_ads[0].url+'" target="_ads"><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[0].type=="html") {
		s+=google_ads[0].snippet;
	} else {
		if (google_ads.length==1) {
			s+='<div style="line-height:1.5;"><a class="external" style="font-size:24px;" href="'  +
			google_ads[0].url+'" target="_ads">'+
			google_ads[0].line1+'</a><br/> <span style="font-size:18px;">'  +
			google_ads[0].line2+'<br/>'+
			google_ads[0].line3+'</span><br/><a class="external" style="" href="'+
			google_ads[0].url+'" target="_ads">'+
			google_ads[0].visible_url+'</a></div><br/>';
		} else if (google_ads.length>1) {
			s+='<ul>';
			for(i = 0; i < google_ads.length; ++i) {
				s+='<li><a class="external" href="'  +
				google_ads[i].url+'" target="_ads">'+
				google_ads[i].line1+'</a> '+
				google_ads[i].line2+' '+
				google_ads[i].line3+' <a style="color:gray;" class="external" href="'+
				google_ads[i].url+'" target="_ads">'+
				google_ads[i].visible_url+'</a></li>';
			}
			s+='</ul>';
		}
	}

		break;
		case "side":
	if (google_ads[0].type=="flash") {
		s+='<div style="overflow:hidden;padding:0px;width:160px;">';
		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="AllowScriptAccess" VALUE="never">'+
		'<PARAM NAME="wmode" VALUE="transparent">'+
		'<EMBED src="'+
		google_ad.image_url+'" WIDTH="'+
		google_ad.image_width+'" HEIGHT="'+
		google_ad.image_height +
		'" TYPE="application/x-shockwave-flash"'+
		' AllowScriptAccess="never" wmode="transparent"'+
		' PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';
		s+='</div>';
	} else if (google_ads[0].type=="image") {
		s+='<div style="overflow:hidden;padding:0px;width:160px;">';
		s+='<a href="'+
		google_ads[0].url+'" target="_ads"><img border="0" src="'+
		google_ads[0].image_url+'" width="'+
		google_ads[0].image_width+'" height="'+
		google_ads[0].image_height+'"></a>';
		s+='</div>';
	} else if (google_ads[0].type=="html") {
		s+='<div style="overflow:hidden;padding:0px;width:160px;">';
		s+=google_ads[0].snippet;
		s+='</div>';
	} else {
		if (google_ads.length==1) {
			s+='<div style="line-height:1.5;width:160px;word-wrap:break-word;overflow:hidden;"><a style="font-size:20px;color: #36b;" href="'  +
			google_ads[0].url+'" target="_ads">'+
			google_ads[0].line1+'</a><br/> <span style="">'  +
			google_ads[0].line2+' '+
			google_ads[0].line3+'</span><br/><a style="color:#008000;" href="'+
			google_ads[0].url+'" target="_ads">'+
			google_ads[0].visible_url+'</a></div><br/>';
		} else if (google_ads.length>1) {
			s+='<div style="overflow:hidden;">';
			for(i = 0; i < google_ads.length; ++i) {
				s+='<div style="margin-bottom:10px;width:160px;word-wrap:break-word;overflow:hidden;"><a style="color: #36b;" href="'  +
				google_ads[i].url+'" target="_ads">'+
				google_ads[i].line1+'</a><br/>'+
				google_ads[i].line2+' '+
				google_ads[i].line3+'<br/><a style="color:gray;" href="'+
				google_ads[i].url+'" target="_ads">'+
				google_ads[i].visible_url+'</a></div>';
			}
			s+='</div>';
		}
	}

		break;
		default:
		break;
	}
	
	if(document.getElementById('afc_'+afc_slot)) {
		document.getElementById('afc_'+afc_slot).innerHTML=s;
	}
	
	if(document.getElementById('afc_'+afc_slot+'_feedback')) {
		document.getElementById('afc_'+afc_slot+'_feedback').innerHTML='Ads by Google';
		document.getElementById('afc_'+afc_slot+'_feedback').href=google_info.feedback_url;
	}

	if(google_ads[0].bidtype=="CPC") {
		google_adnum=google_adnum+google_ads.length;
	}
}