function a_newwin(domain) { 
	//quick hack to expand div if there's a hashtag
	if (location.hash) expandDiv(location.hash.substr(1));

	var anchors = document.getElementsByTagName("a");
	for (var i = 0; i < anchors.length; i++) {
		if (anchors[i].href) {
			var href = anchors[i].href.toLowerCase().replace("www.", "");
			domain = domain.toLowerCase().replace("www.", "");
			if ((href.indexOf('http://') != -1) && (href.indexOf(domain) == -1) && (href.indexOf('backend.livingcities') == -1)) {
				//we are dealing with an absolute url to an external site
				anchors[i].target = "_blank";
			}
		} 
	}
}