function resizeWindow(minWidth,minHeight) { browserWidth = document.all?document.body.offsetWidth:window.outerWidth; browserHeight = document.all?document.body.offsetHeight:window.outerHeight; if(browserWidth<=minWidth) { if(browserHeight<minHeight) { window.resizeTo(minWidth,minHeight); } else { window.resizeTo(minWidth,browserHeight); } } else if (browserWidth>=minWidth) { if(browserHeight<minHeight) { window.resizeTo(browserWidth,minHeight); } } }
Pass this method the desired minimum width and height of the user's browser - if it is doesn't meet the minimums, the browser will be resized to those minimums.