// the generic function
function popUp(winURL, linkclass, settings) {
	window.open(winURL, linkclass, settings);
}

function resourceMap() {
	if (!document.getElementById) return false;
	var map = document.getElementsByClassName('resourceMap');
	for (var i = 0; i < map.length; i++) {
		if (map[i].className == "resourceMap") {
			map[i].onclick = function() {
				popUp(this.getAttribute("href"), "popup", 'width=782, height=586, scrollbars=no, resizable=yes');
				return false;
			}
		}
	}
}

function tellFriend() {
	if (!document.getElementById) return false;
	var tl = $('tl');
	if(!tl) return;
	tl.onclick = function() {
		popUp(this.getAttribute("href"), "popup", 'width=624, height=632, scrollbars=no, resizable=yes');
		return false;
	}
}

function submitRequest() {
	var tl = document.getElementsByClassName('rq');
	if(!tl) return;
	for (i=0; i < tl.length; i++) {
	tl[i].onclick = function() {
		popUp(this.getAttribute("href"), "popup", 'width=624, height=632, scrollbars=yes, resizable=yes');
		return false;
		}
	}
}

addLoadEvent(resourceMap);
addLoadEvent(tellFriend);
addLoadEvent(submitRequest);


