// funkce ktera otvira okno na stred obrazovky
function showimg (url, refresh)
{
	if(window.screen){
		var myLeft = (screen.width-550)/2;
		var myTop = (screen.height-550)/2;
	}
	window.open("ImageShow.aspx?name=" +url+ "&refresh=" +refresh, "pic", "width=550,height=550,left="+myLeft+",top="+myTop+",scrollbars=0,menubar=0,status=1,toolbar=0,resizable=1").focus();
}

function showimg (url, refresh, path)
{
	if(window.screen){
		var myLeft = (screen.width-760)/2;
		var myTop = (screen.height-760)/2;
	}
	window.open(path + "ImageShow.aspx?name=" +url+ "&refresh=" +refresh, "pic", "width=550,height=550,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);
}

//vykresli transparentni flash flash
function WriteTFlash(src,width,height){
	html = "<object type=\"application/x-shockwave-flash\" data=\""+src+"\" width=\""+width+"\" height=\""+height+"\" id=\"topicflash\" name=\"topicflash\">   <param name=\"movie\" value=\""+src+"\" /> <PARAM NAME=\"quality\" VALUE=\"high\"><PARAM NAME=wmode VALUE=transparent> <EMBED src=\""+src+"\" quality=high wmode=transparent bgcolor=#FFFFFF  WIDTH=\""+width+"\" HEIGHT=\""+height+"\" NAME=\"topicflash\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\" swLiveconnect=true> </EMBED></object>";
	document.write(html);
}

// vykresli flash
function WriteFlash(src,width,height){
	html = "<object type=\"application/x-shockwave-flash\" data=\""+src+"\" width=\""+width+"\" height=\""+height+"\" id=\"topicflash\" name=\"topicflash\">   <param name=\"movie\" value=\""+src+"\" /> <PARAM NAME=\"quality\" VALUE=\"high\"><EMBED src=\""+src+"\" quality=high bgcolor=#FFFFFF  WIDTH=\""+width+"\" HEIGHT=\""+height+"\" NAME=\"topicflash\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\" swLiveconnect=true> </EMBED></object>";
	document.write(html);
}
