function resizeWin()
{
if (document.all) {
        winHeight=document.all['bodyArea'].offsetHeight;
        winWidth=document.all['bodyArea'].offsetWidth;
}
// add 30 to the width for a border
// add 60 to the height to account for a border + the titlebar
window.resizeTo(winWidth+30,winHeight+50);
//alert("width="+winWidth+" height="+winHeight);
//window.resizeTo(winWidth+30,800);

//centre the window
if (window.moveTo) window.moveTo((screen.availWidth-winWidth)/2,(screen.availHeight-winHeight)/2);
}



   //   Usage : call function using a URL, window width, height and Name..
   //	Example : open_url('http://myurl.com',100,100,'MyPoPuP');

   var Winpop;
   var msg;
   function open_url(url,swidth,sheight,wname) {
      LeftPosition=(screen.width)?(screen.width-swidth)/2:100;
      TopPosition=(screen.height)?(screen.height-sheight)/2:100;
      //var sb = (s == "true")? "1":"0";
      //alert(sb);
      if ((!Winpop)||(Winpop.closed)) {
         Winpop = window.open(url,wname,'scrollbars=0,menu=0,height='+sheight+',width='+swidth+',left='+LeftPosition+',top='+TopPosition);
      }else {
         Winpop.location.href = url;
         Winpop.focus();
      }
   }
