Open a window bottom right of the screen

HTML

<input type="button" value="click me!" />

JavaScript

jQuery('input').click(function() {
  var screen = window.screen;
  var height = screen.availHeight;
  var width = screen.availWidth;
  var browserChromeHeight = 601; // magic number!
  var browserChromeWidth = 12; // magic number!
  
  var windowProperties = [];
  windowProperties.push('width=300');
  windowProperties.push('height=300');
  windowProperties.push('top=' + (height - 300 - browserChromeHeight));
  windowProperties.push('left=' + (width - 300 - browserChromeWidth));
  
  window.open('//google.com', 'mywindow', windowProperties.join(','));
});