// JavaScript Document// Loads external links, defined as rel="external", in a new windowfunction externalLinks() { 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"; }}// Loads links to protected content, defined as rel="protected", in a new windowfunction externalProtected() { 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") == "protected")     { anchor.target = "_blank";	 anchors[i].title = 'This links to protected content'; }   else if (anchor.getAttribute("href") &&       anchor.getAttribute("rel") == "protected")       anchors[i].title = 'This links to protected content'; }}// Loads PDF's in a new window on Windows when rel="pdf" is usedfunction externalPdfs() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i<anchors.length; i++) {   var anchor = anchors[i];   if (navigator.platform == "Win32" &&	   anchor.getAttribute("href") &&       anchor.getAttribute("rel") == "pdf")     { anchor.target = "_blank";	 anchors[i].title = 'This link opens a PDF document'; }   else if (anchor.getAttribute("href") &&       anchor.getAttribute("rel") == "pdf")       anchors[i].title = 'This link opens a PDF document'; }}// Loads links in a default popup window when rel="popup" is used. Loads links in a var defined popup window when rel="altpopup" is used.function popUp () {var x = document.getElementsByTagName('a');for (var i=0;i<x.length;i++){	if (x[i].rel == 'altpopup')	{		x[i].onclick = function () {			return altpop(this.href)		}		x[i].title = 'This link opens a popup window';	}	else if (x[i].rel == 'altpopup2')	{		x[i].onclick = function () {			return altpop2(this.href)		}		x[i].title = 'This link opens a popup window';	}// !! Put rel="otherpopup" in front of other popup script in the link, or the link will not open a popup in Safari !!	else if (x[i].rel == 'otherpopup')	{		x[i].title = 'This link opens a popup window';	}	else if (x[i].rel == 'popup')	{		x[i].onclick = function () {			return pop(this.href)		}		x[i].title = 'This link opens a popup window';	}}var popUp = null;function altpop(url){	if (popUp && !popUp.closed)		popUp.location.href = url;	else		popUp = window.open(url,'popUp',_ALTPOPUP_FEATURES);	popUp.focus();	return false;}function altpop2(url){	if (popUp && !popUp.closed)		popUp.location.href = url;	else		popUp = window.open(url,'popUp',_ALTPOPUP2_FEATURES);	popUp.focus();	return false;}function pop(url){	if (popUp && !popUp.closed)		popUp.location.href = url;	else		popUp = window.open(url,'popUp','height=500,width=450,scrollbars=yes,resizable=yes,menubar=yes');	popUp.focus();	return false;}}// Combine functions which need window.onload so they don't overwrite each other.function multipleOnload(){externalLinks();externalPdfs();popUp();}window.onload = multipleOnload;