

/* This is used to trigger PDF popup window. Here's the HTML syntax for this:
	<a href="url-here.html" onclick="return popupPDFWindow(this.href);">Link text</a>  */

function popupPDFWindow(theURL)
{
	var newWindow = window.open(theURL,'_blank','width=900,height=600,scrollbars=0,resizable=1,status=1');
	if(newWindow)
	{
		newWindow.focus();
		return false; // cancel link
	}
	else
	{
		return true; // follow link as normal
	}
}

/* In XHTML 1.0 Strict, the target attribute of the <a> attribute is no longer valid. While links that
	open in new windows can be irritating and are bad for accessibility, unfortunately for some people
	they are a necessary evil. The workaround below on this page uses the DOM to search through every
	link on a page looking for links with their class attribute set to "externalLink", and dynamically
	changing their target attribute to "_blank". This results in links that validate as XHTML but
	will still open in new windows.
	http://development.incutio.com/simon/targetBlankExperiment.html
*/
function changeAllLinksWithClassToTargetBlanks()
{
	for (i = 0; i < document.links.length; i++)
	{
		if (document.links[i].getAttribute('class') == 'externalLink' || document.links[i].className == 'externalLink')
		{
			document.links[i].setAttribute('target', '_blank');
		}
	}
}
window.onload = changeAllLinksWithClassToTargetBlanks;
