var galerieChildWindow = null;
var state = 'none';

// otevre okno
function childwindow (url) {
	window.open(url, '', 'scrollbars=yes,resizable=yes,width=800,height=600');
}

// otevre okno galerie
function showImageGallery(url) {
	return window.open(url, 'Galerie', 'scrollbars=yes,resizable=no,width=500,height=400');
}

// zavira okno galerie
function closeImageGallery() {
	if (galerieChildWindow != null) {
		galerieChildWindow.close();
		galerieChildWindow = null;
	}
}

// zkousi zda je prohlizec IE nebo ne
function isIE() {
	if (navigator.appName == "Netscape") {
		return false;
	} else {
		return true;
	}
}

// otevira okno s vyukovym materialem
function lrwindow(url) {
	window.open(url, 'Náhled', 'resizable=yes,width=800,height=600');
}

function ShowHide(element) {
	if (state == 'block') { 
		state = 'none';
	} else {
		state = 'block'; 
	}
	if (document.all) { //IS IE 4 or 5 (or 6 beta) 
		eval("document.all." + element + ".style.display = state"); 
	}
	if (document.layers) { //IS NETSCAPE 4 or below 
		document.layers[element].display = state;
	} 
	if (document.getElementById &&!document.all) { 
		hza = document.getElementById(element);
		hza.style.display = state; 
	}
}