if (!document.getElementById){
	document.getElementById = function(){return null;}
	document.getElementsByTagName = function(){return null;}
}

// Load functions
onLoadList = new Array();

function addOnLoad(func){
	onLoadList[onLoadList.length] = func;
}

function runOnLoad(){
	for(i in onLoadList){
		var addPar = "";
		if (onLoadList[i].indexOf("(") == -1) addPar = "()";
		eval(onLoadList[i]+addPar);
	}
}

// Init
addOnLoad('externalLinks');
window.onload = runOnLoad;

//Set links to open in 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";
 }
}
