var foto_window		= null;
var left		= (screen.availLeft) ? screen.availLeft : 0;
var top			= (screen.availTop) ? screen.availTop : 0;
var availWidth	= (screen.availWidth) ? screen.availWidth : screen.width;
var availHeight = (screen.availHeight) ? screen.availHeight - 50 : screen.height - 130;
var center_left		= left + parseInt(availWidth / 2);
var center_top		= top  + parseInt(availHeight / 2);

function show_foto(foto_id, width, height)
	{
	var url = 'submenu-foto.php?foto_id=' + foto_id + '&width=' + width + '&height=' + height;
	// Als window er nog is, dan sluiten.
	if (foto_window != null)
		{
		if (!(foto_window.closed))
			{
			foto_window.close();
			}
		foto_window = null;
		}
	var window_features = 'left=' + parseInt(center_left - width / 2);
	window_features +=  ', top=' + parseInt(center_top - height / 2);
	window_features += ', width=' + width + ', height=' + height + ', resizable=yes, status=no';
	foto_window = window.open(url, 'foto_window', window_features);
	if (foto_window == null)
		{
		return true;
		}
	else
		{
		return false;
		}
	}

