var resize_flag=false;
var timer_id;

function CheckSize(min_width, min_height)
   { my_width=document.body.clientWidth;
     my_height=document.body.clientHeight;
          
     if ((my_height < min_height)||(my_height > min_height)) 
       window.resizeBy(0, min_height-my_height);
     if ((my_width  < min_width)||(my_width  > min_width)) 
       window.resizeBy(min_width-my_width, 0);
     resize_flag=false;
     clearInterval(timer_id);
   }
   
function ResizeHandler()
   { if (resize_flag)
        return
     else 
        { resize_flag=true;
           timer_id = setInterval("CheckSize(800,600);",1000);
        }
   }