﻿var xy = new ScreenResolution;var windowWidth = 630;var windowHeight = 460;function ScreenResolution(){this.screenWidth = screen.width;this.screenHeight = screen.height;}if (parseInt(navigator.appVersion)>4) { if (navigator.appName="Netscape") {  windowWidth = window.innerWidth;  windowHeight = window.innerHeight; } if (navigator.appName.indexOf("Microsoft")!=-1) {  windowWidth = document.body.offsetWidth;  windowHeight = document.body.offsetHeight; }}alert("Your screen resolution width is " + xy.screenWidth + "\n\nYour screen resoltuion height is " + xy.screenHeight + "\n\nThe width of your current window is "+windowWidth+"\n\n" +"The height of your current window is "+windowHeight)