Js gets the coordinates of the position of the window relative to the left and top of the screen
Gets the position of the window relative to the left and top of the screen:
var x=window.screenLeft?window.screenLeft: window.screenX ;
var y=window.screenTop?window.screenTop: window.screenY;
alert(x+" "+y);