// JavaScript Document


function winstat(w) {window.status = 'go to' + w; return true;}

function clearstat(){window.status='';}
var tr_part = "";
function google_afs_request_done(google_ads) {  
	// Number companies was set in calling script !!!!!!!!!!!!! as max
	// google_info.feedback_url                    - google URL
	// google_ads[i].line1                         - company name
	// google_ads[i].line2 and google_ads[i].line3 - company description
	// google_ads[i].visible_url                   - company URL
	var first_ad_unit = '', second_ad_unit='', third_ad_unit='', goog_ad='', goog_url='', ad_order='';
	var third_ad_unit = '<a class="google_title" href=\"http://services.google.com/feedback/online_hws_feedback\">Ads by Google</a><br>';
	if (google_ads.length > 0) {
		for(var i = 0; i < google_ads.length; ++i) {
			if (google_ads[i].type == "text/wide") {
				ad_order = '<div class="div_google_part">';	
				if (i == 0 )
					goog_url = '<a class="google_title" href=\"http://services.google.com/feedback/online_hws_feedback\">Ads by Google</a><br><br>';
				else
					goog_url = '';
					
				goog_ad = ad_order + goog_url +
				'<a class=a1l href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;">' +
				google_ads[i].line1 + '</a><br>'+
				'<div class="google_info_link">' +
				google_ads[i].line2 + 
				google_ads[i].line3 + 
				'</div>'+
				'<a href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;" class=a1l>' +				
				 google_ads[i].visible_url + '</a>'+
				'</div>';
				
				if(i < 3)
					first_ad_unit +=  goog_ad;
				else	
					second_ad_unit +=  goog_ad;
			} else {
				//Left side ads
				var vis_url = (google_ads[i].visible_url.length > 20)?google_ads[i].visible_url.substr(0,20)+"...":google_ads[i].visible_url;
				third_ad_unit = third_ad_unit +
				'<a href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;" class=a1l>' +
				google_ads[i].line1 + '</a><br>'+
				'<div class="google_info_link" >' +
				google_ads[i].line2 + 
				google_ads[i].line3 + 
				'</div>'+
				'<a  href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;">' +				
				 vis_url + '</a>'				
				 if(i < google_ads.length-1)
				 	third_ad_unit = third_ad_unit + "<hr>"			
			} // end if text 

		}     // end for

	}

	if (document.getElementById('ads_unit_mid')){
		document.getElementById('ads_unit_mid').innerHTML += first_ad_unit;
	}
	document.getElementById('ads_unit_bottom').innerHTML += second_ad_unit;
	document.getElementById('ads_unit_side').innerHTML += third_ad_unit;
}

/*
function google_ad_request_done(google_ads) {  
	// Number companies was set in calling script !!!!!!!!!!!!! as max
	// google_info.feedback_url                    - google URL
	// google_ads[i].line1                         - company name
	// google_ads[i].line2 and google_ads[i].line3 - company description
	// google_ads[i].visible_url                   - company URL
	var first_ad_unit = '', second_ad_unit='', third_ad_unit='', goog_ad='', goog_url='', ad_order='';
	if (google_ads.length > 0) {
		for(var i = 0; i < 6; ++i) {
			if (google_ads[i].type == 'text') {
				ad_order = '<div class="div_google_part">';	
				if (i == 0 || i == 3)
					goog_url = '<a class="google_title" href=\"' + google_info.feedback_url + '\">Ads by Google</a><br><br>';
				else
					goog_url = '';
					
				goog_ad = ad_order + goog_url +
				'<a class=a1l href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;">' +
				google_ads[i].line1 + '</a><br>'+
				'<a class="google_info_link" href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;">' +
				google_ads[i].line2 + 
				google_ads[i].line3 + 
				'</a><br>'+
				'<a href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;" class=a1l>' +				
				 google_ads[i].visible_url + '</a>'+
				'</div>';
			} // end if text 
			if (i<3) { first_ad_unit +=  goog_ad;}
			else {second_ad_unit += goog_ad; }
		}     // end for
		
		var third_ad_unit = '<a class=\"google_title_abs\" href=\"' + google_info.feedback_url + '\">Ads by Google</a><br>';
		var startPos = google_ads.length - 4;
		for(var i = startPos; i < google_ads.length; ++i) {
			if (google_ads[i].type == 'text') {
				var vis_url = (google_ads[i].visible_url.length > 20)? google_ads[i].visible_url.substr(0,20)+"...":google_ads[i].visible_url;
				third_ad_unit = third_ad_unit +
				'<a href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;" class=a1l>' +
				google_ads[i].line1 + '</a><br>'+
				'<a class="google_info_link" href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;">' +
				google_ads[i].line2 + 
				google_ads[i].line3 + 
				'</a><br>'+
				'<a class=\"google_link_smoll\" href="' + google_ads[i].url + '" onMouseOver="javascript:window.status=\'go to ' + google_ads[i].visible_url +'\';return true;" onMouseOut="window.status=\'\';return true;">' +				
				 vis_url + '</a>'				
				 if(i < google_ads.length-1)
				 	third_ad_unit = third_ad_unit + "<hr>"
			}
		}
	}

//	if (document.getElementById('ads_unit_mid')){
//		document.getElementById('ads_unit_mid').innerHTML += first_ad_unit;
//	}
	document.getElementById('ads_unit_bottom').innerHTML += first_ad_unit;//second_ad_unit;
	document.getElementById('ads_unit_side').innerHTML += second_ad_unit;//third_ad_unit;
}
*/