/* Yes -- the following 2 functions do practically the same thing
 * and should be consolidated/renamed/etc.
 */
function popup(url, windowname)
{
	var popupurl;

	if(!window.focus)
		return true;
	
	if(typeof(url) == 'string') {
		popupurl = url;
	}
	else {
		popupurl = url.href;
	}

	window.open(popupurl, windowname, 'width=500,height=400,scrollbars=yes');
	
	return (false);
}

function showPopup(id, view)
{
	var url = "details.php?v=" + view + "&id=" + id;
	var flags = "status=0," + 
		    "toolbar=0," +
		    "location=0," +
		    "menubar=0," +
		    "resizable=1," +
		    "scrollbars=1," +
		    "height=800," +
		    "width=700";
	window.open(url, "details", flags);
}

function closePopup()
{
	window.opener.location.reload();
	window.close();
}
