// Åbner billede i nyt browser vindue i midten af skærmen
function openImageAndCenter(imagePath, w, h)
{
	// Default valules
	var w = (w == null) ? 700 : w;
    var h = (h == null) ? 700 : h;
    
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no, resizable=yes'
	win = window.open(imagePath,"openImage",settings)
	
	if(win.window.focus)
	{
		win.window.focus();
	}

}

