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);

	rslt = new Image();
	rslt.src = swurl;

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('</head><body onclick="window.close();" style="cursor: pointer; margin: 0; padding: 1;">');
	write('<img src="'+swurl+'" alt="'+note+'" title="'+note+'"></body></html>');
	}

	subwin.focus();
	return !subwin;
}

