var windowOpen = null;
function jsOpenImage(p_sFileName) 
{
	if( windowOpen != null ) windowOpen.close();
	var regEx = /(\d+)x(\d+)/;
	var matches = p_sFileName.match( regEx );
	var x=600;
	var y=493;
	var top=200;
	var left=200;
	
	if( matches != null )
	{
		x = parseInt( matches[1] ) + 20;
		y = parseInt( matches[2] ) + 20;
	}
	
	top = parseInt( (screen.height - y )/2 );
	left = parseInt( (screen.width - x )/2 );	
	
	windowOpen=window.open(p_sFileName, "Image", "toolbar=0,location=0,directories=0,status=0,menubar=no,scrollbars=no,resizable=no,width=" + x + ",height="+y+",top="+top+",left="+left);
}


