function openWindow(uri, title, width, height)
{
  if (width == undefined)
  {
    width = 800;
  }
  
  if (height == undefined)
  {
    height = 600;
  }

  if (title == undefined)
  {
    title = 'TGNET';
  }

  var posx = ((screen.availWidth) - width) / 2;
  var posy = (((screen.availHeight) - height) / 2) - 20;

  if (posx < 1) {posx = 1;}
  if (posy < 1) {posy = 1;}

  posx = Math.floor(posx);
  posy = Math.floor(posy);

  var fenster = window.open(uri, title, 'width=' + width + ',height=' + height + ',left=' + posx + ',top=' + posy + ',location=no,menubar=no,resizeable=yes,scrollbars=yes,status=no,toolbar=no,hotkeys=no,dependent=yes');
}

function openFormWindow(uri, title, width, height)
{
  uri = 'http://www.transgender-net.de/scripts/' + uri + '.html';

  if (width == undefined)
  {
    width = 800;
  }
  
  if (height == undefined)
  {
    height = 600;
  }

  if (title == undefined)
  {
    title = 'TGNET';
  }

  openWindow(uri, title, width, height);
}

