var subwin;

function CloseSubwin()
{
   if (typeof(subwin)=='undefined')
    return;
   if (typeof(subwin.closed)=='undefined')
    return;
   if (subwin.closed==true)
    return;
   subwin.close();
}

function gsw(swurl,picwid,pichei)
{
  CloseSubwin();

  note = "HUMI outdoor";
  swwid = picwid + 2;
  swhei = pichei + 2;
  scrwid  = screen.availWidth;
  scrhei  = screen.availHeight;
  swleft  = Math.round((scrwid - swwid)/2);
  swtop   = Math.round((scrhei - swhei)/3);

subwin  =
window.open (swurl, "obr", "width="+swwid+", height="+swhei+", left="+swleft+", top="+swtop+", "+ "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, focus=no, "+ "copyhistory=no, titlebar=no, fullscreen=no");

   with (subwin.document)
   {
    write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>'+note+'</title>');
    write('<meta http-equiv="pragma" content="no-cache"><META http-equiv="cache-control" content="no-cache"><meta HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8">');
    write('<style><!-- body {font-family: Verdana; background-color: #EEEEEE; cursor: pointer; margin: 0; padding: 1;}--></style>');
    write('</head><body>');
    write('<img onclick="window.close();" src="'+swurl+'" alt="'+note+'" title="'+note+'"></table></body></html>');
   }
   subwin.focus();
   return !subwin;
}         