// This script finds all <a> tags with a rel="external" and sets them to open in a new window.
// <a target="_blank"> is not valid XHTML, therefore JavaScript is the preferred method.
var 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";
}