function openPopUp(url, name, width, height)
{
	
	var screenW = screen.width;
	var screenH = screen.height;
	
	if (screenW > 1024)
		{
			screenW = 1024 - width;
		}
	else
		{
			screenW = screenW - width - 15;
		}
	
	
	settings = "toolbar=no,location=no,directories=no,"+
	           "status=no,menubar=no,scrollbars=yes,"+
	           "resizable=no,width="+width+",height="+
	           height+",left="+screenW+",top=10,screenX=250,screenY=10";

	var PopUp1 = window.open(url, name, settings); 
	
	if (!PopUp1 || PopUp1.closed)
		{
			PopUp1 = window.open(url, name, settings);
		}
	else
		{
			PopUp1.focus();
		}
}

