// centered is true or false, if true then window will open centered and leftpos/toppos are ignored
function popwin(myURL, width, height, centered, leftpos, toppos)
{
	if (centered)
	{
		leftpos = (screen.width - width) / 2;
		toppos = (screen.height - height) / 2;
	}
	
	popUpWin = open(myURL, 'popUpWin', 'width='+width+', height='+height+', resizable=yes, scrollbars=no, toolbar=no, location=no, directories=no, status=no, menubar=no, copyhistory=no, left='+leftpos+', top='+toppos+', screenX='+leftpos+', screenY='+toppos);
}

