O zaman açılacak olan pencerenin max width değerini belirlemeniz gerekiyor, sonra window width ve height değerleri ile fonksiyon yazarak bu işlemi yapmalısınız. hazırı var burada,

function MyPopUpWin(url, width, height) { var leftPosition, topPosition; //Allow for borders. leftPosition = (window.screen.width / 2) - ((width / 2) + 10); //Allow for title and status bars. topPosition = (window.screen.height / 2) - ((height / 2) + 50); //Open the window. window.open(url, "Window2", "status=no,height=" + height + ",width=" + width + ",resizable=yes,left=" + leftPosition + ",top=" + topPosition + ",screenX=" + leftPosition + ",screenY=" + topPosition + ",toolbar=no,menubar=no,scrollbars=no,location=no,directories=no");}
kaynak: https://stackoverflow.com/questions/...his-javascript