<!--
window.onload = init;

function init() {
	disableNav = document.getElementById("navId3");
	disableNav.onclick = function() {return false;};
	disableNav = document.getElementById("navId28");
	disableNav.onclick = function() {return false;};
	hideProg();
}

function hideProg() {
	hideAllProg();
	if(toHide.length > 0) {
		for(i = 0; i < toHide.length; i++) {
			obj = document.getElementById("progID" + toHide[i]).childNodes[0];
			eval("obj.onclick = function() { hideAllProg(); sobj = document.getElementById('progID" + toHide[i] + "desc');	sobj.style.display = 'block'; this.style.color = 'white';}");
		}
	}
}

function hideAllProg() {
	if(toHide.length == 0) getAllProg();
	if(toHide.length > 0) {
		for(i = 0; i < toHide.length; i++) {
			document.getElementById("progID" + toHide[i]).childNodes[0].style.color = "";
			document.getElementById("progID" + toHide[i] + "desc").style.display = "none";
		}
	}
}

toHide = Array();
function getAllProg() {
	dts = document.getElementsByTagName("DT");
	for(i = 0; i < dts.length; i++) {
		if(dts[i].className == "programToHide") {
			toHide[toHide.length] = dts[i].id.substr(6);
		}
	}
}

// javascript do zakladniho javascr. souboru

var msgWin = window.msgWin;
/* popup pro obrazky a galerie */
function popup(alink, type) { 
	var retValue = false;
	switch(type) {
		case 1: // img_from_link
			prefix = "/popup_image.php?path=";
			path = prefix + alink.href.substr(alink.href.indexOf("/img/")) + "&title=" + alink.getAttribute("TITLE");
			break;
		case 2: // gal_from_link
			prefix = "/popup_gallery.php?js=true&adr=";
			ppth = alink.href.substr(alink.href.indexOf("adr=") + 4)
			path = prefix + ppth;
			break;
		case 3:
			
			break;
	}
	
	if (msgWin != null && !msgWin.closed) { 
		msgWin.location.href = path;
		msgWin.focus();
	} else {
		msgWin = window.open(path, "_gallery","height=150,menubar=0,personalbar=0,resizable=1,scrollbars=0,toolbar=0,width=150,top=100,left=100,status=0");
		if (msgWin == null || typeof(msgWin) == "undefined") {
			retValue = true; 
			}
		else { 
			alink.target = "_gallery";
			msgWin.focus(); 
		} 
	} 
	return retValue; 
}
//-->
