// This script replaces the target attribute of the anchor tags so 
// that we conform to XHTML Strict standards.  The rel tag will define
// all 'new window' sites as new_window.
function openNewWindow() {
	// make sure the browser supports this
	if (!document.getElementsByTagName) return;	
	
	// get the anchor attributes
	var anchor_attributes = document.getElementsByTagName("a");
	
	// for each of the attributes
	for (var i=0; i<anchor_attributes.length; i++) {
		var anchor_attribute = anchor_attributes[i];

		// if the rel attribute is new_window
		if(anchor_attribute.getAttribute("href") && anchor_attribute.getAttribute("rel") == "new_window")
			// open it in a new window												
			anchor_attribute.target = "_blank";
	}
}
	
window.onload = openNewWindow;
	
