﻿
function openEMWindow(person)
{
	width = 445;
	height = 195;
	if ((width + 30 > screen.width) || (height + 60 > screen.height))
	{
	    width = width + 50;
        if (width > screen.width - 80)
			width = screen.width - 80;
	        height = height + 50;
		if (height > screen.height - 110)
			height = screen.height - 110;
			topY = screen.height / 2 - height / 2;
	        leftX = screen.width / 2 - width / 2;
		popupWin = window.open("js/mailMe.php?person="+person, "Image", "scrollbars,width=" + width + ",height=" + height + ",top="+topY+",left="+leftX+",screenX=40,screenY=40");
	}
	else
	{
	    width = width + 18;
	    height = height + 26;
	    topY = screen.height / 2 - height / 2;
	    leftX = screen.width / 2 - width / 2;
	        
		popupWin = window.open("js/mailMe.php?person="+person, "Image", "width=" + width + ",height=" + height + ",top="+topY+",left="+leftX+",screenX=40,screenY=40");
	}
}


