onLoadList = new Array();

// Example: addOnLoad("someFunction");
function addOnLoad(func){
	onLoadList[onLoadList.length] = func;
}

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

// Open external links in a new window
function handleExternalLinks(){
	//return;
	var anchors = document.getElementsByTagName("a");
	var i, href;
	for(i=0; i < anchors.length; i++)
	{
		if(!anchors[i].href) continue;
		href = anchors[i].href;
		
		if ((href.indexOf("twob.net") == -1) && (href.indexOf("javascript:") == -1) && (!anchors[i].onclick) && (href.indexOf("mailto:") == -1) && (href.indexOf("http://") != -1)) 
		{
			anchors[i].setAttribute("target","_blank");
		}
	}
}
/*
if(document.getElementsByTagName){
	addOnLoad("handleExternalLinks");
}
*/