// Engine e-commerce: opens window with specific size                 //
// Modif Action   Project Programmer            Start Date End Date   //
// ----- -------- ------- ----------            ---------- ---------- //
// M0    Creation ONE0459 Olivier Maurice       22/03/2005 22/03/2005 //
////////////////////////////////////////////////////////////////////////

function openWindow(destination, fX, fY, windowName)
{
    var width = screen.width;
    var height = screen.height;
    var newWidth;
    var newHeight;
    var newScreenX;
    var newScreenY;
    var remX;
    var remY;

    remX = width * 0.05;
    remY = height * 0.05;
    newWidth = width - (fX * 2 * remX);
    newHeight = height - (fY * 2 * remY);
    newScreenX = (width - newWidth) / 2;
    newScreenY = (height - newHeight) / 4;

    var p = 't0=' + (new Date()).getTime();
    var d = destination;
    if (d.indexOf('?') != -1)
      d = d + '&' + p;
    else
      d = d + '?' + p;

    window.open (d, windowName,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=" + newWidth + ",height=" + newHeight + ",left=" + newScreenX + ",top=" + newScreenY);
}