	var bStop = 0;
	var oldWidth = 0;
	var oldHeight = 0;
	var okol=10;
function SrollImage(intDirection){
	var i = document.getElementById("ImageBody").scrollLeft;
	var ii;
	var k = document.getElementById("ImageBody").scrollTop;
	var kk;
	if(intDirection == 1){
		document.getElementById("ImageBody").scrollLeft = -okol + i;
		ii = document.getElementById("ImageBody").scrollLeft;
		if(i > ii && bStop == 0){setTimeout("SrollImage(1)",50)}
		}
	if(intDirection == 2){
		document.getElementById("ImageBody").scrollLeft = okol + i;
		ii = document.getElementById("ImageBody").scrollLeft;
		if(i < ii && bStop == 0){setTimeout("SrollImage(2)",50)}
		}
	if(intDirection == 3){
		document.getElementById("ImageBody").scrollTop = -okol + k;
		kk = document.getElementById("ImageBody").scrollTop;
		if(k > kk && bStop == 0){setTimeout("SrollImage(3)",50)}
		}
	if(intDirection == 4){
		document.getElementById("ImageBody").scrollTop = okol + k;
		kk = document.getElementById("ImageBody").scrollTop;
		if(k < kk && bStop == 0){setTimeout("SrollImage(4)",50)}
	}
}
function noveokno(soubor, nazevokna, velx, vely)
{
	Nahled = window.open('', nazevokna, 'resizable=0, status=0, menubar=0, location=0, directories=0, scrollbars=0, width='+velx+', height='+vely);
	Nahled.document.write('<html><head><title>Obrázek ('+soubor+')</title></head><body bgcolor="#ffffff" text="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0">');
	Nahled.document.write('<a href="javascript:;" onclick="window.close()"><img src="'+soubor+'" border=0 alt="Zavřít okno"></a>');
	Nahled.document.write('</body></html>');
}
function MM_jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function houpejText()
{
	if (document.all.RotText)
	{
		if (!document.houpejKrok) document.houpejKrok = new Number(-3);
		if (!document.houpejObratky) document.houpejObratky = new Number(3);
		var rt = document.all.RotText;
		var rtw = rt.offsetWidth;
		var rtx = rt.style.pixelWidth;
		if (rtx == 0 || rtx > rtw) rtx = rtw;
		if (rt.style.posLeft < -(rtx - 30) || rt.style.posLeft > 0)
		{
			document.houpejKrok = -document.houpejKrok;
			document.houpejObratky--;
		}
		if (document.houpejObratky >= 0) {
			rt.style.posLeft = rt.style.posLeft + document.houpejKrok;
			setTimeout('houpejText()',60);
		}
	}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function ZobrazMapu(picture, w, h, title, txt){
	scw = window.screen.availWidth-30;
	sch = window.screen.availHeight-30;
	foto = new Image();
	foto.src = picture;
	if (!w) winwidth=foto.width; else winwidth=w; 
	if (!h) winheigh=foto.height; else winheigh=h;
	if (winwidth>scw)	{
		winheigh=(scw/winwidth)*winheigh;
		winwidth=scw;	}
	if (winheigh>sch)	{
		winwidth=(sch/winheigh)*winwidth;
		winheigh=sch;	}
	wtop=(sch/2)-(winheigh/2)+40; if (wtop<0) wtop=0;
	wleft=(scw/2)-(winwidth/2); if (wleft<0) wleft=0;
	ZobrazitMapu = window.open('', 'Mapa', 'resizable=0, status=0, menubar=0, scrollbars=0, location=0, directories=0, width='+winwidth+', height='+winheigh+', top='+wtop+', left='+wleft);
	ZobrazitMapu.document.write('<html><head><title>'+title+'</title></head>');
	ZobrazitMapu.document.write('<script language="JavaScript">function UkazText(){ document.getElementById("loa").style.display = \'none\';document.getElementById("foto").style.display = \'\'; }</script>');
	ZobrazitMapu.document.write('<body onLoad="window.focus(); UkazText();" bgcolor="#ffffff" text="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" rightmargin="0" bottommargin="0">');
	ZobrazitMapu.document.write('<div id="loa" align="center" style="position:absolute;width:100%;font-size:100%;font-family:arial;"><div style="height:'+String(winheigh/2.5)+'px;"></div><b>' + txt + '</b></div>');
	ZobrazitMapu.document.write('<a href="javascript:window.close();">');
	ZobrazitMapu.document.write('<img src="' + picture + '" border="0" id="foto" alt="" style="display:none" width="'+winwidth+'" height="'+winheigh+'" hspace="0" vspace="0">');
	ZobrazitMapu.document.write('</a></body></html>');
	ZobrazitMapu.document.close();
	return false;
}
function setblock() {
	
	var step = 10; 
	if (document.all.footer.style.posTop == 0) document.all.footer.style.posTop = document.body.scrollTop + document.body.offsetHeight;

	endtop = document.body.scrollTop + document.body.offsetHeight - 33; 
	aktualtop = document.all.footer.style.posTop; 
	koef = (endtop - aktualtop) / step; 
	if (koef > 0) newtop = Math.ceil(koef) + aktualtop; 
	else newtop = Math.floor(koef) + aktualtop;
	document.all.footer.style.posTop = newtop;
	setTimeout('setblock()',20);
}
function isblank(s) 
	{ 
	for (var i=0;i<s.length;i++){ 
		var c=s.charAt(i); 
		if ((c!=' ')&&(c!='\n')&&(c!='\t')) return false; 
	} 
	return true; 
	} 
function ZkontrolujSearch(hledej)
	{
	var wh=objGet('what');
	if (isblank(wh.value) || objGet('what').value == hledej) { 
		return false;
	}else {
		var obraz=document.getElementsByTagName('form');
		for (var i=0;i<obraz.length;i++){ 
		if (obraz[i].name=='srch') obraz[i].submit();
		}
	}
    	}
function ControlSearch(){
if ((event.keyCode >90 && event.keyCode <97) || (event.keyCode >122 && event.keyCode <127) || (event.keyCode >32 && event.keyCode <48) || (event.keyCode >57 && event.keyCode <65)) event.returnValue = false;
}
function objGet(x) {
	if (Boolean(document.getElementById)) return document.getElementById(x);
	else if (Boolean(document.all)) return eval('document.all.'+x);
	else if (Boolean(document.ids)) return eval('document.ids.'+x);
	else return null;
}
function PrehodKontakty(akt, neakt){
		objGet(akt).style.display='';
		objGet(neakt).style.display='none';
}
function FormOnload(focpole) {
	var foc = objGet(focpole);
	foc.focus();
	foc.select();
}
function winH() {
if (window.innerHeight) return window.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight) return document.documentElement.clientHeight;
else if (document.body && document.body.clientHeight) return document.body.clientHeight;
else return null;
}
function winW() {
if (window.innerWidth) return window.innerWidth;
else if (document.documentElement && document.documentElement.clientWidth) return document.documentElement.clientWidth;
else if (document.body && document.body.clientWidth) return document.body.clientWidth;
else return null;
}
function getAbsoluteLeft(objectId) {
	o = document.getElementById(objectId)
	oLeft = o.offsetLeft
	while(o.offsetParent!=null) {
		oParent = o.offsetParent
		oLeft += oParent.offsetLeft
		o = oParent
	}
	return oLeft
}

function getAbsoluteTop(objectId) {
	o = document.getElementById(objectId)
	oTop = o.offsetTop
	while(o.offsetParent!=null) {
		oParent = o.offsetParent
		oTop += oParent.offsetTop
		o = oParent
	}
	return oTop
}
function ZmenOdsazeniStranky2(){
window.onresize = ZmenOdsazeniStranky2;
var ch  = (getAbsoluteTop('odsazdiv3') % 11) + 8 - testop;
var cw  = (getAbsoluteLeft('odsazdiv3') % 11) + 10;
objGet('bd').style.backgroundPosition = ch + 'px ' + cw + 'px';
}
function VlozitFlash(flashfile){
var hrv = DetectFlashVer(6, 0, 0);
if (hrv) { flashtst=1 ;
}else{ flashtst=0; };
if (flashtst==1){
var objfl=objGet('flashobj');
var vlfl = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab" WIDTH=777 HEIGHT=101>';
vlfl += '<PARAM NAME=movie VALUE="/' + flashfile + '"><PARAM NAME=quality VALUE=high>';
vlfl += '<EMBED src="/' + flashfile + '" quality=high bgcolor="#FFFFFF" WIDTH=777 HEIGHT=101 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>';
objfl.innerHTML = vlfl;
}
}