﻿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.getAttribute("rel") == "external nofollow" ||
				anchor.getAttribute("rel") == "nofollow external"
			)
		)
		{ anchor.target = "_blank"; }
	}
}

function internalInfo() {
	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") == "info" ||
				anchor.getAttribute("rel") == "info nofollow" ||
				anchor.getAttribute("rel") == "nofollow info"
			)
		)
		{
			var url = anchor.getAttribute("href");
			var title = anchor.getAttribute("title");

			anchor.onclick = function() { var a = window.open(this.getAttribute("href"), "Informatie", "width=860,height=500,status=no,resizable=yes,scrollbars=yes"); a.focus(); return false; }
		}
	}
}

window.onload = function() {
    externalLinks();
    internalInfo();
}