var childWin;
	
function openNewWin(thisURL, thisRel) {
	(thisRel == 0) ? window.opener = window.open(thisURL) : childWin = window.open(thisURL);
	}
	
function redirParent(thisURL) {
	if (window.opener == null) {
		openNewWin(thisURL, 0);
	} 
	else if (window.opener.closed) {
		openNewWin(thisURL, 0);
	} 
	else {
		window.opener.location.href = thisURL;
	}
}

function handleExternalLink(thisURL) {
	
	redirParent(thisURL);
}