<!--
	/*
	* This function is required. It processes the google_ads JavaScript object,
	* which contains AFS ads relevant to the user's search query. The name of
	* this function <i>must</i> be <b>google_afs_request_done</b>. If this
	* function is not named correctly, your page will not display AFS ads.
	* AG heavily modified this to split the google ads that come back into sections
	* so we can have multiple display divs for google ads 17/11/2008 10:07 also made all links
	* target a new window.
	*/

	/*
	* This function retrieves the search query from the URL.
	*/

	function google_afs_request_done(google_ads) {
		/*
		* Verify that there are actually ads to display.
		*/
		var s = '';
		var i = 0;
		var google_num_ads = google_ads.length;
		if(google_num_ads == 0) {
			return;
		}
		s += '<a target="_new" style="text-decoration:none" href="http://services.google.com/feedback/online_hws_feedback"><span class="ad_header" style="text-align:left;">Ads by Google</span></a>';
		for(i = 0; i < google_num_ads; i++) {
			if(google_ads[i].type=="text/wide") {
				// render a wide ad
				s +='<div><a target="_blank" style="text-decoration:none" onmouseover="javascript:window.status=\'' +
				google_ads[i].url + '\';return true;" ' +
									'onmouseout="javascript:window.status=\'\';return true;" ' +
									'href="' + google_ads[i].url + '">' +
									'<span class="ad_line1">' + google_ads[i].line1 + '</span></a><br />' +
									'<span class="ad_text">' + google_ads[i].line2 + '</span><br>' +
									'<a target="_blank" style="text-decoration:none" onmouseover="javascript:window.status=\'' +
									google_ads[i].url + '\';return true;" ' +
									'onmouseout="javascript:window.status=\'\';return true;" ' +
									'href="' + google_ads[i].url + '">' +
									'<span class="ad_url">' + google_ads[i].visible_url + '</span></a></div>';
			}
		}
		
		var adDiv = document.getElementById('gglSense_ads');
		if(adDiv != null){
			adDiv.innerHTML = s;
		}
		return;
	}
-->
