function findExLinks() {
	var linkObjs = document.getElementsByTagName('a');
	for (var i = 0; i < linkObjs.length; i++) {
		link = linkObjs[i].getAttribute('rel');
		if (link == "external") {
			linkObjs[i].onclick = newWin;
		}
	}
}

function newWin() {
	// window features
	var status = "1";
	var toolbar = "1";
	var location = "1";
	var menubar = "1";
	var directories = "0";
	var resizable = "1";
	var scrollbars = "1";	
	var features = "status=" + status + ",toolbar=" + toolbar + ",location=" + location + ",menubar=" + menubar + ",directories=" + directories + ",resizable=" + resizable + ",scrollbars=" + scrollbars;
	var newWin = window.open(this, "newWin", features);

	newWin.focus();	
	return false;
}

// total number of different banners for the home page
var total = 4;

function randomBanner() {
	var containerObj = document.getElementById("banner");

	if (containerObj != null) {
		var randomNum = Math.floor(Math.random() * total) + 1;
		containerObj.src = "images/banner-home" + randomNum.toString() + ".jpg";
	}
}
