ブラウザの表示領域

sample(javascript)

var ret ;
   if (document.all) {
      ret = "------------ for IE   ----------¥n" +
            "   横サイズ:" + document.body.clientWidth + "¥n" +
            "   縦サイズ:" + document.body.clientHeight + "¥n" +
            "--------------------------------¥n";
   } else {
      ret = "------------ for Other ---------¥n" +
            "   横サイズ:" + innerWidth + "¥n" +
            "   縦サイズ:" + innerHeight + "¥n" +
            "-------------------------------¥n";
   }
   alert(ret);