Window Functions
Move Window
window.moveTo(window.screenLeft, window.screenTop);
// Reposition the window to the top left corner of the screen
window.moveTo(0, 0);
Resize Window
self.resizeTo(document.body.offsetWidth, document.body.offsetHeight + 150);
// Resize the window to 400 pixels wide and the amount of available screen space tall
window.resizeTo(400, screen.availHeight);
Get Window Size
document.body.clientWidth;
// Get the width of the current window and add 8 characters (for the border)
var sLeft;
sLeft = document.body.clientWidth + 8;
Open a New Window
// Open a new window at the sLeft position defined above at the top of the screen
// to the maximum height of available screen real estate
window.open("http://www.microsoft.com/","","channelmode=0,directories=0,fullscreen=0,height=" + screen.availHeight + ",left="+sLeft+",location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,top=0,width=500");