

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 i = 0;
	var current_ad = 0;

	/*
	* Verify that there are actually ads to display.
	*/
	if (google_ads.length == 0) {
	return;
	}

	/*
	* If an image or flash ad is returned, display that ad.
	* Otherwise, build a string containing all of the ads and
	* then use a document.write() command to print that string.
	*/

	if (google_ads[0].type == "flash") {

	   s += '<a href=\"' +
	google_info.feedback_url + '\" id="google_head">'+ google_adtext +'</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 += '<table cellpadding="0" cellspacing="0">'
		s += '<td height="20" colspan="0" bgcolor="#272727" style="vertical-align:middle; padding:4px; -moz-border-radius: 4px; -moz-border-radius-bottomright: 0px; -moz-border-radius-bottomleft: 0px;"><span class="news_head">'

	   s += '<a href="' + google_info.feedback_url + '" id="google_head">'+ google_adtext +'</a></span></td></tr><tr> <td height="39" colspan="2" bgcolor="#303030" style="padding:5px; padding-top:1px; border: 1px solid #272727;"><a href="' + 
	google_ads[0].url + '" target="_top" title="go to ' + 
	google_ads[0].visible_url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
	google_ads[0].visible_url + '\';return true"><img border="0" src="' + 
	google_ads[0].image_url + '"width="' + 
	google_ads[0].image_width + '"height="' + 
	google_ads[0].image_height + '"></a></span></a><br></td></tr></table>';

	} else if (google_ads[0].type == "html") {

	s += google_ads[0].snippet;

	} else {

	if (google_ads.length == 1) {

	
	/*
s += '<a href=\"' + google_info.feedback_url + '\" id="google_head">'+ google_adtext +'</a>';
	s += '<table class="tieritemA" style="width:'+google_custom_width+'px;background-color:#'+google_custom_color+'">';
	s += '<tr align="left" valign="top">'; 
	s += '<td  width="'+google_custom_width+'"><a style="text-decoration:none" href="' + 
	
	google_ads[0].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
	google_ads[0].visible_url + '\';return true"> <span style="text-decoration:underline"> <b>' + 
	google_ads[0].line1 + '</b><br></span></a> <span style="color:#FFFFFF">' +
	google_ads[0].line2 + ' ' +
	google_ads[0].line3 + '<br></span> <span><a style="color:#b4441c;text-decoration:none" href="' + 
	google_ads[0].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
	google_ads[0].visible_url + '\';return true">' + 
	google_ads[0].visible_url + '</span></a></td>';
	s += '</tr><tr><td height="15" align="left" valign="top"><hr size="1"></td></tr></table><br />'
*/

	} else if (google_ads.length > 1) {
	
		
		var ad_blocks = Math.ceil((google_ads.length/3));
		if(ad_blocks>google_max_adblocks){
			ad_blocks = google_max_adblocks;
		}
		
		//console.log('Fetched Ads: '+google_ads.length);
		//console.log('Adblocks: '+ad_blocks);
		
		for(i = 1; i <= ad_blocks; ++i) {
			//console.log('Using JS Slot: '+'google_js_'+i);
			
			var display = document.getElementById('google_js_'+i);
			var ads_in_block = 0;
			
			s += '<div style="margin-left: 0; margin-bottom: 10px; margin-right: 0; width:'+google_custom_width+';clear:both;padding:5px;padding-top:10px;">';
			s += '<a  href=\"' + google_info.feedback_url + '\" id="google_head" target="_blank">'+ google_adtext +'</a><br />';


			while(current_ad < google_ads.length) {
			
	
				s += '<table class="tieritemA" style="width:'+google_custom_width+'px;background-color:#'+google_custom_color+'" onmouseover="style.backgroundColor=\'#4C4C4C\'" onmouseout="style.backgroundColor=\'#'+google_custom_color+'\'">';
				s += '<tr align="left" valign="top">';
				s += '<td  width="'+google_custom_width+'"><a style="text-decoration:none" href="' + 
				google_ads[current_ad].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
				google_ads[current_ad].visible_url + '\';return true" target="_blank"> <span style="text-decoration:underline;font-size: 13px;"> <b>' + 
				google_ads[current_ad].line1 + '</b><br></span></a> <span><a target="_blank" style="color:#E5E5E5;text-decoration:none" href="' + 
				google_ads[current_ad].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
				google_ads[current_ad].visible_url + '\';return true">' + 
				google_ads[current_ad].visible_url + '</span></a> <span style="color:#FFFFFF">' +
				google_ads[current_ad].line2 + '  ' +
				google_ads[current_ad].line3 + '<br></span></td>';
				s += '</tr></table>';
				
				ads_in_block++;
				current_ad++;
				
				if(ads_in_block>=3){
					break;
				}

			}
	
			s += '</div><br />'
			display.innerHTML = s;
			s = '';
		}
		
	
	}
	    }
	
	

	    document.write(s);
	    return;
	  }