/******************************************************************************************
* Module: fix.height.js v 1.0
* Description: Opens a rel="external" in a new window, to validate in XHTML strict
* 
* MadCow Internet Solutions
* 
* Copyright: 2005 MadCow Internet Solutions
* If you have come across this page, its cause you are snooping through code, and are generally a developer as such
* If you are going to re-create this code, give the auther some credits
* This code was found on http://www.sitepoint.com/article/standards-compliant-world in order to be able to validate
* a page with opening a new link in a new window without target="_blank"
*
* Email: support@madcow.co.za
* Author: Greg Shiers, Jarratt Ingram, Sean Gerrard
******************************************************************************************/

function externalLinks(){
	if (!document.getElementsByTagName) return; // Check for DOM / Browser compatability
	var anchors = document.getElementsByTagName("a"); // Set var, which will narrow down all the a elements in the document
	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;
