function popwin(winurl, winname, width, height)
{
	var max_width = 640;
	var max_height = 480;
	if (screen)
	{
		if (screen.availWidth && screen.availHeight)
		{
			max_width = screen.availWidth;
			max_height = screen.availHeight;
		}
	}

	var w = ((width != null) ? width : '500');
	var h = ((height != null) ? height : '450');

	x = (max_width - w)/2, y = (max_height - h)/2;
	if (x < 0  ||  x >= max_width - 25)
		x = 0;
	if (y < 24  ||  y >= max_height - 30)
		y = 24;

	if (navigator.appName == 'Netscape')
	{
		h += 50;
	}

	var newwin = window.open(winurl,winname,'width='+w+',height='+h+',innerWidth='+w+',innerHeight='+h+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',channelmode=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0');
	if (! newwin.opener)
		newwin.opener = self;
	if (newwin && newwin.focus)
		newwin.focus();
	return newwin;
}
function popwin2(winurl, winname, width, height)
{
	var max_width = 640;
	var max_height = 480;
	if (screen)
	{
		if (screen.availWidth && screen.availHeight)
		{
			max_width = screen.availWidth;
			max_height = screen.availHeight;
		}
	}

	var w = ((width != null) ? width : '500');
	var h = ((height != null) ? height : '450');

	x = (max_width - w)/2, y = (max_height - h)/2;
	if (x < 0  ||  x >= max_width - 25)
		x = 0;
	if (y < 24  ||  y >= max_height - 30)
		y = 24;

	var newwin = window.open(winurl,winname,'width='+w+',height='+h+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',channelmode=0,dependent=1,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=1,toolbar=0');
	if (! newwin.opener)
		newwin.opener = self;
	if (newwin && newwin.focus)
		newwin.focus();
	return newwin;
}
function myvoid()
{
	;	// do nothing
}

