// error suppression
self.onerror = function () { return false; }

// window reference vars
var nspLegalPopupWindow;

// function to show legal (privacy policy, terms of use, credits)
function nspLegalPopup (el, w, h, scroll) {
	// close existing popup
	if (nspLegalPopupWindow) {
		nspLegalPopupWindow.close();
		nspLegalPopupWindow = null;
	}
	// build the url
	var url = el.href;
	var loc = el.target;
	var params = "";
	params += "resizable=yes,width="+w+",height="+h+",innerwidth="+w+",innerheight="+h+",";
	params += "scrollbars="+scroll+",toolbar=no,location=no,statusbar=no";
	nspLegalPopupWindow = window.open(url, loc, params);
	nspLegalPopupWindow.focus();
	return false;
}

function nspLegalPopupClose () {
	nspLegalPopupWindow = null;
}