
function load_pic(lang) {
	obr1=new Image(); 
	obr1.src="menu1_"+lang+"_over.jpg";
	obr2=new Image(); 
	obr2.src="menu2_"+lang+"_over.jpg";
	obr3=new Image(); 
	obr3.src="menu3_"+lang+"_over.jpg";
	obr4=new Image(); 
	obr4.src="menu4_"+lang+"_over.jpg";
	obr5=new Image(); 
	obr5.src="menu5_"+lang+"_over.jpg";
	obr6=new Image(); 
	obr6.src="menu6_"+lang+"_over.jpg";
}
function Zmen(obrazok,novy_obr) {
	//alert(document.images[obrazok].src);
	document.images[obrazok].src=novy_obr;
	//alert (document.images[obrazok].src + " / " +obrazok + " / " + novy_obr);

}

function Zavri(id) {
	id.style.visibility = "hidden";
	//window.alert("nazdar");
}

function Ukaz(id) {
	document.getElementById(id).style.visibility = "visible";
	//nastavenie polohy podmenu
	//alert(i);
	switch (id) 
	{
		case "menu4" : 
			document.getElementById(id).style.left = ((document.body.scrollWidth - document.getElementById("telo").width)/2+193+84)+"px";
			//alert(document.body.scrollWidth + " " + document.getElementById("telo").width);
			//alert(document.getElementById(id).style.left);
			break;
		case "menu2" : 
			document.getElementById(id).style.left = ((document.body.scrollWidth - document.getElementById("telo").width)/2+193+84+105+91)+"px";
			//alert(document.body.scrollWidth + " " + document.getElementById("telo").width);
			//alert(document.getElementById(id).style.left);
			break;
		case "menu3" : 
			document.getElementById(id).style.left = ((document.body.scrollWidth - document.getElementById("telo").width)/2+193+84+105)+"px";
			//alert(document.body.scrollWidth + " " + document.getElementById("telo").width);
			//alert(document.getElementById(id).style.left);
			break;
		default :
			//alert("Ani jedno menu");	
		//case polozka3 : id.style.left = (document.body.scrollWidth - 700) / 2 + 150 + 100 +100;
	}
	document.getElementById(id).style.top = "230px";
}

function Zmaz(id) {
	document.getElementById(id).style.visibility = "hidden";
	switch (id) 
	{
		case "menu6" : 
			//flash1.style.visibility = "visible";
			break;
		case "menu7" : 
			//flash1.style.visibility = "visible";
			//flash2.style.visibility = "visible";
			break;
		default :
			
	}
		
	//nastavenie farby aktivnej polozky
	//polozka.style.backgroundColor = "";
}


function KillAll(polozka) {
	menu1.style.visibility = "hidden";
	menu2.style.visibility = "hidden";
	menu3.style.visibility = "hidden";
	menu4.style.visibility = "hidden";
polozka.style.backgroundColor = "";
}

function Otvor(name) {
	window.open(name,"_self");
	
}

function UkazObrazok(name,sirka,vyska) {
	okno=window.open(name,"_blank","toolbar=no,directories=no,status=no,scrollbars=no,resize=yes,menubar=no,width="+(sirka+15)+",height="+(vyska+25)+"");
	okno.moveTo(200,300);
	okno.document.write("<body bgcolor='#495578'>");
	okno.document.write("<img src='"+name+"'>");
	//	alert (sirka+10);
}

function ZavriObrazok(name) {
	name.style.visibility = "hidden";
}

function Alert(text) {
	alert(text);
}

function clickHandler() {
  var targetId, srcElement, targetElement;
  srcElement = window.event.srcElement;
  if (srcElement.className == "Outline") {
     targetId = srcElement.id + "details";
     targetElement = document.all(targetId);
     if (targetElement.style.display == "none") {
        targetElement.style.display = "";
     } else {
        targetElement.style.display = "none";
     }
  }
}

function noveokno(subor) 
{
window.open(subor,'_blank','toolbar=no,directories=no,address=no,status=no,scrollbars=yes,resize=yes,menubar=no,width=500, height=350');
}

function showPic(cesta)
{
okno = window.open(cesta,'_blank','scrollbars=yes,resizable=yes,status=yes,width=500, height=350');	
okno.moveTo((screen.width/2)-250,(screen.height/2)-175);
}

function showPicLarge(cesta)
{
okno = window.open(cesta,'_blank','scrollbars=yes,resizable=yes,status=yes,width=1000, height=800');	
okno.moveTo((screen.width/2)-500,(screen.height/2)-400	);
}


function transEff()
{
	 efektik.filters[0].Apply();
	 efektik.style.visibility="visible";
	 efektik.filters[0].Play();
}

function index()
{
window.open("index.php",'_self');	
}
function ShowGallery() 
{
// pozicia okna
var cisloLeft = document.body.scrollWidth / 2 - 350;
document.getElementById("windowgallery").style.left = "" + cisloLeft + "px";
var cisloTop = document.documentElement.scrollTop + 70;
document.getElementById("windowgallery").style.top = "" + cisloTop + "px";

document.getElementById("telo").className = "On_Gallery";
document.getElementById("windowgallery").className = "window_gallery_on";
//document.getElementById("telo").scrollTop = window.pageYOffset ;
//alert(document.documentElement.scrollTop);
document.getElementById("tab_obrazkov").style.visibility="visible"; //init obrazkov
document.getElementById("nazov_izba").style.visibility="hidden"; //init obrazkov

}

function CloseGallery()
{
document.getElementById("telo").className = "hlavna_table";
document.getElementById("windowgallery").className = "window_gallery_off";
document.getElementById("tab_obrazkov").style.visibility="hidden";
document.getElementById("nazov_izba").style.visibility="visible"; //init obrazkov

}

function view(i,akt_pic) {
//alert(i+" "+akt_pic);
document.images["large"].src= i;
document.f1.elements["akt_pic"].value = akt_pic;
}

function next_pic() {
if (document.f1.elements["akt_pic"].value==document.f1.elements["all_pic"].value) {
	} else {
	var i = document.f1.elements["akt_pic"].value;
	i++;
	document.images["large"].src = gall_pic[i].src;
	document.f1.elements["akt_pic"].value = i;
	}
//if (document.f1.elements["akt_pic"].value==document.f1.elements["all_pic"].value) {
//	document.images["next"].style.cursor="default";
//	} else {
//	}
}
function previous_pic() {
if (document.f1.elements["akt_pic"].value==1) {
	} else {
	var i = document.f1.elements["akt_pic"].value;
	i--;
	document.images["large"].src = gall_pic[i].src;
	document.f1.elements["akt_pic"].value = i;
	}
}
function init_large(i) {
	document.images["large"].src = gall_pic[1].src;
	document.f1.elements["all_pic"].value = i;
}
function RealView()
{
window.open(document.images["large"].src,"_blank","scrollbars=yes,resizable=yes,status=yes,width=1024,height=768");	
}
function ChangeLang(a,b) {
var oldLink = location.href;
if (oldLink.search("lang=") == -1) {
	window.open("index.php?lang="+a+"","_self");
	} else {
	var newLink = oldLink.replace("="+b+"","="+a);
	window.open(newLink,"_self");
	}
}
function ChangeClass(id, what) {
	document.getElementById(id).ClassName = "td_menu"+what+"";
	alert(document.getElementById(id).ClassName);
}
function StatusOff() {
document.getElementById("status").className = "StatusOff";
}


