var RE_popUpWin	=	0;
function RE_popUpWindow(URLStr, mywidth, myheight, autofocus, autoclose)
{
	var width	=	screen.availHeight;
	var height	=	screen.availHeight;
	
	if (null != mywidth) 
	{
		width	=	mywidth;
	}
	
	if (null != myheight) 
	{
		height	=	myheight;
	}
	
	var top		=	(screen.availHeight - (height + 16)) / 2;
	var left	=	(screen.availWidth - width) / 2;   
	RE_popUpWin	=	open(URLStr, 'RE_popUpWin', 'titlebar=no,toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
	
	if (null == autofocus)
	{
		RE_popUpWin.focus();
	}
	else
	{
		RE_popUpWin.blur();
	}
	
	if (null != autoclose)
	{
		RE_popUpWin.close();
		RE_popUpWin	=	0;
	}
}
