var _win=null;

function openWindow(url, width, height, title)
// Deze functie opent een nieuw venster in het midden van het scherm.
// url        => url voor het nieuwe venster
// width      => breedte van het venster
// height     => hoogte van het venster
// title      => titel van het venster
// openWindow <= void
{
  var left=(screen.width/2)-(width/2);
  var top=(screen.height/2)-(height/2);
  if(_win != null && !_win.closed)
  {
    _win.close();
  }

  _win = window.open(url, 'title', 'height='+height+', width='+width+', top='+top+', left='+left+', status=no, toolbar=no, directories=no, menubar=no, location=no, scrollbars=no');
  _win.resizeTo(width + 10,height + 60);
  _win.focus();
}

function openNormalWindow(url, width, height, title)
// Deze functie opent een nieuw venster in het midden van het scherm.
// url        => url voor het nieuwe venster
// width      => breedte van het venster
// height     => hoogte van het venster
// title      => titel van het venster
// openWindow <= void
{
  var left=(screen.width/2)-(width/2);
  var top=(screen.height/2)-(height/2);
  if(_win != null && !_win.closed)
  {
    _win.close();
  }

  _win = window.open(url, 'title', 'height='+height+', width='+width+', top='+top+', left='+left);
  _win.resizeTo(width + 10,height + 60);
  _win.focus();
}
