window.onload = function() {
	// check to see that the browser supports the getElementsByTagName method
	// if not, exit the loop 
	if (!document.getElementsByTagName) {
		return false; 
	} 
	// create an array of objects of each link in the document 
	var external = document.getElementsByTagName("a");
	// loop through each of these links (anchor tags) 	
	for (var i=0; i < external.length; i++) {	
		// if the link has a external relation
		if (external[i].getAttribute("rel") == "external") {	
			// add an onclick event on the fly to pass the href attribute	
			// of the link to our second function, openExternal 	
			external[i].onclick = function() {	
			openExternal(this.getAttribute("href"));	
			return false; 	
			} 	
		}
	} 
} 

function openExternal(linkURL) {
window.open(linkURL,'external','resizable=yes,scrollbars=yes,menubar=yes,toolbar=yes,directories=yes')
}
