function resize() {

   var w_newWidth,w_newHeight;

   var w_maxWidth=1600, w_maxHeight=1200;
   var w_minWidth=600, w_minHeight=200;

   if (navigator.appName.indexOf("Microsoft") != -1)

   {

   w_newWidth=document.body.clientWidth;

   w_newHeight=document.body.clientHeight;

   }else{

   var netscapeScrollWidth=15;

   w_newWidth=window.innerWidth-netscapeScrollWidth;

   w_newHeight=window.innerHeight-netscapeScrollWidth;

   }

   //if (w_newWidth>w_maxWidth)
   //w_newWidth=w_maxWidth;
   //if (w_newHeight>w_maxHeight)
   //w_newHeight=w_maxHeight;
   if (w_newHeight<w_minHeight)
   w_newHeight=w_minHeight;
   if (w_newWidth<w_minWidth)
   w_newWidth=w_minWidth;

   /*document.DemoApplet.setSize(w_newWidth,w_newHeight);*/
   //confirm(w_newWidth+', '+w_newHeight);
   document.DemoApplet.width = w_newWidth;
   document.DemoApplet.height = w_newHeight-26;


/*   window.scroll(0,0);*/

       }
       
       
       

   window.onResize = resize;
   window.onLoad = resize;

