function NSResize(){ if (document.layers) { if (pageWidth!=innerWidth || pageHeight!=innerHeight){ location.reload() } } } if (document.layers) { pageWidth = innerWidth; pageHeight = innerHeight; window.onresize = NSResize(); }