var poupWindow;

function openCenteredWindow(url)
{

	try
	{
		if(!poupWindow || typeof(poupWindow.closed) == "undefined" || poupWindow.closed)
		{
			var width = 800;
			var height = 600;
			var left = parseInt((screen.availWidth/2) - (width/2));
			var top = parseInt((screen.availHeight/2) - (height/2));
			var windowFeatures = "width=" + width + ",height=" + height + ",scrollbars,status,left=" + left + ",top=" + top + ",screenX=" + left + ",screenY=" + top;
			poupWindow = window.open(url, "subWind", windowFeatures);
		}
		else
		{
			windowAgency.focus( );
		}

	}
	catch (e)
	{
		alert(e.message);
		return;
	}
}
