<!--
// ********************************************************************************
// **Author: Philip Jahmani Chauvet
// ********************************************************************************

function popUpCenter( url, width, height )
{
  var posX = centerWidth ( width );
  var posY = centerHeight ( height );
  var features = 'toolbar=no, location=no, directories=no, status=no, menubar=no, width=' +  width + ', height=' + height + ', left=' + posX + ', top=' + posY + ', resizable=no, scrollbars=no';
  exceptionerror = window.open( url, 'newwindow', features );
  exceptionerror.focus();
}

function popUpHelpCenter( url, width, height )
{
  var posX = centerWidth ( width );
  var posY = centerHeight ( height );
  var features = 'toolbar=no, location=no, directories=no, status=no, menubar=no, width=' +  width + ', height=' + height + ', left=' + posX + ', top=' + posY + ', resizable=no, scrollbars=no';
  exceptionerror = window.open( url, 'help', features );
  exceptionerror.focus();
}

function popUpCenterScroll( url, width, height )
{
  var posX = centerWidth ( width );
  var posY = centerHeight ( height );
  var features = 'toolbar=no, location=no, directories=no, status=no, menubar=no, width=' +  width + ', height=' + height + ', left=' + posX + ', top=' + posY + ', resizable=no, scrollbars=yes';
  exceptionerror = window.open( url, 'newwindow', features );
  exceptionerror.focus();
}


function popUpCenterResizeScroll( url, width, height )
{
  var posX = centerWidth ( width );
  var posY = centerHeight ( height );
  var features = 'toolbar=no, location=no, directories=no, status=no, menubar=no, width=' +  width + ', height=' + height + ', left=' + posX + ', top=' + posY + ', resizable=yes, scrollbars=yes';
  exceptionerror = window.open( url, 'fullwindow', features );
  exceptionerror.focus();
}

function centerWidth ( frameWidth )
{
  return centerutil( self.screen.width, frameWidth )
}

function centerHeight ( frameHeight )
{
  return centerutil( self.screen.height, frameHeight+30 )
}

function centerutil( screen, pos)
{
  if ( pos > screen ) {
    return 0;
  } else {
    return (screen / 2) - (pos / 2)
  }
}

//-->
