// Fenster öffnen zentriert auf Bildschirm
//
// Benutzung: <a href="javascript:openC('huhu.php',200,100,'dependent=yes,resizable=yes')">...</a>
//   oder <input ... onClick="openC('huhu.php',200,100,'dependent=yes,resizable=yes')">
//
// Parameter: 
// url:      URL die im Fenster angezeigt werden soll (string)
// w:        gewünschte Fensterbreite (Zahl)
// h:        gewünschte Fensterhöhe   (Zahl)
// features: optionale Parameter für window.open (string
//               mit durch Komma getrennten Angaben - zB 'scrollbars=yes'); kann weggelassen werden

function openC(url,w,h,features) {
  var x= (screen.width-w)/2, y= (screen.height-h)/2;
  if (features==null || features=='') // NS optimization
    features= 'screenX='+x+',screenY='+y+',width='+w+',height='+h;
  else
    features= features +',screenX='+x+',screenY='+y+',width='+w+',height='+h;
  w= window.open(url,'',features);
  w.moveTo(x,y);
  // return w;
}
