// funkce ktera otvira okno
function showimg (url, refresh)
{
	if(window.screen){
		var myLeft = (screen.width-640)/2;
		var myTop = (screen.height-640)/2;
	}
	window.open("ImageShow.aspx?name=" +url+ "&refresh=" +refresh, "pic", "width=640,height=640,left="+myLeft+",top="+myTop+",scrollbars=0,menubar=0,status=1,toolbar=0,resizable=1").focus();
}

// funkce ktera meni velikost okna, podle velikosti obrazku
function ResizeWindow() {
	var maxWidth = screen.width;
	
	var maxHeight = screen.height;
	
	if (document.getElementById('obr')) var OImage = document.getElementById('obr');
	
	else if (document.all['obr'])  var OImage = document.all['obr'];
	
	winWidth = OImage.width+20;
	
	winHeight = OImage.height+70;
	
	if (winWidth>maxWidth) winWidth=maxWidth;
	
	if (winHeight>maxHeight) winHeight=maxHeight;
	
	window.resizeTo(winWidth, winHeight);
}
