//--------------------------------------------------
// OPEN EXTERNAL LINKS IN NEW WINDOWS
//--------------------------------------------------

	function OpenExternalLinks() {
		if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var anchor = anchors[i];
			var isExternalLink = false;
			// MOZILLA
			if (anchor.getAttribute("class")) {
				if ((/external/.test(anchor.getAttribute("class").toLowerCase()))
					|| (/newwindow/.test(anchor.getAttribute("class").toLowerCase()))) { isExternalLink = true; }
			}
			// IE
			if (anchor.getAttribute("className")) {
				if ((/external/.test(anchor.getAttribute("className").toLowerCase()))
					|| (/newwindow/.test(anchor.getAttribute("className").toLowerCase()))) { isExternalLink = true; }
			}
			// NEW WINDOW
			if (anchor.getAttribute("href") && isExternalLink) { anchor.target = "_blank"; }
		}
	}
	
	window.onload = OpenExternalLinks;
