function actconf(href, text) {
	if (confirm("Wirklich " + text + "?")) {
		this.location.href = href;
	}
}

anchors = document.getElementsByTagName("a");
for (var i=0; i<anchors.length; i++) {
	var anchor = anchors[i];
	if (
		anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external"
	)
		anchor.target = "_blank";

	if (anchor.getAttribute("class") == "confirm") {
		href = anchor.getAttribute("href");
		imgs = anchor.getElementsByTagName("img");
		if (imgs.length > 0)
			text = imgs[0].getAttribute("title");
		else
			text = anchor.textContent;
		anchor.setAttribute("href", "javascript:actconf('" + href + "','" + text + "')");
	}
}

