var splitter = [".","/","-","_",":"];
var maxchars = 26;

function showURL(url) {
	var chunks = [];
	if (url.length < maxchars + 1)
		return url;
	else {
		while (url.length > maxchars) {
			OUTER:
			for (var i = maxchars; i > 0; i--) {
				INNER:
				for (var j = 0; j < splitter.length; j++) {
					if (url.charAt(i) == splitter[j]) {
						chunks[chunks.length] = url.substring(0,i);
						url = url.substring(i);
						break OUTER;
					} else if (i == 1 && j == splitter.length-1) {
						chunks[chunks.length] = url.substring(0,maxchars);
						url = url.substring(maxchars);
						break OUTER;
					}
				}
			}
		}
		chunks[chunks.length] = url;
		var txt = "";
		for (var i = 0; i < chunks.length; i++) {
			txt += chunks[i] + "<br>";
		}
		return txt;
	}
}

function google_ad_request_done(google_ads) {
	if (google_ads.length) {
		//document.write("<div style=\"background-color:#EEEFEF; width:185px; height:26px; border-bottom:1px solid #B6B6AC; border-right:1px solid #B6B6AC; color:#00006F; font-weight:bold;\"> <div style=\"padding:6px;\">  ",(google_info.feedback_url?"<a style=\"color:#787979\" href=\"" + google_info.feedback_url + "\" target=\"newwin\">Ads by Google</a>":"Ads by Google")," </div> </div>");
		//document.write("<div style=\"background-color:#EEEFEF; width:185px; height:26px; border-bottom:1px solid #B6B6AC; border-right:1px solid #B6B6AC; color:#00006F; font-weight:bold; clear:both;\">  ",(google_info.feedback_url?"<a style=\"color:#787979\" href=\"" + google_info.feedback_url + "\" target=\"newwin\">Ads by Google</a>":"Ads by Google")," </div>");
		document.write("<div style=\"margin-top:3px; border-top:4px solid #EEEFEF; background-color:#EEEFEF; font-weight:bold; clear:both; color:#00006F;\">&nbsp;&nbsp;Ads by Google</div>");
		document.write("<div style=\"background-color:#EEEFEF; width:185px; overflow:hidden\"><div style=\"padding:6px\">");
		for (var i = 0; i < google_ads.length; i++) {
			document.write("<div class=\"gap9\"><a onmouseover=\"window.status='" + google_ads[i].visible_url + "'; return true;\" onmouseout=\"window.status='';return true;\" href=\"" + google_ads[i].url + "\" target=\"newwin\"><span class=\"bold\">" + google_ads[i].line1 + "</span><br><span class=\"black\" style=\"font-weight:normal; font-size:11px;\" >" + google_ads[i].line2 + " " + google_ads[i].line3 + "</span><br><span style=\"color:#FF0000; font-weight:normal; font-size:11px;\" href=\"" + google_ads[i].url + "\" target=\"newwin\">" + showURL(google_ads[i].visible_url) + "</span></a></div>");
		}
		document.write("</div></div>");
	}
}

	google_ad_client = 'pub-8167943371744716';
//	google_ad_channel = 'www.vnunet.com';
	google_ad_output = 'js';
	google_encoding  = 'utf8';
	google_max_num_ads = 5;
	google_safe      = 'medium';
	google_adtest    = 'off';
