var google_adnum = 0;
var adcountindex = 0;

function google_ad_request_done(google_ads) {  
	var ad_unit = '';

	if (google_ads.length == 0) {
		return;
	}

	if (google_ads[0].type == "flash") {
		ad_unit += '<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") {
		ad_unit += '<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 + '" 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>';
	} else if (google_ads[0].type == "html") {
		ad_unit += google_ads[0].snippet;
	} else {
		if (google_ads.length == 1)	{
			ad_unit += '<table class="ad1"><tr height=5%><td><a class="abg" href=\"' + 
			google_info.feedback_url + '\">Ads by Google</a></td></tr><tr><td><div class = "single_center"><a class = "adTitle1_a" href="' +
			google_ads[0].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
			google_ads[0].visible_url + '\';return true"><span class="adTitle1">' +
			google_ads[0].line1 + '</span></a></div><br><br><div class="adText1">' +
			google_ads[0].line2 + '<br>' +
			google_ads[0].line3 + '</div> <br><br><div class = "single_center"><a class = "adLink1_a" href="' +
			google_ads[0].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
			google_ads[0].visible_url + '\';return true"><span class="adLink1">' +
			google_ads[0].visible_url + '</span></a></div></td></tr></table>';
		} else if (google_ads.length > 1) {
			ad_unit += '<table class="ad"><tr height=5%><td ><a class="abg" href=\"' + 
			google_info.feedback_url + '\">Ads by Google</a></td></tr>';
			for(i = 0; i < google_ads.length; ++i) {
				ad_unit += '<tr><td><a class = "adTitle_a" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
				google_ads[i].visible_url + '\';return true"><span class="adTitle">' + 
				google_ads[i].line1 + '</span></a><div class="adText">' + 
				google_ads[i].line2 + '&nbsp;' + 
				google_ads[i].line3 + '</div><div><a class = "adLink_a" href="' +
				google_ads[i].url + '" onmouseout="window.status=\'\'" onmouseover="window.status=\'go to ' +
				google_ads[i].visible_url + '\';return true"><span class="adLink">' + 
				google_ads[i].visible_url + '</span></a></div></td></tr>';	
			}
			ad_unit += '</table>';
		}
	}

//body:not(:has('+thisunit+'))
	var thisunit = '#ad_unit' + adcountindex;
	if( jQuery( thisunit ).length == 0 ) {
		thisunit = '#ad_unit';	
	}
	jQuery( thisunit ).append( ad_unit );

//	var google_adunit_div = document.getElementById("ad_unit");
//	if( google_adunit_div ) {
//		google_adunit_div.innerHTML += ad_unit;
//	}
	google_adnum += google_ads.length;
	adcountindex++;
	return;
}

google_ad_client = "ca-pub-5179104793419554";
google_ad_output = 'js';
google_max_num_ads = '4';
google_feedback = "on";
//google_ad_type  = "text_html";
google_ad_type  = "text";
google_adtest = "off";
google_image_size = '300x250';
//google_skip = '4';

