function Grossbildansicht(id,bildname,bildaspekt,groesstebildaufloesung)
{
anzeigebreite = screen.width - 40;
anzeigehoehe = screen.height - 180;
anzeigeaspekt = anzeigebreite / anzeigehoehe;
if (bildaspekt > 1)
	{
	bildaufloesungbreite = groesstebildaufloesung;
	bildaufloesunghoehe = groesstebildaufloesung / bildaspekt;
	}
else
	{
	bildaufloesungbreite = groesstebildaufloesung * bildaspekt;
	bildaufloesunghoehe = groesstebildaufloesung;
	}
maxanzeigegroesse = 1700;

// Ende Wertedefinitionen

if (anzeigeaspekt >= bildaspekt)
	{
	bildgroesse = anzeigehoehe;
	}
else
	{
	bildgroesse = anzeigebreite;
	}
if (bildgroesse > groesstebildaufloesung) bildgroesse = groesstebildaufloesung;
if (bildgroesse > maxanzeigegroesse) bildgroesse = maxanzeigegroesse;

if (bildaspekt >= 1)
	{
	fensterbreite = bildgroesse + 20;
	fensterhoehe = (bildgroesse / bildaspekt) + 50;
	}
else
	{
	fensterbreite = (bildgroesse * bildaspekt) + 20;
	fensterhoehe = bildgroesse + 50;
	}

Fenster = window.open("popup.php?id=" + id + "&bildname=" + bildname + "&size=" + bildgroesse, "Grossbildansicht", "statusbar=no,menubar=no,height=" + fensterhoehe + ",width=" + fensterbreite);
Fenster.moveTo((screen.width/2)-(fensterbreite/2),(screen.height/2)-(fensterhoehe/2));
Fenster.focus();
}

