/* Function to load links in new window, while remaining standards-compliant */
/* Source: http://www.sitepoint.com/article/standards-compliant-world */
/* Slightly modified by ChEeTaH, The Spore Zone */

function externalLinks()
	{
	/* Note: 'target' attribute doesn't exist for anchors in XHTML Strict, but still does in the DOM specs */
	if (!document.getElementsByTagName)
		return;

	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";
		}
	}

window.onload = externalLinks;