window.onload = function() {
	// modified from this example:
	// http://www.openhosting.co.uk/articles/webdev/5918/

	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop
 	if (!document.getElementsByTagName) {
		return false;
	} 
	
	// create an array of objects of each link in the document
	var popuplinks = document.getElementsByTagName("a");
	
	// loop through each of these links (anchor tags)
	for (var i=0; i < popuplinks.length; i++) {
		if (popuplinks[i].id.substr(0, 9) == "popup_ext") {
			popuplinks[i].onclick = function() {
				openPopUpExternalLink(this.getAttribute("href"));
				return false;
			}
		}
	}
}

function openPopUpExternalLink(linkURL) {
	window.open(linkURL, 'popup_external_link', 'width=855,height=541,top=0,left=0,scrollbars=yes,resizable=yes,status=yes,toolbar=yes,menubar=yes,location=yes');
}
