exist=false;
function fenster(datei)
{
if (exist)
 {if (!nwin.closed)
  { nwin.window.close();
  }
 }
 x = 440;
 y = 460;
 center_y = (screen.height / 2) - (y / 2);
 center_x = (screen.width / 2) - (x / 2);
 nwin=window.open(datei,"fenster","width="+x+",height="+y+",top="+center_y+",left="+center_x+",resizable=no,scrollbars=no,toolbar=no");

exist=true;
}

function galerie(datei)
{
if (exist)
 {if (!nwin.closed)
  { nwin.window.close();
  }
 } 
 nwin=window.open(datei,"fenster","width=200,height=70,screenX=50,screenY=50,top=50,left=50,resizable=yes,scrollbars=no,toolbar=no");
exist=true;
}

function fenster2(datei,x,y)
{
if (exist)
 {if (!nwin.closed)
  { nwin.window.close();
  }
 }
 center_y = (screen.height / 2) - (y / 2);
 center_x = (screen.width / 2) - (x / 2);
 nwin=window.open(datei,"fenster","width="+x+",height="+y+",top="+center_y+",left="+center_x+",resizable=no,scrollbars=no,toolbar=no");
exist=true;
}

function fenster3(datei)
{
if (exist)
 {if (!nwin.closed)
  { nwin.window.close();
  }
 }
 x = 440;
 y = 200;
 center_y = (screen.height / 2) - (y / 2);
 center_x = (screen.width / 2) - (x / 2);
 nwin=window.open(datei,"fenster","width="+x+",height="+y+",top="+center_y+",left="+center_x+",resizable=no,scrollbars=no,toolbar=no");

exist=true;
}

function fenster4(datei,x,y)
{
if (exist)
 {if (!nwin.closed)
  { nwin.window.close();
  }
 }
 center_y = 100;
 center_x = (screen.width / 2) - (x / 2);
 nwin=window.open(datei,"fenster","width="+x+",height="+y+",top="+center_y+",left="+center_x+",resizable=no,scrollbars=no,toolbar=no");
exist=true;
}


function EMail(s)
{
 var a = false;
 var res = false;
 if(typeof(RegExp) == 'function')
 {
  var b = new RegExp('abc');
  if(b.test('abc') == true){a = true;}
  }

 if(a == true)
 {
  reg = new RegExp('^([a-zA-Z0-9\\-\\.\\_]+)'+
                   '(\\@)([a-zA-Z0-9\\-\\.]+)'+
                   '(\\.)([a-zA-Z]{2,4})$');
  res = (reg.test(s));
 }
 else
 {
  res = (s.search('@') >= 1 &&
         s.lastIndexOf('.') > s.search('@') &&
         s.lastIndexOf('.') >= s.length-5)
 }
 return(res);
}
function popupPage()
{

// page enthält die URL der HTML-Seite für das Fenster
var page = "weihnachten.html";

windowprops = "width=500,height=550,locationbar=no," +
// Zeilenumbruch (und Kommentar) entfernen
 "scrollbars=no,menubars=no,toolbars=no,resizable=yes";

window.open(page, "Titeltext", windowprops);
}