To get the “available” area of the screen (i.e. not including any bars on the edges of the screen, but including window chrome and other windows:
var availableArea = {
pos: {
x: window.screen.availLeft,
y: window.screen.availTop
},
size: {
width: window.screen.availWidth,
height: window.screen.availHeight
}
};