function non_user(msg)
{
	var html = ''+
		'<center>'+
		'<strong style="font-size: 16px;">Oh noes!</strong><br />'+
		"<strong>You have to be a registered user and logged in to continue.</strong><br />"+
		"<br />"+
		"You're trying to:<br />"+
		msg + "<br />"+
		"<br />"+
		login_link()+
		'</center>'+
	'';
	popup.inline(html);
	return false;	
}

function login_link()
{
	return '<a href="/users/login/?return='+window.location.pathname+(window.location.search?window.location.search:'')+'"><b>Click here to Register/Login</b></a>';
}

function createReferrerLink(url, text, variable)
{
	variable = variable ? variable : 'referrer'
	return '<a href="'+url+'?'+variable+'='+window.location.pathname+(window.location.search?window.location.search:'')+'">'+text+'</a>';
}
