var displayBlock; var dWidth = screen.width; var dHeight = screen.height; var sSize; var sWidth; var sHeight; var ratio = (dWidth / dHeight).toPrecision(5); var dRatio = Math.sqrt((dWidth*dWidth)+(dHeight*dHeight)); switch (ratio*1) { case 1.3333: ratio = "4:3"; break case 1.6000: ratio = "16:10"; break case 1.2500: ratio = "5:4"; break case 1.6666: ratio = "5:3"; break case 1.7067: ratio = "10:6"; break case 1.5625: case 1.5555: ratio = "14:9"; break case 1.7786: case 1.7777: ratio = "16:9"; break case 1.5000: case 1.4988: ratio = "3:2"; break } document.write('ViewGuard™ has detected that your display has a '+ratio+' Aspect Ratio. Click here to find out more.');