//***************************************************************************
// *                                                                        *
// *      JAVASCRIPT  to open links in a new window while preserving XHTML Strict compliance.
//* 				<a href="#" target="_blank"> is not XHTML strict compliant.
//* 
//* 				To enable this function include the following code on a page:
//*					window.onload = enableNewWindowLinks("external");
//*
//*				and links on the page should have be ocnfigured with
//*				<a href="#" rel="external">
// *                                                                        * 
//***************************************************************************

function enableNewWindowLinks(relValue) {
 //* Check if the browse supports the Document Object Model 1.0 (DOM1) standard.
 //* Older browsers like Netscape 4 and Internet Explorer 4 don't support DOM1.
 //* relValue is the value of the <a> tag 'rel' attribute. Eg: <a href='#' rel='external' >
 if (!document.getElementsByTagName) return;
 
 //* Get all the <a> tags.
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i < anchors.length; i++) {  
	var anchor = anchors[i];
	if (anchor.getAttribute("href") && anchor.getAttribute("rel") == relValue) {
		//* Now that we've confirmed that we're dealing with a new-window link, we can set its target attribute to "_blank":
		anchor.target = "_blank";
	}
 }
}
