/************************************************************
	RFMS Danville Javascript
	Created:				08.03.2004
	Last Modified:	08.25.2004
	Author:					Lee Allen
************************************************************/

/************************************************************
	START target="_blank" replacement script
************************************************************/

//	this function works around the dropping of
//	target="_blank" from XHTML strict

//	the function takes all instances of rel="external" from
//	anchor tags, and causes them to pop a new window

//	in short, use rel="external" instead of target="_blank"
//	to pop 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";
	}
}
window.onload = externalLinks;

/************************************************************
	END target="_blank" replacement script
************************************************************/