addLoadEvent(externalLinks);
	
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++)
	{
		var anchor = anchors[i];
		//look for links where the rel attribute is either "nofollow" or "external" and add target="_blank"
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "nofollow" || anchor.getAttribute("rel") == "external"))
		{
			anchor.target = "_blank";
		}
	}
}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') 
	{
		window.onload = func;
	}
	else
	{
		window.onload = function() 
		{
			oldonload();
			func();
		}
	}
}