/******************************************************************************
*
* NAME:
* dom.js
*
* PURPOSE:
* Encapsulate DOM manipulation functions used throughout application
*
******************************************************************************/

// Create onload event to call necessary functions
if (window.addEventListener)
{
	window.addEventListener("load",addLinkTargets,false);
}
else
{
	window.attachEvent("onload",function(){addLinkTargets();});
}

// Add target attribute to links that need to open in new window
function addLinkTargets()
{
	var article = document.getElementById("article");
	if (article)
	{
		links = article.getElementsByTagName("a");
		for (var i = 0; i < links.length; ++i)
		{
			links[i].setAttribute("target","_blank");
		}
	}
}
