function ED_openWindow(url, name, width, height, features, placement)
{
	if (width >= screen.width)
		width = screen.width;

	if (height >= screen.height)
		height = screen.height;

	if (placement == 'tl')	// put in upper left corner
		features += ",screenX=0,screenY=0,left=0,top=0";
		
	if (placement == 'c' && width >= 1 && height >= 1)
	{
		var windowCenterX = screen.width/2;
		var windowCenterY = screen.height/2;
		var xCoord = windowCenterX - width/2;
		var yCoord = windowCenterY - height/2;
		
		features += ",width=" + width + ",height=" + height + ",screenX=" + xCoord + ",screenY=" + yCoord
					+ ",left=" + xCoord + ",top=" + yCoord;//nn=screenX, screenY: IE=left,top Browser will ignore unknown attributes
	}
	if (placement != 'c' && width >= 1)
		features += ",width=" + width;
		
	if (placement != 'c' && height >= 1)
		features += ",height=" + height;
		
	if (features.substring(0,1) == ",")
		features = features.substring(1, features.length);

	window.open(url,name,features);
}	
