function setLinkAttributes(switchLinks) {
  if (switchLinks == "true") {
	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") == "nofollow" ) ) {
		anchor.target = "_blank";
	  }
	}
  } else if (switchLinks == "false") {
	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") == "nofollow" ) ) {
		anchor.target = "_self";
	  }
	}
  } else {
	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") == "nofollow" ) ) {
		if (anchor.target == "_self") {
		  anchor.target = "_blank" }
		else {
		  anchor.target = "_self";
		}
	  }
	}
  }
}
		
	
