9. if (!window.outerHeight && document.documentElement.clientWidth) {
var clientW = document.documentElement.clientWidth;
var clientH = document.documentElement.clientHeight;
// resize the window, the new window will be smaller
window.resizeTo (clientW, clientH);
// calculate the difference between the client and the total size in the new window
var frameW = clientW - document.documentElement.clientWidth;
var frameH = clientH - document.documentElement.clientHeight;
var totalW = clientW + frameW;
var totalH = clientH + frameH;
window.resizeTo (totalW, totalH);
if (clientW != document.documentElement.clientWidth || clientH != document.documentElement.clientHeight) {
// repair the mistake
frameW = totalW - document.documentElement.clientWidth;
frameH = totalH - document.documentElement.clientHeight;
totalW = clientW + frameW;
totalH = clientH + frameH;
}
window.outerHeight = totalH;
window.outerWidth = totalW;
}