function detailPopup(url,heading) {
	heading = heading || "Detailansicht"
	winName = "detail"
	winProps = "scrollbars=no,status=no,toolbar=no,resizable=no,location=no,menubar=no"
	winDocURL = "/waltergasse/javascript/bilddetail.html?bildsrc="+getAbsolueteURL(url)+"&heading="+heading
	window.open(winDocURL, winName, winProps);
}

function getAbsolueteURL(u) {
	if (u.indexOf(":")>=0) { // allready absolute
		return u
	}
	if (u.indexOf("/")==0) { // root notation
		return u
		var Ausdruck = /[^\/](\/[^\/].*)/;
	    Ausdruck.exec(window.location.href);
		var i = window.location.href.indexOf(RegExp.$1)
		return window.location.href.substr(0,i)+u
	}
	else { // relative
		var Ausdruck = /^(.*)\/[^\/]+/;
	    Ausdruck.exec(window.location.href);
		pathWithoutFilename = RegExp.$1
		while(u.indexOf("../")==0) {
			u = u.substr(3,u.length)
			Ausdruck.exec(pathWithoutFilename);
			pathWithoutFilename = RegExp.$1
		}
		return pathWithoutFilename+"/"+u
	}
}
