if(window.top!=window.self) { window.top.location.href=window.self.location.href; document.close(); }

var BottomPosition = 66;
function CD(what) {
	if (document.getElementById(what).style.display=='inline') {
	 	document.getElementById(what).style.display='none';
	} else {
	 	document.getElementById(what).style.display='inline';
	}
	if(what=='galerka') {
		if (BottomPosition==66) {BottomPosition=200;} else {BottomPosition=66;}
	}
}

function ploading() {
	document.getElementById('loadingP').innerText = ' Stránka načtena... ';
	document.getElementById('loadingP').style.backgroundColor='green';
	window.setTimeout("ploaded();",2000);
	}
function ploaded() {
	document.getElementById('loadingP').style.display='none';
}

function LoadWidth() {
	var sW = screen.width;
	var sH = screen.height;
	var mW = ((sW - 1024) / 2);
	if (sW < 1024) {
		alert('Tato stránka je určena pro rozlišení:\n1024 x 768 a vyšší!\n\nVaše rozlišení je: ' + sW + ' x ' + sH + ' ');
		parent.window.moveTo(0,0);
		parent.window.resizeTo(sW,sH);
	}
	if (sW == 1024) {
		parent.window.resizeTo(1024,sH);
		parent.window.moveTo(0,0);
	}
	if (sW > 1024) {
		parent.window.resizeTo(1024,sH);
		parent.window.moveTo(mW,0);
	}
	parent.window.focus();
}

function ShowIMG(GalImg) {
document.getElementById(GalImg).style.display='block';
}

function HideIMG(GalImg) {
document.getElementById(GalImg).style.display='none';
}



var StopReload;
var Repete;

function StartRotateIMG() {
	StopReload = "No";
}

function RotateIMG(IMG1, IMG2, IMG3, TimeoutSec, GalImg, Repete, First) {
	var IMGS=new Array(IMG1, IMG2, IMG3);
	if (First=='show') document.getElementById(GalImg).style.display='block';
	document.getElementById(GalImg).style.bottom=BottomPosition;
	if (Repete == 3) { Repete=0; } 
	document.getElementById(GalImg).innerHTML = "<img src=" + IMGS[Repete] + " border=0>";	
	Repete = Repete+1;
	if (StopReload != "Yes") {
		setTimeout("RotateIMG('" + IMG1 + "', '" + IMG2 + "', '" + IMG3 + "', '" + TimeoutSec + "', '" + GalImg + "', " + Repete + ", 'shown')",TimeoutSec);
	}
}
function StopRotateIMG(GalImg) {
	document.getElementById(GalImg).style.display='none';
	StopReload = "Yes";
}


